Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NumberFormatException: Not a version: 9 with Scala 2.11.12 #11735

Open
sandeepsingh4 opened this issue Sep 13, 2019 · 3 comments

Comments

@sandeepsingh4
Copy link

commented Sep 13, 2019

Hello, I discovered with a development pain that Scala 2.11.12 is throwing number format exception with following set of environment configurations.

Scala IDE with Eclipse: version 4.7
Eclipse Version: 2019-06 (4.12.0)
Spark Version: 2.4.4
Java Version: "1.8.0_221"

However the same set of configuration is working fine with Scala version 2.11.11 and Scala 2.11.8


Exception in thread "main" java.lang.NumberFormatException: Not a version: 9
    at scala.util.PropertiesTrait$class.parts$1(Properties.scala:184)
    at scala.util.PropertiesTrait$class.isJavaAtLeast(Properties.scala:187)
    at scala.util.Properties$.isJavaAtLeast(Properties.scala:17)
    at scala.tools.util.PathResolverBase$Calculated$.javaBootClasspath(PathResolver.scala:276)
    at scala.tools.util.PathResolverBase$Calculated$.basis(PathResolver.scala:283)
    at scala.tools.util.PathResolverBase$Calculated$.containers$lzycompute(PathResolver.scala:293)
    at scala.tools.util.PathResolverBase$Calculated$.containers(PathResolver.scala:293)
    at scala.tools.util.PathResolverBase.containers(PathResolver.scala:309)
    at scala.tools.util.PathResolver.computeResult(PathResolver.scala:341)
    at scala.tools.util.PathResolver.computeResult(PathResolver.scala:332)
    at scala.tools.util.PathResolverBase.result(PathResolver.scala:314)
    at scala.tools.nsc.backend.JavaPlatform$class.classPath(JavaPlatform.scala:28)
    at scala.tools.nsc.Global$GlobalPlatform.classPath(Global.scala:115)
    at scala.tools.nsc.Global.scala$tools$nsc$Global$$recursiveClassPath(Global.scala:131)
    at scala.tools.nsc.Global.classPath(Global.scala:128)
    at scala.tools.nsc.backend.jvm.BTypesFromSymbols.<init>(BTypesFromSymbols.scala:39)
    at scala.tools.nsc.backend.jvm.BCodeIdiomatic.<init>(BCodeIdiomatic.scala:24)
    at scala.tools.nsc.backend.jvm.BCodeHelpers.<init>(BCodeHelpers.scala:23)
    at scala.tools.nsc.backend.jvm.BCodeSkelBuilder.<init>(BCodeSkelBuilder.scala:25)
    at scala.tools.nsc.backend.jvm.BCodeBodyBuilder.<init>(BCodeBodyBuilder.scala:25)
    at scala.tools.nsc.backend.jvm.BCodeSyncAndTry.<init>(BCodeSyncAndTry.scala:21)
    at scala.tools.nsc.backend.jvm.GenBCode.<init>(GenBCode.scala:47)
    at scala.tools.nsc.Global$genBCode$.<init>(Global.scala:675)
    at scala.tools.nsc.Global.genBCode$lzycompute(Global.scala:671)
    at scala.tools.nsc.Global.genBCode(Global.scala:671)
    at scala.tools.nsc.backend.jvm.GenASM$JPlainBuilder.serialVUID(GenASM.scala:1240)
    at scala.tools.nsc.backend.jvm.GenASM$JPlainBuilder.genClass(GenASM.scala:1329)
    at scala.tools.nsc.backend.jvm.GenASM$AsmPhase.emitFor$1(GenASM.scala:198)
    at scala.tools.nsc.backend.jvm.GenASM$AsmPhase.run(GenASM.scala:204)
    at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1528)
    at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1513)
    at scala.tools.reflect.ToolBoxFactory$ToolBoxImpl$ToolBoxGlobal.wrapInPackageAndCompile(ToolBoxFactory.scala:197)
    at scala.tools.reflect.ToolBoxFactory$ToolBoxImpl$ToolBoxGlobal.compile(ToolBoxFactory.scala:252)
    at scala.tools.reflect.ToolBoxFactory$ToolBoxImpl$$anonfun$compile$2.apply(ToolBoxFactory.scala:429)
    at scala.tools.reflect.ToolBoxFactory$ToolBoxImpl$$anonfun$compile$2.apply(ToolBoxFactory.scala:422)
    at scala.tools.reflect.ToolBoxFactory$ToolBoxImpl$withCompilerApi$.liftedTree2$1(ToolBoxFactory.scala:355)
    at scala.tools.reflect.ToolBoxFactory$ToolBoxImpl$withCompilerApi$.apply(ToolBoxFactory.scala:355)
    at scala.tools.reflect.ToolBoxFactory$ToolBoxImpl.compile(ToolBoxFactory.scala:422)

For this development I have used code provided in deequ issue (awslabs/deequ#116)

Looks like this is a Scala bug with Spark 2.4.4, since the same set of code is working fine with Scala version 2.11.11 and Scala 2.11.8

@SethTisue

This comment has been minimized.

Copy link
Member

commented Sep 13, 2019

is the problem reproducible independently of Eclipse and independently of Spark? if so, how?

you report that you are using Java 8, but from the error message and stack trace, it appears to me you are actually using Java 9. is that possible? if so, can you downgrade to 8 or upgrade to 11? (9 and 10 were development versions)

@eed3si9n

This comment has been minimized.

Copy link
Member

commented Sep 13, 2019

For reference:

@eed3si9n

This comment has been minimized.

Copy link
Member

commented Sep 13, 2019

@sandeepsingh4 Could you come up with steps that we can reproduce this on our machine, without involving Scala IDE, like an sbt project we could run?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.