[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| 
[eclipselink-users] XML Object Reference Mapping
 | 
Hello
I have a problem (stacktrace) using the XML Object Reference Mapping in 
the workbench tool from EclipseLink 1.0M6.
This is my xml data:
<CatalogProduct code="123JI" name="BSN Lamp" type="Lamp" familyCode="BSN-BC4H">
.....
</CatalogProduct>
<IndustrialFamilies>
 <IndustrialFamily code="BSN-BC4H" name="Family Lamps" productCategoryCode="Lamps"/>
</IndustrialFamilies>
I mapped this in the workbench as an XML Object Reference with Source 
Xpath=@familyCode and Target Xpath=@code.
In the eclipselink documentation I read that XML Object Reference is 
only supported in Java and not in the workbench. Is this still the case?
Running an unmarshall application in Eclipse, results in the following 
stacktrace:
javax.xml.bind.UnmarshalException
- with linked exception:
[java.lang.ArrayIndexOutOfBoundsException: -1]
	at org.eclipse.persistence.jaxb.JAXBUnmarshaller.unmarshal(JAXBUnmarshaller.java:102)
	at com.philips.lighting.research.jaxb.UnmarshallXml.main(UnmarshallXml.java:31)
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
	at java.util.Vector.setElementAt(Unknown Source)
	at org.eclipse.persistence.oxm.mappings.XMLObjectReferenceMapping.buildReference(XMLObjectReferenceMapping.java:147)
	at org.eclipse.persistence.internal.oxm.XMLObjectReferenceMappingNodeValue.attribute(XMLObjectReferenceMappingNodeValue.java:91)
	at org.eclipse.persistence.oxm.record.UnmarshalRecord.startElement(UnmarshalRecord.java:600)
	at org.eclipse.persistence.internal.oxm.XMLRelationshipMappingNodeValue.processChild(XMLRelationshipMappingNodeValue.java:72)
	at org.eclipse.persistence.internal.oxm.XMLCompositeCollectionMappingNodeValue.startElement(XMLCompositeCollectionMappingNodeValue.java:89)
	at org.eclipse.persistence.oxm.record.UnmarshalRecord.startElement(UnmarshalRecord.java:558)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
	at org.eclipse.persistence.internal.oxm.record.XMLReader.parse(XMLReader.java:99)
	at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:216)
	at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:193)
	at org.eclipse.persistence.oxm.XMLUnmarshaller.unmarshal(XMLUnmarshaller.java:274)
	at org.eclipse.persistence.jaxb.JAXBUnmarshaller.unmarshal(JAXBUnmarshaller.java:100)
	... 1 more