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

Bug 329674

Summary: two failures in test-jaxb with jdk1.6 and xdkplatform
Product: z_Archived Reporter: Praba Vijayaratnam <prabaharan.vijayaratnam>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: david.twelves, eclipselink.oxm-inbox
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Proposed patch.
none
Proposed patch. none

Description Praba Vijayaratnam CLA 2010-11-08 09:10:55 EST
Test configuration:
===================
Ant target: test-jaxb
JDK: jdk1.6.0_22
Ant parameters:
-Dxml.platform=org.eclipse.persistence.platform.xml.xdk.XDKPlatform
-Dxml.parser.jar=xmlparserv2.jar

Following two tests failed:
==========================
(1) org.eclipse.persistence.testing.jaxb.dynamic.DynamicJAXBFromOXMTestCases.Dynamic JAXB: OXM: testXmlSchemaDefaults

Attribute should not have namespace prefix.

junit.framework.AssertionFailedError: Attribute should not have namespace prefix.
at org.eclipse.persistence.testing.jaxb.dynamic.DynamicJAXBFromOXMTestCases.testXmlSchemaDefaults(DynamicJAXBFromOXMTestCases.java:203)

==============
(2) org.eclipse.persistence.testing.jaxb.xmlmarshaller.NoSchemaRefTestCases.testValidateNoSchemaReference

javax.xml.bind.ValidationException
- with linked exception:
[Exception [EclipseLink-25005] (Eclipse Persistence Services - 2.2.0.v20101106-r8479): org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: An error occurred validating the object
Internal Exception: Exception [EclipseLink-27005] (Eclipse Persistence Services - 2.2.0.v20101106-r8479): org.eclipse.persistence.platform.xml.XMLPlatformException
Exception Description: An error occurred while validating the document.
Internal Exception: Exception [EclipseLink-25012] (Eclipse Persistence Services - 2.2.0.v20101106-r8479): org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: An error occurred resolving the XML Schema.
Internal Exception: java.lang.NullPointerException]
at org.eclipse.persistence.jaxb.JAXBValidator.validate(JAXBValidator.java:77)
at org.eclipse.persistence.testing.jaxb.xmlmarshaller.NoSchemaRefTestCases.testValidateNoSchemaReference(NoSchemaRefTestCases.java:48)
Caused by: Exception [EclipseLink-25005] (Eclipse Persistence Services - 2.2.0.v20101106-r8479): org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: An error occurred validating the object
Internal Exception: Exception [EclipseLink-27005] (Eclipse Persistence Services - 2.2.0.v20101106-r8479): org.eclipse.persistence.platform.xml.XMLPlatformException
Exception Description: An error occurred while validating the document.
Internal Exception: Exception [EclipseLink-25012] (Eclipse Persistence Services - 2.2.0.v20101106-r8479): org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: An error occurred resolving the XML Schema.
Internal Exception: java.lang.NullPointerException
at org.eclipse.persistence.exceptions.XMLMarshalException.validateException(XMLMarshalException.java:103)
at org.eclipse.persistence.oxm.XMLValidator.validate(XMLValidator.java:101)
at org.eclipse.persistence.jaxb.JAXBValidator.validate(JAXBValidator.java:75)
Caused by: Exception [EclipseLink-27005] (Eclipse Persistence Services - 2.2.0.v20101106-r8479): org.eclipse.persistence.platform.xml.XMLPlatformException
Exception Description: An error occurred while validating the document.
Internal Exception: Exception [EclipseLink-25012] (Eclipse Persistence Services - 2.2.0.v20101106-r8479): org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: An error occurred resolving the XML Schema.
Internal Exception: java.lang.NullPointerException
at org.eclipse.persistence.platform.xml.XMLPlatformException.xmlPlatformValidationException(XMLPlatformException.java:77)
at org.eclipse.persistence.platform.xml.xdk.XDKPlatform.validate(XDKPlatform.java:256)
at org.eclipse.persistence.oxm.XMLValidator.validate(XMLValidator.java:99)
Caused by: Exception [EclipseLink-25012] (Eclipse Persistence Services - 2.2.0.v20101106-r8479): org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: An error occurred resolving the XML Schema.
Internal Exception: java.lang.NullPointerException
at org.eclipse.persistence.exceptions.XMLMarshalException.errorResolvingXMLSchema(XMLMarshalException.java:152)
at org.eclipse.persistence.oxm.schema.XMLSchemaClassPathReference.getURL(XMLSchemaClassPathReference.java:47)
at org.eclipse.persistence.platform.xml.xdk.XDKPlatform.validate(XDKPlatform.java:252)
Caused by: java.lang.NullPointerException
at sun.misc.MetaIndex.mayContain(MetaIndex.java:225)
at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:747)
at sun.misc.URLClassPath.getResource(URLClassPath.java:169)
at sun.misc.URLClassPath.getResource(URLClassPath.java:221)
at java.lang.ClassLoader.getBootstrapResource(ClassLoader.java:1151)
at java.lang.ClassLoader.getResource(ClassLoader.java:1000)
at java.lang.ClassLoader.getResource(ClassLoader.java:998)
at java.lang.ClassLoader.getResource(ClassLoader.java:998)
at org.eclipse.persistence.oxm.schema.XMLSchemaClassPathReference.getURL(XMLSchemaClassPathReference.java:45)
Comment 1 Rick Barkhouse CLA 2010-12-06 15:57:37 EST
Created attachment 184657 [details]
Proposed patch.
Comment 2 Rick Barkhouse CLA 2010-12-06 16:20:49 EST
Created attachment 184660 [details]
Proposed patch.
Comment 3 Rick Barkhouse CLA 2010-12-06 16:40:28 EST
Fixed, reviewed by bdoughan.

Also includes a temporary workaround for bug 331946.
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:26:43 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink