Bug 353 - ClassLoader fails to load org.w3c.dom.Document when using junit BugRat Report#633
Summary: ClassLoader fails to load org.w3c.dom.Document when using junit BugRat Report...
Status: RESOLVED FIXED
Alias: None
Product: Ant
Classification: Unclassified
Component: Core (show other bugs)
Version: 1.2
Hardware: All All
: P1 normal (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-12-20 05:00 UTC by Anders Janmyr
Modified: 2008-02-22 12:18 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomcat Developers Mailing List 2000-12-20 05:00:00 UTC
runtests:
LOG0028E The requested logger, logger, could not be built and no default is defi
ned.
    [junit] Testsuite: test.aspiro.notification.pap.PapTest
    [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0,641 sec
    [junit]
    [junit] Testcase: testSubmit took 0,641 sec
    [junit]     Caused an ERROR
    [junit] Class org/w3c/dom/Document violates loader constraints
    [junit] java.lang.LinkageError: Class org/w3c/dom/Document violates loader c
onstraints
    [junit]     at java.lang.ClassLoader.defineClass0(Native Method)
    [junit]     at java.lang.ClassLoader.defineClass(Unknown Source)
    [junit]     at java.lang.ClassLoader.defineClass(Unknown Source)
    [junit]     at org.apache.tools.ant.AntClassLoader.getClassFromStream(AntCla
ssLoader.java:388)
    [junit]     at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.
java:433)
    [junit]     at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.
java:406)
    [junit]     at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.
java:336)
    [junit]     at java.lang.ClassLoader.loadClass(Unknown Source)
    [junit]     at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    [junit]     at com.aspiro.notification.pap.PapAssembler.toDocument(PapAssemb
ler.java:84)
    [junit]     at com.aspiro.notification.pap.PapAssembler.assembleSubmit(PapAs
sembler.java:131)
    [junit]     at test.aspiro.notification.pap.PapTest.testSubmit(PapTest.java:
65)
    [junit]     at java.lang.reflect.Method.invoke(Native Method)
    [junit]     at junit.framework.TestCase.runTest(TestCase.java:156)
    [junit]     at junit.framework.TestCase.runBare(TestCase.java:130)
    [junit]     at junit.framework.TestResult$1.protect(TestResult.java:100)
    [junit]     at junit.framework.TestResult.runProtected(TestResult.java:118)
    [junit]     at junit.framework.TestResult.run(TestResult.java:103)
    [junit]     at junit.framework.TestCase.run(TestCase.java:121)
    [junit]     at junit.framework.TestSuite.runTest(TestSuite.java:149)
    [junit]     at junit.framework.TestSuite.run(TestSuite.java:144)
    [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.
run(JUnitTestRunner.java:202)
    [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execut
e(JUnitTask.java:268)
    [junit]     at org.apache.tools.ant.Target.execute(Target.java:142)
    [junit]     at org.apache.tools.ant.Project.runTarget(Project.java:818)
    [junit]     at org.apache.tools.ant.Project.executeTarget(Project.java:532)
    [junit]     at org.apache.tools.ant.Project.executeTargets(Project.java:506)

    [junit]     at org.apache.tools.ant.Main.runBuild(Main.java:420)
    [junit]     at org.apache.tools.ant.Main.main(Main.java:149)
    [junit]

BUILD FAILED
Comment 1 Stefan Bodewig 2001-02-15 06:34:48 UTC
This is a known problem when you are using JAXP 1.1 early access or crimson. 
Try to run your tests with fork="yes" to avoid classloader confusion.
Comment 2 Stefan Bodewig 2001-03-15 05:21:26 UTC
This specific problem is fixed in a way - Ant 1.4alpha uses JAXP 1.1.