[ http://issues.apache.org/jira/browse/DERBY-2153?page=all ]

A B updated DERBY-2153:
-----------------------

    Attachment: d2153_v1.patch

Attaching a patch, d2153_v1.patch, to create a new file, junit/JAXPFinder.java, 
that is only instantiated when all required XML classes are in the classpath.  
The patch then moves the import of DocumentBuilderFactory out of junit/XML.java 
and into junit/JAXPFinder.java.  This extra level of indirection combined with 
the conditional instantiation of JAXPFinder ensures that we do not attempt to 
instantiate a DocumentBuilderFactory unless we have the necessary JAXP classes. 
 Thus the NoClassFoundError will no longer occur for wctme5.7 (j9).

The patch also makes the changes suggested by Dan in his previous comments 
(thanks Dan!).

I ran suites.All with wctme5.7 and saw 8 failures:

FAILURES!!!
Tests run: 1166,  Failures: 0,  Errors: 8

All eight failures are covered by DERBY-2157 and DERBY-2158 and are not related 
to my changes.  I also ran XMLSuite using wctme after putting the required JAXP 
and Xalan classes in the classpath; all XML tests then ran without error, as 
expected.

Patch is ready for review.  I tried to add extensive comments explaining why 
these changes are needed, so it'd be great if people can at least review the 
comments and let me know what I can do to improve them.

And as a final note, I tried running suites.All with wctme5.7 without the patch 
and I did indeed see the error reported here--so hopefully that means I'm 
running the wctme tests correctly :)

> suites.All falls over with foundation after revision 482433; 
> java.lang.NoClassFoundError: javax.xml.parsers.DocumentBuilderFactory
> ----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2153
>                 URL: http://issues.apache.org/jira/browse/DERBY-2153
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.3.0.0
>         Environment: IBM's wctme5.7 (a.k.a. j9) jcl Foundation libraries 
> (j2MEjdk 1.0)
>            Reporter: Myrna van Lunteren
>         Assigned To: A B
>         Attachments: d2153_v1.patch
>
>
> When attempting to run:
> <j9binpath>/j9 -jcl:foun10 -Dderby.system.home=<testhome> 
> -DderbyTesting.serverhost=localhost -DderbyTesting.clienthost=localhost 
> -DderbyTesting.codeclasses=file:/<classesdir>/ 
> -DderbyTesting.junit=file://unused -DderbyTesting.antjunit=file://unused 
> -Djava.security.policy=file:/<classesdir>/org/apache/derbyTesting/functionTests/util/derby_tests.policy
>  -Xbootclasspath/a:<j9libpath>/jdbc.jar -cp <classesdir>;junit.jar 
> junit.textui.TestRunner org.apache.derbyTesting.functionTests.suites.All 
> The textui.TestRunner keels over with the following error:
> Failed to invoke suite():java.lang.NoClassDefFoundError: 
> javax.xml.parsers.DocumentBuilderFactory
> This happens after, but not before revision 482433. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to