After much work around, now i am able to understand the playn environment. Every thing is ok now, but, when i enter:
mvn install (from the main directory)
(or)
mvn java/pom.xml test -Ptest-java
I am getting the following error. I updated the pom.xml (java directory) with this
<!-- unpack LWJGL when testing -->
<plugin>
<groupId>com.googlecode.mavennatives</groupId>
<artifactId>maven-nativedependencies-plugin</artifactId>
<version>0.0.6</version>
<executions>
<execution>
<id>unpacknatives</id>
<phase>test-compile</phase>
<goals><goal>copy</goal></goals>
</execution>
</executions>
</plugin>
Then also, same error, can any one guide me on this
main:
[java] failed to create drawable
[java] Exception in thread "main" java.lang.RuntimeException: org.lwjgl.LWJGLException: X Error - disp: 0xa0b7cc8 serial: 91 error: BadGC (invalid GC parameter) request_code: 60 minor_code: 0
[java] at playn.java.JavaGLContext.initGL(JavaGLContext.java:183)
[java] at playn.java.JavaGraphics.init(JavaGraphics.java:155)
[java] at playn.java.JavaPlatform.run(JavaPlatform.java:218)
[java] at playn.core.PlayN.run(PlayN.java:37)
[java] at main.java.ExampleJava.main(ExampleJava.java:13)
[java] Caused by: org.lwjgl.LWJGLException: X Error - disp: 0xa0b7cc8 serial: 91 error: BadGC (invalid GC parameter) request_code: 60 minor_code: 0
[java] at org.lwjgl.opengl.LinuxDisplay.globalErrorHandler(LinuxDisplay.java:316)
[java] at org.lwjgl.opengl.LinuxKeyboard.nSetDetectableKeyRepeat(Native Method)
[java] at org.lwjgl.opengl.LinuxKeyboard.setDetectableKeyRepeat(LinuxKeyboard.java:152)
[java] at org.lwjgl.opengl.LinuxKeyboard.destroy(LinuxKeyboard.java:163)
[java] at org.lwjgl.opengl.LinuxDisplay.destroyKeyboard(LinuxDisplay.java:1190)
[java] at org.lwjgl.input.Keyboard.destroy(Keyboard.java:349)
[java] at org.lwjgl.opengl.Display.destroyWindow(Display.java:349)
[java] at org.lwjgl.opengl.Display.access$400(Display.java:62)
[java] at org.lwjgl.opengl.Display$5.destroy(Display.java:860)
[java] at org.lwjgl.opengl.Display.create(Display.java:880)
[java] at org.lwjgl.opengl.Display.create(Display.java:782)
[java] at org.lwjgl.opengl.Display.create(Display.java:764)
[java] at playn.java.JavaGLContext.initGL(JavaGLContext.java:173)
[java] ... 4 more
[java] Java Result: 1
Fact: Linux 64-bit + LWJGL = Problems
If you are using a 64-bit Linux then try these one by one:
Upgrade to the newest version of LWJGL(2.8.4)
Install OpenJDK7 64-bit and have it as the default jvm
I believe there was a third fix but forgot what it was. I'll edit it in when I find it.
If you're using a 32-bit Linux then none of these will help.
Related
I'm getting the below exception when attempting to run the class org.apache.tools.ant.launch.Launcher which comes as part of the ant launcher jar :
testTask: [java] Working directory ignored when same JVM is used.
[java] Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre1.8.0_141\lib\tools.jar
[java] java.lang.ClassCastException: org.apache.tools.ant.Main cannot be cast to org.apache.tools.ant.launch.AntMain
[java] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:256)
[java] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[java] at java.lang.reflect.Method.invoke(Unknown Source)
[java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:217)
[java] at java.lang.Thread.run(Unknown Source)
This is the ant target I'm running:
<target name="testTask">
<java classname="org.apache.tools.ant.launch.Launcher" failonerror="true" jvm="C:/jdk1.8.0_141-x64/bin/java" dir=".">
<classpath>
<pathelement location="ant-launcher-1.7.0.jar"/>
<pathelement location="ant-1.7.0.jar"/>
</classpath>
</java>
</target>
and if you look inside ant-1.7.0.jar inside the classpath, you will find that org.apache.tools.ant.Main in fact implements org.apache.tools.ant.launch.AntMain:
and inside ant-launcher-1.7.0.jar, org.apache.tools.ant.launch.AntMain exists exactly under the package we're looking for:
Also I made sure that org.apache.tools.ant.Main overrides the method startAnt(String[] paramArrayOfString, Properties paramProperties, ClassLoader paramClassLoader) and takes the same arguments.
The line causing this exception is:
mainClass = Class.forName("org.apache.tools.ant.Main");
AntMain main = (AntMain)mainClass.newInstance();
worth noting that if I create the exact same class as org.apache.tools.ant.Main but rename it and place it on its own (outside of any .jar package), and run the above snippet but using the name of the new class it works perfectly fine.
Why is java insisting that org.apache.tools.ant.Main cannot be cast to org.apache.tools.ant.launch.AntMain ?
I'm using spotbugs-maven-plugin 4.0.0 (+ spotbugs 4.0.2 dependency).
The problem is that it cannot recognize Java 14 records.
Every time when it finds a record or a class that uses that record, it prints a long stacktrace.
[INFO] >>> spotbugs-maven-plugin:4.0.0:check (default) > :spotbugs # core >>>
[INFO]
[INFO] --- spotbugs-maven-plugin:4.0.0:spotbugs (spotbugs) # core ---
[INFO] Fork Value is true
[java] The following errors occurred during analysis:
[java] Unable to get XClass for com/something/MyRecord
[java] java.lang.UnsupportedOperationException: This feature requires ASM8_EXPERIMENTAL
[java] At org.objectweb.asm.ClassVisitor.visitRecordComponentExperimental(ClassVisitor.java:304)
[java] At org.objectweb.asm.ClassReader.readRecordComponent(ClassReader.java:929)
[java] At org.objectweb.asm.ClassReader.accept(ClassReader.java:704)
[java] At edu.umd.cs.findbugs.asm.FBClassReader.accept(FBClassReader.java:44)
[java] At org.objectweb.asm.ClassReader.accept(ClassReader.java:401)
[java] At edu.umd.cs.findbugs.classfile.engine.ClassParserUsingASM.parse(ClassParserUsingASM.java:552)
[java] At edu.umd.cs.findbugs.classfile.engine.ClassParserUsingASM.parse(ClassParserUsingASM.java:736)
[java] At edu.umd.cs.findbugs.classfile.engine.ClassInfoAnalysisEngine.analyze(ClassInfoAnalysisEngine.java:79)
[java] At edu.umd.cs.findbugs.classfile.engine.ClassInfoAnalysisEngine.analyze(ClassInfoAnalysisEngine.java:38)
[java] At edu.umd.cs.findbugs.classfile.impl.AnalysisCache.getClassAnalysis(AnalysisCache.java:261)
[java] At edu.umd.cs.findbugs.ba.XFactory.getXClass(XFactory.java:685)
[java] At edu.umd.cs.findbugs.ba.AnalysisContext.setAppClassList(AnalysisContext.java:975)
[java] At edu.umd.cs.findbugs.FindBugs2.setAppClassList(FindBugs2.java:909)
[java] At edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:252)
[java] At edu.umd.cs.findbugs.FindBugs.runMain(FindBugs.java:395)
[java] At edu.umd.cs.findbugs.FindBugs2.main(FindBugs2.java:1231)
[java] Couldn't get class info for com/something/MyRecord
[java] java.lang.UnsupportedOperationException: This feature requires ASM8_EXPERIMENTAL
[java] At org.objectweb.asm.ClassVisitor.visitRecordComponentExperimental(ClassVisitor.java:304)
[java] At org.objectweb.asm.ClassReader.readRecordComponent(ClassReader.java:929)
[java] At org.objectweb.asm.ClassReader.accept(ClassReader.java:704)
[java] At edu.umd.cs.findbugs.asm.FBClassReader.accept(FBClassReader.java:44)
[java] At org.objectweb.asm.ClassReader.accept(ClassReader.java:401)
[java] At edu.umd.cs.findbugs.classfile.engine.ClassParserUsingASM.parse(ClassParserUsingASM.java:552)
[java] At edu.umd.cs.findbugs.classfile.engine.ClassParserUsingASM.parse(ClassParserUsingASM.java:736)
[java] At edu.umd.cs.findbugs.classfile.engine.ClassInfoAnalysisEngine.analyze(ClassInfoAnalysisEngine.java:79)
[java] At edu.umd.cs.findbugs.classfile.engine.ClassInfoAnalysisEngine.analyze(ClassInfoAnalysisEngine.java:38)
[java] At edu.umd.cs.findbugs.classfile.impl.AnalysisCache.getClassAnalysis(AnalysisCache.java:261)
[java] At edu.umd.cs.findbugs.ba.XFactory.getXClass(XFactory.java:685)
[java] At edu.umd.cs.findbugs.ba.AnalysisContext.setAppClassList(AnalysisContext.java:975)
[java] At edu.umd.cs.findbugs.FindBugs2.setAppClassList(FindBugs2.java:909)
[java] At edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:252)
[java] At edu.umd.cs.findbugs.FindBugs.runMain(FindBugs.java:395)
[java] At edu.umd.cs.findbugs.FindBugs2.main(FindBugs2.java:1231)
[java] Exception analyzing com.something.MyClassThatUsesMyRecord using detector edu.umd.cs.findbugs.detect.CalledMethods
[java] java.lang.UnsupportedOperationException: This feature requires ASM8_EXPERIMENTAL
[java] At org.objectweb.asm.ClassVisitor.visitRecordComponentExperimental(ClassVisitor.java:304)
[java] At org.objectweb.asm.ClassReader.readRecordComponent(ClassReader.java:929)
[java] At org.objectweb.asm.ClassReader.accept(ClassReader.java:704)
[java] At edu.umd.cs.findbugs.asm.FBClassReader.accept(FBClassReader.java:44)
[java] At org.objectweb.asm.ClassReader.accept(ClassReader.java:401)
[java] At edu.umd.cs.findbugs.classfile.engine.ClassParserUsingASM.parse(ClassParserUsingASM.java:552)
[java] At edu.umd.cs.findbugs.classfile.engine.ClassParserUsingASM.parse(ClassParserUsingASM.java:736)
[java] At edu.umd.cs.findbugs.classfile.engine.ClassInfoAnalysisEngine.analyze(ClassInfoAnalysisEngine.java:79)
[java] At edu.umd.cs.findbugs.classfile.engine.ClassInfoAnalysisEngine.analyze(ClassInfoAnalysisEngine.java:38)
[java] At edu.umd.cs.findbugs.classfile.impl.AnalysisCache.getClassAnalysis(AnalysisCache.java:261)
[java] At edu.umd.cs.findbugs.ba.XFactory.getXClass(XFactory.java:685)
[java] At edu.umd.cs.findbugs.ba.AnalysisContext.setAppClassList(AnalysisContext.java:975)
[java] At edu.umd.cs.findbugs.FindBugs2.setAppClassList(FindBugs2.java:909)
[java] At edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:252)
[java] At edu.umd.cs.findbugs.FindBugs.runMain(FindBugs.java:395)
[java] At edu.umd.cs.findbugs.FindBugs2.main(FindBugs2.java:1231)
...
[INFO] Done SpotBugs Analysis....
How can I get rid of these detailed exceptions?
Though the plugin's latest release read the support through JDK-15, the ASM support for preview features require 8.0+ version while the library is still on 7.3.1.
That said, the changes to their deployable branch should fix this. Specifically the difference in:
- <asm.version>7.3.1</asm.version>
+ <asm.version>8.0.1</asm.version>
So just wait for the next version while requesting them to release soon. :)
After upgrading to Dojo 1.7.3, our ant build that was working flawlessly for years on previous versions of Dojo is now completely non-operational due to out of memory errors:
[java] starting writing resources...
[java] java.lang.OutOfMemoryError: GC overhead limit exceeded
[java] at org.mozilla.javascript.Interpreter.getArgsArray(Interpreter.java:4623)
[java] at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3335)
[java] at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2484)
[java] at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162)
[java] at org.mozilla.javascript.NativeArray.iterativeMethod(NativeArray.java:1565)
[java] at org.mozilla.javascript.NativeArray.execIdCall(NativeArray.java:313)
[java] at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:127)
[java] at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3335)
[java] at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2484)
[java] at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162)
[java] at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2347)
[java] at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:272)
[java] at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:127)
[java] at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76)
[java] at org.mozilla.javascript.gen.c1._c62(Unknown Source)
[java] at org.mozilla.javascript.gen.c1.call(Unknown Source)
[java] at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:97)
[java] at org.mozilla.javascript.gen.c1._c69(Unknown Source)
[java] at org.mozilla.javascript.gen.c1.call(Unknown Source)
[java] at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:97)
[java] at org.mozilla.javascript.gen.c1._c40(Unknown Source)
[java] at org.mozilla.javascript.gen.c1.call(Unknown Source)
[java] at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:97)
[java] at org.mozilla.javascript.gen.c1._c42(Unknown Source)
[java] at org.mozilla.javascript.gen.c1.call(Unknown Source)
[java] at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3335)
[java] at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2484)
[java] at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162)
[java] at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2347)
[java] at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:272)
[java] at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:127)
[java] at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76)
[java] js: exception from uncaught JavaScript throw: java.lang.OutOfMemoryError: GC overhead limit exceeded
I have extensively documented our troubles here.
In particular, where I note:
If I run my build straight from the CL as a Java command, with the '
--optimize shrinksafe" switch, it fails, but without it succeeds. (running it with internStrings alone seems to cause other errors).
Not sure what to make of this, since I believe that oprtimize defaults
to shrinksafe, but I have determined the following:
WORKS:
c:\temp\dojo-release-1.7.3rc1-src\util\buildscripts>java -Xms256m
-Xmx256m -cp ../shrinksafe/js.jar;../closureCompiler/compiler.jar;../shrinksafe/shrinksafe.jar
org.mozilla.javascript.tools.shell.Main ../../dojo/dojo.js
baseUrl=../../dojo load=build -p
C:\company\builds\head\build\generated\general\comComplete.profile.js
--action release --releaseDir C:\company\builds\head\build\generated\general\htdocs\company\javascript\1420
BROKEN (out of memory errors):
c:\temp\dojo-release-1.7.3rc1-src\util\buildscripts>java -Xms256m
-Xmx256m -cp ../shrinksafe/js.jar;../closureCompiler/compiler.jar;../shrinksafe/shrinksafe.jar
org.mozilla.javascript.tools.shell.Main ../../dojo/dojo.js
baseUrl=../../dojo load=build -p
C:\company\builds\head\build\generated\general\comComplete.profile.js
--action release --releaseDir C:\company\builds\head\build\generated\general\htdocs\company\javascript\1420
--optimize shrinksafe --internStrings true
Unfortunately, the following ant script target continues to fail with
memory errors:
BuildNum: ${buildNum}
<path id="js.path"> <pathelement location="${basedir}"/>
</path>
<pathconvert targetos="unix" property="js.path.unix" refid="js.path"
/> js.path.unix: ${js.path.unix}
<!-- clean unpack and output dirs --> <delete
dir="${outputDir}/htdocs/company/javascript/src/" />
<copy file="${externalDir}/dojo/companyComplete.profile.js"
tofile="${outputDir}/companyComplete.profile.js" filtering="yes"
overwrite="yes">
<java fork="true"
dir="${outputDir}/htdocs/company/javascript/src/util/buildscripts"
classname="org.mozilla.javascript.tools.shell.Main"
failonerror="true">
-->
--> --> -->
Update 1
I've also tried it with:
<jvmarg value="-Xms5120m"/>
<jvmarg value="-Xmx5120m"/>
And also using the maxmemory setting on the ant java task itself.
Finally found the problem, the releaseDir switch value had both windows and unix file separators in it. That used to work fine in Dojo < 1.6 and typically Java has no problem with it. For some reason, the Dojo 1.7 build system hits memory problems in that case.
The releaseDir, after resolving the ant tokens from the question, had a mix of both unix and windows file separators:
<arg value="releaseDir=${output.dir}/path/foo/bar" />
-> Became ->
releaseDir=blah\blah\blah/path/foo/bar
And that was enough to cause the build to lock up at 'writing resources' and then crash with 'out of heap space'. (This is something Java normally handles without issue).
The fix was simple enough:
<path id="dojo.output.tmp">
<pathelement location=" ${output.dir}/path/foo/bar "/>
</path>
<pathconvert targetos="unix" property="dojo.output.dir" refid="dojo.output.tmp" />
...
<arg value="releaseDir=${dojo.output.dir}" />
I've added a Web Service using Axis2 to my project and now I can't run my application.
This is the classpath I am using:
<property name="classpath" location="bin:EventReservationCore/bin:EventReservationCore/db:EventReservationCore/lib/*:EventReservationCore/lib/util_iso2.jar:EventReservationCore/lib/sqlitejdbc-v056.jar:AuthorizationRMI/lib/AuthorizationService.jar:EventReservationCore/lib/activemq-all-5.4.3.jar:/home/ander/axis2-1.6.1/webapp/axis2.war"/>
And this is the target that runs until I add the Axis2 Web Service.
<target name="run.besocial">
<java classname="eventReservationServer.ReservationEventServer" classpath="${classpath}" fork="true">
<jvmarg value="-Djava.rmi.server.codebase=file:EventReservationCore/bin/ file:EventReservationCore/lib/util_iso2.jar"/>
<jvmarg value="-Djava.security.policy=EventReservationCore/java.policy" />
</java>
</target>
As a result I get this error:
[java] Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/axis2/client/Stub
[java] at java.lang.ClassLoader.defineClass1(Native Method)
[java] at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
[java] at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
[java] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
[java] at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
[java] at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
[java] at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
[java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
[java] at eventReservationServer.eventServerGateway.WSEventServerGateway.getEvents(WSEventServerGateway.java:19)
[java] at eventReservationServer.ReservationEventServer.<init>(ReservationEventServer.java:101)
[java] at eventReservationServer.ReservationEventServer.main(ReservationEventServer.java:130)
[java] Caused by: java.lang.ClassNotFoundException: org.apache.axis2.client.Stub
[java] at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
[java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
[java] ... 15 more
If you are using tomcat, copy all the jar files located under axis2/lib folder to the tomcat/lib folder and also add them to the classpath like this D:\axis2-1.6.2\lib*
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/axis2/client/Stub
Above error can be removed by adding axis2-kernel-1.6.2 to the class path, but you might start getting other errors after you have generated the stubs with wsdl2java.bat.
So you better add all the axis2-jars to classpath while compiling the client.
Hope this helps
None of the answers helped me. Here is then what I did.
I used eclipse to generate Runnable Jar(right click->Export->Runnable Jar) with all the libraries added as package.
It gave me a JAR that I could run from command line.
Then I did diff between Jar from eclipse and Jar that my build created. I was able to find the missing dependencies that my build was not putting in Jar.
If you faced the same issue for JBoss class loader, follow the tips on here and here.
The most important part is to define a new module in JBoss module configurations, and also locate the module in you MANIFEST.MF file.
Maven will help you to do the later part. Following is a sample configuration to add axis module to your Manifest file.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<configuration>
<archive>
<manifestEntries> <!--Manually added JBoss Modules (that are not found by JBoss class loader) must be loaded here-->
<Dependencies>axis.axis</Dependencies>
</manifestEntries>
</archive>
</configuration>
</plugin>
Depending to your packaging type, you would use other maven plugins like maven-jar-plugin or maven-war-plugin.
The dependency package name must match the name that you have specified to your module name in JBoss modules. The above axis module is defined in JBoss models as explained in the links above.
<module xmlns="urn:jboss:module:1.1" name="axis.axis">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<!-- ... -->
</module>
I'm running CrossCheck (browserless js unit testing) as part of an ant script. I'd like ant to report failure if the CrossCheck tests fail. Here's the relevant bit from the build.xml
<target name="test" depends="concat">
<java jar="src/test/lib/crosscheck.jar" fork="true">
<arg value="src/test/webapp/js/"/>
</java>
And an example of CrossCheck's failure messaging:
[java] Running tests in environment: Mozilla 1.7 (Firefox 1.0)
[java] org.mozilla.javascript.EcmaError: ReferenceError: "clusterNode" is not defined. (ResultXMLWrapperTest.js#22)
[java] at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3229)
[java] at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3219)
[java] at org.mozilla.javascript.ScriptRuntime.notFoundError(ScriptRuntime.java:3292)
[java] at org.mozilla.javascript.ScriptRuntime.nameOrFunction(ScriptRuntime.java:1636)
[java] at org.mozilla.javascript.ScriptRuntime.name(ScriptRuntime.java:1575)
[java] at org.mozilla.javascript.gen.c1._c1(ResultXMLWrapperTest.js:22)
[java] at org.mozilla.javascript.gen.c1.call(ResultXMLWrapperTest.js)
[java] at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:340)
[java] at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2758)
[java] at org.mozilla.javascript.gen.c1.call(ResultXMLWrapperTest.js)
[java] at net.thefrontside.crosscheck.framework.AbstractScopeFactory$1.run(AbstractScopeFactory.java:108)
[java] at org.mozilla.javascript.Context.call(Context.java:515)
[java] at org.mozilla.javascript.Context.call(Context.java:450)
[java] at net.thefrontside.crosscheck.framework.AbstractScopeFactory.initTestScope(AbstractScopeFactory.java:94)
[java] at net.thefrontside.crosscheck.framework.DefaultScopeFactory.getTestScope(DefaultScopeFactory.java:68)
[java] at net.thefrontside.crosscheck.framework.TestCase$1.run(TestCase.java:119)
[java] at org.mozilla.javascript.Context.call(Context.java:528)
[java] at org.mozilla.javascript.Context.call(Context.java:450)
[java] at net.thefrontside.crosscheck.framework.TestCase.run(TestCase.java:117)
[java] at net.thefrontside.crosscheck.framework.TestSuite.run(TestSuite.java:95)
[java] at net.thefrontside.crosscheck.framework.Crosscheck.runAll(Crosscheck.java:116)
[java] at net.thefrontside.crosscheck.framework.ConsoleRunner.run(ConsoleRunner.java:140)
[java] at net.thefrontside.crosscheck.framework.ConsoleRunner.main(ConsoleRunner.java:300)
[java] ReferenceError: "clusterNode" is not defined. (ResultXMLWrapperTest.js#22)
[java] Java Result: 1
Can ant get at the results of the CrossCheck test (perhaps Java Result: 1 gets passed back to ant?) and succeed or fail based on that?
Assuming that CrossCheck returns a non-zero return code on a error you could add the failonerror attribute to the java task:
<target name="test" depends="concat">
<java jar="src/test/lib/crosscheck.jar" fork="true" failonerror="true">
<arg value="src/test/webapp/js/"/>
</java>
See the documentation on the Ant java task.
You can use the 'failonerror' attribute of the 'java' task.
failonerror Stop the buildprocess if
the command exits with a returncode
other than 0. Default is "false" (see
note)
Check the Ant manual here.