Hi.
I'm new to using bcel and am having trouble getting it to load
correctly.
Via Ant I have a task running junit test which in turn use Hansel and
thus BCel. When the runtime tries to execute a junit suite it gives the
following error:
java.lang.NoSuchMethodError:
org.apache.bcel.util.ClassLoader.<init>(Ljava/lang/ClassLoader;[Ljava/la
ng/String;)V
at
org.hansel.ModifyingClassLoader.<init>(ModifyingClassLoader.java:83)
at
org.hansel.ClassLoaderFactory$InternalClassLoader.<init>(ClassLoaderFact
ory.java:107)
at
org.hansel.ClassLoaderFactory.createInternalClassLoader(ClassLoaderFacto
ry.java:57)
at
org.hansel.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:
75)
at
org.hansel.ClassLoaderFactory$InternalClassLoader.<init>(ClassLoaderFact
ory.java:104)
at
org.hansel.ClassLoaderFactory.createInternalClassLoader(ClassLoaderFacto
ry.java:57)
at
org.hansel.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:
75)
at
org.hansel.CoverageDecorator.internalAddTest(CoverageDecorator.java:103)
at
org.hansel.CoverageDecorator.addTestClass(CoverageDecorator.java:118)
at
org.hansel.CoverageDecorator.<init>(CoverageDecorator.java:66)
at
test.ge.medit.ugs.xmlbot.TestXMLBot.coverageSuite(TestXMLBot.java:41)
at test.ge.medit.ugs.xmlbot.TestXMLBot.suite(TestXMLBot.java:33)
at test.ge.medit.AllTests.suite(AllTests.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
com.intellij.rt.execution.junit.TestRunnerUtil.getTestImpl(TestRunnerUti
l.java:119)
at
com.intellij.rt.execution.junit.TextTestRunner2.getTest(TextTestRunner2.
java:36)
at junit.textui.TestRunner.start(TestRunner.java:171)
at
com.intellij.rt.execution.junit.TextTestRunner2.startRunnerWithArgs(Text
TestRunner2.java:23)
at
com.intellij.rt.execution.junit2.JUnitStarter.prepareStreamsAndStart(JUn
itStarter.java:94)
at
com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java:29)
Internal Error occured.
java.lang.NullPointerException
at junit.framework.TestSuite.countTestCases(TestSuite.java:165)
at
com.intellij.rt.execution.junit2.segments.OutputObjectRegistryImpl.addUn
knownTest(OutputObjectRegistryImpl.java:78)
at
com.intellij.rt.execution.junit2.segments.OutputObjectRegistryImpl.addSt
ringRepresentation(OutputObjectRegistryImpl.java:61)
at
com.intellij.rt.execution.junit2.segments.OutputObjectRegistryImpl.sendO
bject(OutputObjectRegistryImpl.java:39)
at
com.intellij.rt.execution.junit2.segments.OutputObjectRegistryImpl.refer
enceTo(OutputObjectRegistryImpl.java:28)
at
com.intellij.rt.execution.junit2.segments.Packet.addObject(Packet.java:2
2)
at
com.intellij.rt.execution.junit2.TreeSender.sendNode(TreeSender.java:16)
at
com.intellij.rt.execution.junit2.TreeSender.sendSuite(TreeSender.java:34
)
at
com.intellij.rt.execution.junit2.IdeaJUnitAgent.doRun(IdeaJUnitAgent.jav
a:52)
at junit.textui.TestRunner.start(TestRunner.java:172)
at
com.intellij.rt.execution.junit.TextTestRunner2.startRunnerWithArgs(Text
TestRunner2.java:23)
at
com.intellij.rt.execution.junit2.JUnitStarter.prepareStreamsAndStart(JUn
itStarter.java:94)
at
com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java:29)
java.lang.Exception: Could not create and run test suite:
java.lang.NullPointerException
at junit.textui.TestRunner.start(TestRunner.java:175)
at
com.intellij.rt.execution.junit.TextTestRunner2.startRunnerWithArgs(Text
TestRunner2.java:23)
at
com.intellij.rt.execution.junit2.JUnitStarter.prepareStreamsAndStart(JUn
itStarter.java:94)
at
com.intellij.rt.execution.junit2.JUnitStarter.main(estXMLBot.suite --- 2
JUnitStarter.java:29)
This occurs even though bcel.jar is on the path. I've tried different
versions of junit.jar/hansel.jar to no avail. However, if I un-jar the
bcel.jar to my output path and use it from their instead of the jar, it
works fine...
Any suggestions?
Thanks.
jason
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]