通过ant实现junit时出现以下错误
td/devenv/exceptions/EjbDelegateException" type="java.lang.NoClassDefFoundError">java.lang.NoClassDefFoundError: td/devenv/exceptions/EjbDelegateException
at td.soa.inventory.test.RemoteDokLink.testGetLayer2Ring(RemoteDokLink.java:483) Caused by:
java.lang.ClassNotFoundException: td.devenv.exceptions.EjbDelegateException
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Junit代码如下所示,第一部分是junit的执行
第二部分是junit定义,其中解释了cide中使用的所有罐子
<!-- Jenkins implementation -->
<property name="dir.build.test.classes" location="${basedir}/build/classes/test" />
<property name="dir.dist" location="${basedir}/build/dist" />
<property name="dir.junit.rep" location="${basedir}/build/junitoutput" />
<property name="dir.build.classes" location="${basedir}/build/classes" />
<property name="dir.src" location="${basedir}/src" />
<property name="dir.lib.jar" location="${basedir}/lib" />
<property name="jar.junit" location="T:/External/JUnit/3.8.1/junit.jar" />
<property name="jar.weblogic" location="T:/bea/wlserver_10.3/server/lib"/>
<property name="jar.XMLBroker" location="T:/EAIUTIL/Xbroker"/>
<property name="jar.apt-jelly" location="T:/External/apt-jelly/2.3"/>
<property name="jar.DokLink" location="D:/junitttest/DokLink_WLS10/build/lib"/>
<property name="jar.DokLink-client" location="D:/junitttest/DokLink_WLS10/build/lib"/>
请任何人帮忙
答案 0 :(得分:0)
看起来EjbDelegateException类在运行时不可用于依赖类。请检查构建文件中的路径。