Menu

#36 JunitEE: Class not found for a Test Class

1.9
open
nobody
None
5
2017-04-11
2017-04-11
No

Problem faced in JunitEE:

We face a weird problem of a test jar (containing junit tests) not getting loaded by org.junitee.runner.TestSuiteLoader, though the jar is kept in APP-INF and WEB-INF lib directories of the ear file. Can you please get back with the following.

  1. Steps to Debug JunitEE to get to know the classpath inferredby TestSuiteLoader while loading/executing the testcases?
  2. Possible reasons to get rid of this problem? The problem is faced in weblogic 12c server.

Thanks
Raj


Here's the stacktrace

run-test:
[echo] Running test: test.SanityTests
[echo] CLASSPATH:
[echo] Junitee URL http://localhost:8001/scheduler-functional1/TestServlet
[junitee] Class not found "test.SanityTests"

BUILD FAILED
../build.xml:238: The following error occurred while executing this line:
../common.xml:275: Test execution failed.
at org.junitee.anttask.JUnitEETask.parseResult(JUnitEETask.java:341)
at org.junitee.anttask.JUnitEETask.execute(JUnitEETask.java:218)
at org.junitee.anttask.JUnitEETask.execute(JUnitEETask.java:168)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
at net.sf.antcontrib.logic.IfTask.execute(IfTask.java:217)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:154)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)

http://junitee.sourceforge.net/maven_site/junite2/apidocs/index.html?org/junitee/runner/TestSuiteLoader.html

Discussion


Log in to post a comment.