Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 313798

Summary: NPE in XDKTransformer when using Oracle xmlparserv2
Product: z_Archived Reporter: Rick Barkhouse <rick.barkhouse>
Component: EclipselinkAssignee: Rick Barkhouse <rick.barkhouse>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
trunk/build.properties to include xmlparserv2
none
moxy/build.xml to include xmlparserv2
none
Proposed patch.
none
Proposed patch. none

Description Rick Barkhouse CLA 2010-05-20 15:12:43 EDT
Several JAXB tests are failing when run with the Oracle XML parser.  For example:


Java Project Source w/SAX Parsing: XmlAnyElementLaxTestCase: testXMLToObjectFromURL

javax.xml.bind.UnmarshalException
- with linked exception:
[java.lang.NullPointerException]
at org.eclipse.persistence.jaxb.JAXBUnmarshaller.unmarshal(JAXBUnmarshaller.java:141)
at org.eclipse.persistence.testing.jaxb.JAXBTestCases.testXMLToObjectFromURL(JAXBTestCases.java:365)
Caused by: java.lang.NullPointerException
at org.eclipse.persistence.platform.xml.xdk.XDKTransformer.transform(XDKTransformer.java:112)
at org.eclipse.persistence.internal.jaxb.DomHandlerConverter.convertDataValueToObjectValue(DomHandlerConverter.java:88)
at org.eclipse.persistence.internal.jaxb.JAXBElementRootConverter.convertDataValueToObjectValue(JAXBElementRootConverter.java:60)
at org.eclipse.persistence.internal.oxm.XMLRelationshipMappingNodeValue.setOrAddAttributeValueForKeepAsElement(XMLRelationshipMappingNodeValue.java:195)
at org.eclipse.persistence.internal.oxm.XMLAnyCollectionMappingNodeValue.endElement(XMLAnyCollectionMappingNodeValue.java:164)
at org.eclipse.persistence.oxm.record.UnmarshalRecord.endElement(UnmarshalRecord.java:780)
at org.eclipse.persistence.internal.oxm.SAXFragmentBuilder.endElement(SAXFragmentBuilder.java:152)
at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1358)
at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:375)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:321)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:226)
at org.eclipse.persistence.internal.oxm.record.XMLReader.parse(XMLReader.java:144)
at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:650)
at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:264)
at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:251)
at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:528)
at org.eclipse.persistence.oxm.XMLUnmarshaller.unmarshal(XMLUnmarshaller.java:407)
at org.eclipse.persistence.jaxb.JAXBUnmarshaller.unmarshal(JAXBUnmarshaller.java:138)
at org.eclipse.persistence.testing.jaxb.JAXBTestCases.testXMLToObjectFromURL(JAXBTestCases.java:365)


Note: the o.e.p.oracle package class files are actually checked in to SVN as opposed to built during the actual build process.  From readme.txt:

"This directory contains the Oracle Extensions projects.  Unlike other directories, the class files have been checked in in addition to the source files.  This will allow people without all the jars that we depend on to use the classes they need."
Comment 1 Rick Barkhouse CLA 2010-05-20 15:16:19 EDT
Created attachment 169399 [details]
trunk/build.properties to include xmlparserv2
Comment 2 Rick Barkhouse CLA 2010-05-20 15:17:25 EDT
Created attachment 169400 [details]
moxy/build.xml to include xmlparserv2
Comment 3 Rick Barkhouse CLA 2010-05-20 15:20:09 EDT
Note that xmlparserv2.jar must be placed in <eclipselink-trunk>/../extension.oracle.lib.external
Comment 4 Rick Barkhouse CLA 2010-05-27 16:20:29 EDT
Created attachment 170263 [details]
Proposed patch.
Comment 5 Rick Barkhouse CLA 2010-05-27 16:26:34 EDT
Created attachment 170264 [details]
Proposed patch.
Comment 6 Rick Barkhouse CLA 2010-05-28 13:33:49 EDT
Fixed, reviewed by bdoughan.

Test cases modified with special behavior in the presence of Oracle XDK parser, to handle it's idiosyncrasies.
Comment 7 Eclipse Webmaster CLA 2022-06-09 10:03:26 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink