Hi All,
I am working on Apache axis2 project. I am trying to run few test cases
using a build.xml. I do codegeneration, compiling and run all via this
build.xml. But I am getting a runtime exception if I set fork = "false" both
in linux and windows. Things are ok when fork="true" in linux(Ubuntu). But
in windows it shows me the help to use java commands when fork = "true".
Could somebody pls help me to overcome this triouble?
This is a part of my build.xml where I get the trouble
<target name="run-1" depends="compile-1,compile-stub1">
<junit printsummary="on" fork="yes" haltonfailure="false"
failureproperty="tests.failed" showoutput="true">
<classpath refid="interop.path1"/>
<formatter type="brief" usefile="false"/>
<batchtest>
<fileset dir="${dir.clients}">
<include name="**/WMRound3Compound1InteropTest.java"/>
</fileset>
</batchtest>
</junit>
<fail if="tests.failed"/>
</target>
This is output in commant prompt when fork="true"
E:\SVN2\modules\integration>ant
Buildfile: build.xml
prepare:
clean:
[mkdir] Created dir: E:\SVN2\modules\integration\doclit-interop\classes1
[mkdir] Created dir: E:\SVN2\modules\integration\doclit-interop\classes2
[mkdir] Created dir: E:\SVN2\modules\integration\doclit-interop\src1
[mkdir] Created dir: E:\SVN2\modules\integration\doclit-interop\src2
gen-1:
[move] Moving 402 files to
E:\SVN2\modules\integration\doclit-interop\class
es1
[delete] Deleted 36 directories from
E:\SVN2\modules\integration\doclit-inter
op\src1\schema
compile-1:
[javac] Compiling 221 source files to
E:\SVN2\modules\integration\doclit-int
erop\classes1
compile-stub1:
[javac] Compiling 4 source files to
E:\SVN2\modules\integration\doclit-inter
op\classes1
run-1:
[junit] Running test.WMRound3Compound1InteropTest
[junit] Usage: java [-options] class [args...]
[junit] (to execute a class)
[junit] or java [-options] -jar jarfile [args...]
[junit] (to execute a jar file)
[junit] where options include:
[junit] -client to select the "client" VM
[junit] -server to select the "server" VM
[junit] -hotspot is a synonym for the "client" VM
[deprecated]
[junit] The default VM is client.
[junit] -cp <class search path of directories and zip/jar files>
[junit] -classpath <class search path of directories and zip/jar
files>
[junit] A ; separated list of directories, JAR
archives,
[junit] and ZIP archives to search for class files.
[junit] -D<name>=<value>
[junit] set a system property
[junit] -verbose[:class|gc|jni]
[junit] enable verbose output
[junit] -version print product version and exit
[junit] -version:<value>
[junit] require the specified version to run
[junit] -showversion print product version and continue
[junit] -jre-restrict-search | -jre-no-restrict-search
[junit] include/exclude user private JREs in the
version s
earch
[junit] -? -help print this help message
[junit] -X print help on non-standard options
[junit] -ea[:<packagename>...|:<classname>]
[junit] -enableassertions[:<packagename>...|:<classname>]
[junit] enable assertions
[junit] -da[:<packagename>...|:<classname>]
[junit] -disableassertions[:<packagename>...|:<classname>]
[junit] disable assertions
[junit] -esa | -enablesystemassertions
[junit] enable system assertions
[junit] -dsa | -disablesystemassertions
[junit] disable system assertions
BUILD FAILED
E:\SVN2\modules\integration\build.xml:137: Test
test.WMRound3Compound1InteropTes
t failed
Total time: 35 seconds
If fork="no" then the output is an runtime exception:-
[junit] java.util.zip.ZipException: error in opening zip file
[junit] at java.util.zip.ZipFile.open(Native Method)
[junit] at java.util.zip.ZipFile.<init>(ZipFile.java:112)
[junit] at java.util.zip.ZipFile.<init>(ZipFile.java:128)
[junit] at
org.apache.tools.ant.AntClassLoader.getResourceURL(AntClassLo
ader.java:919)
[junit] at
org.apache.tools.ant.AntClassLoader.getResource(AntClassLoade
r.java:832)
[junit] at
org.apache.log4j.helpers.Loader.getResource(Loader.java:78)
[junit] at org.apache.log4j.LogManager.<clinit>(LogManager.java:94)
[junit] at org.apache.log4j.Logger.getLogger(Logger.java:85)
[junit] at
org.apache.commons.logging.impl.Log4JLogger.<init>(Log4JLogge
r.java:102)
[junit] at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
[junit] at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeC
onstructorAccessorImpl.java:39)
[junit] at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Del
egatingConstructorAccessorImpl.java:27)
[junit] at
java.lang.reflect.Constructor.newInstance(Constructor.java:27
4)
[junit] at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(Lo
gFactoryImpl.java:525)
[junit] at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(Lo
gFactoryImpl.java:272)
[junit] at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(Lo
gFactoryImpl.java:246)
[junit] at
org.apache.commons.logging.LogFactory.getLog(LogFactory.java:
395)
[junit] at org.apache.axis2.engine.Phase.<init>(Phase.java:48)
[junit] at
org.apache.axis2.description.OperationDescription.<init>(Oper
ationDescription.java:51)
[junit] at codegen.SoapInteropCompound1PortTypeStub.<clinit>(Unknown
Sou
rce)
[junit] at test.WMRound3Compound1InteropTest.setUp(Unknown Source)
[junit] at junit.framework.TestCase.runBare(TestCase.java:125)
[junit] at junit.framework.TestResult$1.protect(TestResult.java:106)
[junit] at
junit.framework.TestResult.runProtected(TestResult.java:124)
[junit] at junit.framework.TestResult.run(TestResult.java:109)
[junit] at junit.framework.TestCase.run(TestCase.java:118)
[junit] at junit.framework.TestSuite.runTest(TestSuite.java:208)
[junit] at junit.framework.TestSuite.run(TestSuite.java:203)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.
run(JUnitTestRunner.java:297)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execut
eInVM(JUnitTask.java:1072)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execut
e(JUnitTask.java:682)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execut
eOrQueue(JUnitTask.java:1434)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execut
e(JUnitTask.java:632)
[junit] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja
va:275)
[junit] at org.apache.tools.ant.Task.perform(Task.java:364)
[junit] at org.apache.tools.ant.Target.execute(Target.java:341)
[junit] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[junit] at
org.apache.tools.ant.Project.executeSortedTargets(Project.jav
a:1216)
[junit] at
org.apache.tools.ant.Project.executeTarget(Project.java:1185)
[junit] at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(De
faultExecutor.java:40)
[junit] at
org.apache.tools.ant.Project.executeTargets(Project.java:1068
)
[junit] at org.apache.tools.ant.Main.runBuild(Main.java:668)
Terminate batch job (Y/N)? ^C
E:\SVN2\modules\integration>ant clean
Buildfile: build.xml
Thanks,
Gayan Asanka
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]