You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Sh...@NAI.com on 2002/06/27 20:04:53 UTC

weblogic client problem within on win2000

Hi,

I got a ClassCastException when I try to run a testcase which is subclass of
TestCase and run  from junit. What it is doing is to try to lookup the EJB
home interface and cast to its home interface.

I got "Process fork failed." error if I set "dir" attribute for junit and
"yes" to "fork" attribute for "junit" and "yes" to "fork" attribute for
"batchtest".

One more I have to mention: it works fine if I use <java> to run that class.

Any comments will be appreciated.

Thanks in advance.

Shuangli

Here is the trace stack
    [junit] dir attribute ignored if running in the same VM
    [junit] Running TestMetadataResponse
    [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 1.993 sec
    [junit] Testsuite: TestMetadataResponse
    [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 1.993 sec
    [junit] ------------- Standard Output ---------------
    [junit] name is TestMetadataResponse
    [junit] ------------- ---------------- ---------------
    [junit] ------------- Standard Error -----------------
    [junit] java.lang.ClassCastException: $Proxy1
    [junit]     at NxTestBase.getHomeInterfaces(NxTestBase.java:185)
    [junit]     at NxTestBase.setUp(NxTestBase.java:173)
    [junit]     at TestMetadataResponse.setUp(TestMetadataResponse.java:56)
    [junit]     at junit.framework.TestCase.runBare(TestCase.java:138)
    [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:131)
    [junit]     at junit.framework.TestSuite.runTest(TestSuite.java:173)
    [junit]     at junit.framework.TestSuite.run(TestSuite.java:168)
    [junit]     at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRu
nner.java:231)
    [junit]     at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeInVM(JUnitTask
.java:582)
    [junit]     at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.jav
a:403)
    [junit]     at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.jav
a:380)
    [junit]     at org.apache.tools.ant.Task.perform(Task.java:217)
    [junit]     at org.apache.tools.ant.Target.execute(Target.java:184)
    [junit]     at org.apache.tools.ant.Target.performTasks(Target.java:202)
    [junit]     at
org.apache.tools.ant.Project.executeTarget(Project.java:601)
    [junit]     at
org.apache.tools.ant.Project.executeTargets(Project.java:560)

    [junit]     at org.apache.tools.ant.Main.runBuild(Main.java:454)
    [junit]     at org.apache.tools.ant.Main.start(Main.java:153)
    [junit]     at org.apache.tools.ant.Main.main(Main.java:176)
    [junit] ------------- ---------------- ---------------

<junit dir="tools"
	   printsummary="${junit.printsummary}" 
	   haltonerror="${junit.haltonerror}" 
	   haltonfailure="yes" 
	   fork="yes"
	   timeout="${junit.timeout}"
	   jvm="${junit.jvm}">

      <jvmarg value="${junit.jvm.options}"/>
      <sysproperty key="deploy.dir" file="${build.lib}"/>

      <classpath>
			<pathelement path="${java.class.path}/"/>
			<pathelement path="${build.classes}"/>
			<pathelement path="${build.qa.classes}"/>
			<fileset dir="${excal.base}/lib">
				<include name="**/*.jar"/>
				<include name="**/*.zip"/>
			</fileset>
			<fileset dir="${excal.base}/tools">
				<include name="**/*.jar"/>
				<include name="**/*.zip"/>
			</fileset>
      </classpath>

      <formatter type="${junit.formatter.type}"
		 usefile="${junit.formatter.usefile}"/>
	
      <batchtest todir="${build.reports}"
		 haltonerror="${junit.batchtest.haltonerror}" 
		 haltonfailure="${junit.batchtest.haltonfailure}" 
		 fork="yes">
        <fileset dir="${build.qa.classes}">
          <include name="**/TestMeta*.class"/>

        </fileset>
      </batchtest>
</junit>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>