eed3si9n / scalaxb

scalaxb is an XML data binding tool for Scala.
http://scalaxb.org/
MIT License
337 stars 154 forks source link

NoSuchMethodError #63

Closed brentlemons closed 13 years ago

brentlemons commented 13 years ago

I installed scalaxb this morning via conscript. When trying to parse any xsd file (my xsd or the sample usaddress.xsd), I get a NoSuchMethodError exception.

I saw a previous issue stating this is related to older version of scalaxb.jar in classpath. I checked my system and the only scalaxb.jar is the one installed this morning by conscript.

Full text of exception when passing usaddress.xsd:

mwkstn01: brent$ scalaxb usaddress.xsd java.lang.NoSuchMethodError: java.lang.String.isEmpty()Z at scalaxb.compiler.xsd.GenSource.argsString$1(GenSource.scala:322) at scalaxb.compiler.xsd.GenSource.companionCode$1(GenSource.scala:379) at scalaxb.compiler.xsd.GenSource.makeCaseClassWithType(GenSource.scala:410) at scalaxb.compiler.xsd.GenSource.makeSuperType(GenSource.scala:76) at scalaxb.compiler.xsd.GenSource$$anonfun$run$1.apply(GenSource.scala:57) at scalaxb.compiler.xsd.GenSource$$anonfun$run$1.apply(GenSource.scala:53) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206) at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:61) at scala.collection.immutable.List.foreach(List.scala:45) at scala.collection.TraversableLike$class.map(TraversableLike.scala:206) at scala.collection.immutable.List.map(List.scala:45) at scalaxb.compiler.xsd.GenSource.run(GenSource.scala:53) at scalaxb.compiler.xsd.Driver.generate(Driver.scala:51) at scalaxb.compiler.xsd.Driver.generate(Driver.scala:31) at scalaxb.compiler.Module$$anonfun$processImportables$1$1.apply(Module.scala:236) at scalaxb.compiler.Module$$anonfun$processImportables$1$1.apply(Module.scala:230) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206) at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:61) at scala.collection.immutable.List.foreach(List.scala:45) at scala.collection.TraversableLike$class.map(TraversableLike.scala:206) at scala.collection.immutable.List.map(List.scala:45) at scalaxb.compiler.Module$class.processImportables$1(Module.scala:230) at scalaxb.compiler.Module$class.processReaders(Module.scala:260) at scalaxb.compiler.xsd.Driver.processReaders(Driver.scala:31) at scalaxb.compiler.Module$class.processFiles(Module.scala:128) at scalaxb.compiler.xsd.Driver.processFiles(Driver.scala:31) at scalaxb.compiler.Main$.start(Main.scala:82) at scalaxb.compiler.SbtApp.run(SbtApp.scala:6) at xsbt.boot.Launch$.run(Launch.scala:53) at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:42) at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:42) at xsbt.boot.Launch$.launch(Launch.scala:57) at xsbt.boot.Launch$.explicit(Launch.scala:42) at xsbt.boot.Launch$.initialized(Launch.scala:38) at xsbt.boot.Launch$.parsed(Launch.scala:31) at xsbt.boot.Launch$.configured(Launch.scala:21) at xsbt.boot.Launch$.apply(Launch.scala:16) at xsbt.boot.Launch$.apply(Launch.scala:13) at xsbt.boot.Boot$.runImpl(Boot.scala:24) at xsbt.boot.Boot$.run(Boot.scala:19) at xsbt.boot.Boot$.main(Boot.scala:15) at xsbt.boot.Boot.main(Boot.scala) Error during sbt execution: java.lang.NoSuchMethodError: java.lang.String.isEmpty()Z

Thanks! Brent

brentlemons commented 13 years ago

I apologize for not trying this before submitting, but it might be good to note for future users.

I had my java environment pointing to JDK 1.5. When I switched it over to 1.6, the problem went away and xsd's parsed properly.

eed3si9n commented 13 years ago

I didn't know it doesn't work on JDK 1.5. Thanks for your feedback!