- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Specs 1.4.1 and Netbeans 6.5
Hello all,
perhaps someone can help me with a problem which is treating my nerves.
I shortly installed NB6.5 and now also the scala stuff
(scala-plugin081119.zip),
and tried to run/test a formerly created Scala project which contains
some Specs tests. I changed the project settings to refer to a specs
jar
of version 1.4.1 (prev.: 1.3.1), but when starting Test Project I get
errors like this one:
-----------------------
Testsuite: musterthearmy.CharacterTest
Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0,063 sec
Testcase: initializationError(musterthearmy.CharacterTest):
Caused an ERROR
org.specs.specification.SpecificationStructure.specify(Ljava/lang/String
;)Lorg/specs/specification/Sut;
java.lang.NoSuchMethodError:
org.specs.specification.SpecificationStructure.specify(Ljava/lang/String
;)Lorg/specs/specification/Sut;
at musterthearmy.CharacterSpec$.(BestiaryTest.scala:55)
at musterthearmy.CharacterSpec$.(BestiaryTest.scala)
at musterthearmy.CharacterTest.(BestiaryTest.scala:76)
at
java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at
org.specs.runner.JUnitSuiteRunner.(JUnitSuiteRunner.scala:20)
at
java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at
java.lang.reflect.Constructor.newInstance(Constructor.java:494)
Test musterthearmy.CharacterTest FAILED
-----------------------
Googling led me to the following post with exactly the same symptom:
http://www.nabble.com/-scala-tools--Specs-1.4.0-in-scala-tools.org-repo-
broken--td20730628.html
The project is very small, not dependend on other projects, and was
created
by a clean build.
I also checked all properties and other files under nbproject or
whereever, but
all found references to specs seem to refer to the correct jar.
What now confuses me is, that the method signature in the error message
ends in
Lorg/specs/specification/Sut; <-- with 't'
while the method signature regarding specs' source and class files is:
Lorg/specs/specification/Sus; <-- with 's'
which is indeed existing in the jar file.
So how is it that this thing fails?
Any help is appreciated
KR
Det










RE: (SOLVED) Specs 1.4.1 and Netbeans 6.5
Hello all,
for all interested, I eventually found the problem.
I detected in the test reports (under build/test/results) that they
reported a property scala.class.path to contain both libraries,
with 1.3.1 being first.
=> I had put specs-1.4.1.jar beside 1.3.1 in SCALA_HOME/lib directory,
a bad idea, but, well...
After removing 1.3.1 the problem was solved.
BUT:
I was confused because the scala.class.path seems to be created
automagically by collecting all jars in the /lib folder of
the registered Scala platform.
Looking into the Scala Platform Manager, you see the Platform
Folder entry, which is equivalent to a SCALA_HOME setting.
Below that is a tabgroup containing one tab called Classes.
Here the "Platform Classpath" is listed, showing explicitly all
the JDK libs, plus the path to /lib/scala-library.jar
One could assume that this list contains exactly the used
libraries and should either be complete as is shown and not
magically extended, or contain all other libraries too.
Or did I miss something?
KR
Det
> -----Original Message-----
> From: Detering Dirk [mailto:Dirk [dot] Detering [at] bitmarck [dot] de]
> Sent: Tuesday, December 16, 2008 5:11 PM
> To: scala-user [at] listes [dot] epfl [dot] ch
> Subject: [scala-user] Specs 1.4.1 and Netbeans 6.5
>
> ENV: NB 6.5 , junit 4.5 , java 1.5.0_15 , specs 1.4.1
>
> Hello all,
>
> perhaps someone can help me with a problem which is treating
> my nerves.
>
> I shortly installed NB6.5 and now also the scala stuff
> (scala-plugin081119.zip),
> and tried to run/test a formerly created Scala project which contains
> some Specs tests. I changed the project settings to refer to a specs
> jar
> of version 1.4.1 (prev.: 1.3.1), but when starting Test Project I get
> errors like this one:
>
> -----------------------
> Testsuite: musterthearmy.CharacterTest
> Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0,063 sec
>
> Testcase: initializationError(musterthearmy.CharacterTest):
> Caused an ERROR
> org.specs.specification.SpecificationStructure.specify(Ljava/l
> ang/String
> ;)Lorg/specs/specification/Sut;
> java.lang.NoSuchMethodError:
> org.specs.specification.SpecificationStructure.specify(Ljava/l
> ang/String
> ;)Lorg/specs/specification/Sut;
> at musterthearmy.CharacterSpec$.(BestiaryTest.scala:55)
> at musterthearmy.CharacterSpec$.(BestiaryTest.scala)
> at musterthearmy.CharacterTest.(BestiaryTest.scala:76)
> at
> java.lang.reflect.Constructor.newInstance(Constructor.java:494)
> at java.lang.Class.newInstance0(Class.java:350)
> at java.lang.Class.newInstance(Class.java:303)
> at
> org.specs.runner.JUnitSuiteRunner.(JUnitSuiteRunner.scala:20)
> at
> java.lang.reflect.Constructor.newInstance(Constructor.java:494)
> at
> java.lang.reflect.Constructor.newInstance(Constructor.java:494)
>
>
> Test musterthearmy.CharacterTest FAILED
> -----------------------
>
> Googling led me to the following post with exactly the same symptom:
> http://www.nabble.com/-scala-tools--Specs-1.4.0-in-scala-tools
> .org-repo-
> broken--td20730628.html
>
>
> The project is very small, not dependend on other projects, and was
> created
> by a clean build.
> I also checked all properties and other files under nbproject or
> whereever, but
> all found references to specs seem to refer to the correct jar.
>
> What now confuses me is, that the method signature in the
> error message
> ends in
> Lorg/specs/specification/Sut; <-- with 't'
>
> while the method signature regarding specs' source and class files is:
> Lorg/specs/specification/Sus; <-- with 's'
> which is indeed existing in the jar file.
>
> So how is it that this thing fails?
>
> Any help is appreciated
>
> KR
> Det
>
>
>
>
>