Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 313798 - NPE in XDKTransformer when using Oracle xmlparserv2
Summary: NPE in XDKTransformer when using Oracle xmlparserv2
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Rick Barkhouse CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-20 15:12 EDT by Rick Barkhouse CLA
Modified: 2022-06-09 10:03 EDT (History)
0 users

See Also:


Attachments
trunk/build.properties to include xmlparserv2 (8.77 KB, application/octet-stream)
2010-05-20 15:16 EDT, Rick Barkhouse CLA
no flags Details
moxy/build.xml to include xmlparserv2 (39.04 KB, application/octet-stream)
2010-05-20 15:17 EDT, Rick Barkhouse CLA
no flags Details
Proposed patch. (5.80 KB, patch)
2010-05-27 16:20 EDT, Rick Barkhouse CLA
no flags Details | Diff
Proposed patch. (5.15 KB, patch)
2010-05-27 16:26 EDT, Rick Barkhouse CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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