users@jaxb.java.net

unmarshalling exceptions

From: Shannon Hughes <srhughes_at_LUCENT.COM>
Date: Tue, 24 Jun 2003 10:51:45 -0600

I am having problems during the unmarshalling process. I do know that my schema is valid and well formed and I also know that the parser is parsing the xml document correctly. When I hit the unmarshalling process I am seeing the following error...any ideas?

I am passing in a SAXSource object.

org.xml.sax.SAXParseException: unexpected root element (uri:"", local:""). Expected elements are <{}ViewData>,<{}UniqueConstraint>,<{}SERVICE_OBJECT>,<{}MERGED_DATA>,<{}not>,<{}KEY>,<{}SCOPE>,<{}SVC_DATA_QUERY>,<{}View>,<{}ReqCapability>,<{}CondSatInfo>,<{}BooleanExpConstraint>,<{}DESIGN_DATA>,<{}KeyPrefixRefConstraint>,<{}DateTimeConstraint>,<{}Required>,<{}Parameter>,<{}ProvisionConstraint>,<{}Script>,<{}ReqCapabilityConstraint>,<{}CondEnumValue>,<{}else>,<{}Allowed>,<{}KeyRefConstraint>,<{}DG_TYPE_REF>,<{}OverlapConstraint>,<{}SubstringConstraint>,<{}CrossLengthConstraint>,<{}UniqueSetConstraint>,<{}SPA_DATA>,<{}SERVICE_MEASUREMENT>,<{}then>,<{}and>,<{}IM_REF>,<{}INPUT_MESSAGE>,<{}EnumValue>,<{}RequiredConstraint>,<{}ViewAttrGroup>,<{}VIEW_DATA>,<{}ViewDataRule>,<{}ViewObj>,<{}ViewAttr>,<{}RANGE>,<{}RegExpConstraint>,<{}RTDB_REF>,<{}const>,<{}TYPE_DEFINITION>,<{}SUBSCRIBER_MEASUREMENT>,<{}testcon>,<{}SERVICE_DATA>,<{}paren>,<{}DATASET_REF>,<{}ViewGroup>,<{}MaxRecConstraint
>,<{}SOKeyRefConstraint>,<{}ACCESS>,<{}RefConstraint>,<{}RangeConstraint>,<{}if>,<{}PopulationRule>,<{}CustomConstraint>,<{}SatName>,<{}DigitStrRangeConstraint>,<{}SPA_REF>,<{}TABLE>,<{}DATA_ITEM>,<{}or>,<{}LengthConstraint>,<{}NON_TABLE>,<{}SVC_KEY_QUERY>,<{}ComparisonConstraint>,<{}ViewData-Ref>,<{}DisabledConstraint>,<{}ID>,<{}ConditionalEnumConstraint>,<{}op>,<{}ConditionConstraint>,<{}FSM_REF>,<{}EnumConstraint>,<{}parm>
 at com.lucent.esae.jaxb.designdata.impl.runtime.SAXUnmarshallerHandlerImpl.startElement(SAXUnmarshallerHandlerImpl.java:121)
 at org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1289)
 at org.apache.xerces.framework.XMLParser.callStartElement(XMLParser.java:1922)
 at org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1831)
 at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:991)
 at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
 at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1208)
 at com.lucent.esae.jaxb.designdata.impl.runtime.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:142)
 at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:114)
 at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:97)
 at com.lucent.esae.dmt.sceutilities.JAXBParser.parseDMT(JAXBParser.java:100)
 at com.lucent.esae.dmt.DataTabPane.SvcTypeNode.openDataModel(SvcTypeNode.java:186)
 at com.lucent.esae.dmt.DataTabPane.SvcTypeNode.openFile(SvcTypeNode.java:152)
 at com.lucent.esae.dmt.DataTabPane.SvcTypeNode.<init>(SvcTypeNode.java:91)
 at com.lucent.esae.dmt.DataTabPane.DFileActions.openSvcFile(DFileActions.java:576)
 at com.lucent.esae.dmt.sceactions.fileactions.SpaProject.openProject(SpaProject.java:102)
 at com.lucent.esae.dmt.sceactions.fileactions.OpenProjDialog.openButton_Action(OpenProjDialog.java:343)
 at com.lucent.esae.dmt.sceactions.fileactions.OpenProjDialog.actionPerformed(OpenProjDialog.java:316)
 at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1764)
 at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1817)
 at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:419)
 at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257)
 at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
 at java.awt.Component.processMouseEvent(Component.java:5134)
 at java.awt.Component.processEvent(Component.java:4931)
 at java.awt.Container.processEvent(Container.java:1566)
 at java.awt.Component.dispatchEventImpl(Component.java:3639)
 at java.awt.Container.dispatchEventImpl(Container.java:1623)
 at java.awt.Component.dispatchEvent(Component.java:3480)
 at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450)
 at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165)
 at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
 at java.awt.Container.dispatchEventImpl(Container.java:1609)
 at java.awt.Window.dispatchEventImpl(Window.java:1590)
 at java.awt.Component.dispatchEvent(Component.java:3480)
 at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
 at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
 at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
 at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:140)
 at java.awt.Dialog.show(Dialog.java:538)
 at java.awt.Component.show(Component.java:1134)
 at java.awt.Component.setVisible(Component.java:1089)
 at com.lucent.esae.dmt.sceactions.fileactions.OpenProjDialog.<init>(OpenProjDialog.java:275)
 at com.lucent.esae.dmt.sceactions.fileactions.FileActions$OpenProjectAction.actionPerformed(FileActions.java:225)
 at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1764)
 at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1817)
 at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:419)
 at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257)
 at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
 at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:227)
 at java.awt.Component.processMouseEvent(Component.java:5134)
 at java.awt.Component.processEvent(Component.java:4931)
 at java.awt.Container.processEvent(Container.java:1566)
 at java.awt.Component.dispatchEventImpl(Component.java:3639)
 at java.awt.Container.dispatchEventImpl(Container.java:1623)
 at java.awt.Component.dispatchEvent(Component.java:3480)
 at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450)
 at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165)
 at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
 at java.awt.Container.dispatchEventImpl(Container.java:1609)
 at java.awt.Window.dispatchEventImpl(Window.java:1590)
 at java.awt.Component.dispatchEvent(Component.java:3480)
 at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
 at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
 at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
 at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
--------------- linked to ------------------
javax.xml.bind.UnmarshalException
 - with linked exception:
[org.xml.sax.SAXParseException: unexpected root element (uri:"", local:""). Expected elements are <{}ViewData>,<{}UniqueConstraint>,<{}SERVICE_OBJECT>,<{}MERGED_DATA>,<{}not>,<{}KEY>,<{}SCOPE>,<{}SVC_DATA_QUERY>,<{}View>,<{}ReqCapability>,<{}CondSatInfo>,<{}BooleanExpConstraint>,<{}DESIGN_DATA>,<{}KeyPrefixRefConstraint>,<{}DateTimeConstraint>,<{}Required>,<{}Parameter>,<{}ProvisionConstraint>,<{}Script>,<{}ReqCapabilityConstraint>,<{}CondEnumValue>,<{}else>,<{}Allowed>,<{}KeyRefConstraint>,<{}DG_TYPE_REF>,<{}OverlapConstraint>,<{}SubstringConstraint>,<{}CrossLengthConstraint>,<{}UniqueSetConstraint>,<{}SPA_DATA>,<{}SERVICE_MEASUREMENT>,<{}then>,<{}and>,<{}IM_REF>,<{}INPUT_MESSAGE>,<{}EnumValue>,<{}RequiredConstraint>,<{}ViewAttrGroup>,<{}VIEW_DATA>,<{}ViewDataRule>,<{}ViewObj>,<{}ViewAttr>,<{}RANGE>,<{}RegExpConstraint>,<{}RTDB_REF>,<{}const>,<{}TYPE_DEFINITION>,<{}SUBSCRIBER_MEASUREMENT>,<{}testcon>,<{}SERVICE_DATA>,<{}paren>,<{}DATASET_REF>,<{}ViewGroup>,<{}MaxRecConstrain
 t>,<{}SOKeyRefConstraint>,<{}ACCESS>,<{}RefConstraint>,<{}RangeConstraint>,<{}if>,<{}PopulationRule>,<{}CustomConstraint>,<{}SatName>,<{}DigitStrRangeConstraint>,<{}SPA_REF>,<{}TABLE>,<{}DATA_ITEM>,<{}or>,<{}LengthConstraint>,<{}NON_TABLE>,<{}SVC_KEY_QUERY>,<{}ComparisonConstraint>,<{}ViewData-Ref>,<{}DisabledConstraint>,<{}ID>,<{}ConditionalEnumConstraint>,<{}op>,<{}ConditionConstraint>,<{}FSM_REF>,<{}EnumConstraint>,<{}parm>]
 at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:298)
 at com.lucent.esae.jaxb.designdata.impl.runtime.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:146)
 at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:114)
 at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:97)
 at com.lucent.esae.dmt.sceutilities.JAXBParser.parseDMT(JAXBParser.java:100)
 at com.lucent.esae.dmt.DataTabPane.SvcTypeNode.openDataModel(SvcTypeNode.java:186)
 at com.lucent.esae.dmt.DataTabPane.SvcTypeNode.openFile(SvcTypeNode.java:152)
 at com.lucent.esae.dmt.DataTabPane.SvcTypeNode.<init>(SvcTypeNode.java:91)
 at com.lucent.esae.dmt.DataTabPane.DFileActions.openSvcFile(DFileActions.java:576)
 at com.lucent.esae.dmt.sceactions.fileactions.SpaProject.openProject(SpaProject.java:102)
 at com.lucent.esae.dmt.sceactions.fileactions.OpenProjDialog.openButton_Action(OpenProjDialog.java:343)
 at com.lucent.esae.dmt.sceactions.fileactions.OpenProjDialog.actionPerformed(OpenProjDialog.java:316)
 at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1764)
 at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1817)
 at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:419)
 at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257)
 at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
 at java.awt.Component.processMouseEvent(Component.java:5134)
 at java.awt.Component.processEvent(Component.java:4931)
 at java.awt.Container.processEvent(Container.java:1566)
 at java.awt.Component.dispatchEventImpl(Component.java:3639)
 at java.awt.Container.dispatchEventImpl(Container.java:1623)
 at java.awt.Component.dispatchEvent(Component.java:3480)
 at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450)
 at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165)
 at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
 at java.awt.Container.dispatchEventImpl(Container.java:1609)
 at java.awt.Window.dispatchEventImpl(Window.java:1590)
 at java.awt.Component.dispatchEvent(Component.java:3480)
 at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
 at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
 at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
 at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:140)
 at java.awt.Dialog.show(Dialog.java:538)
 at java.awt.Component.show(Component.java:1134)
 at java.awt.Component.setVisible(Component.java:1089)
 at com.lucent.esae.dmt.sceactions.fileactions.OpenProjDialog.<init>(OpenProjDialog.java:275)
 at com.lucent.esae.dmt.sceactions.fileactions.FileActions$OpenProjectAction.actionPerformed(FileActions.java:225)
 at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1764)
 at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1817)
 at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:419)
 at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257)
 at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
 at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:227)
 at java.awt.Component.processMouseEvent(Component.java:5134)
 at java.awt.Component.processEvent(Component.java:4931)
 at java.awt.Container.processEvent(Container.java:1566)
 at java.awt.Component.dispatchEventImpl(Component.java:3639)
 at java.awt.Container.dispatchEventImpl(Container.java:1623)
 at java.awt.Component.dispatchEvent(Component.java:3480)
 at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450)
 at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165)
 at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
 at java.awt.Container.dispatchEventImpl(Container.java:1609)
 at java.awt.Window.dispatchEventImpl(Window.java:1590)
 at java.awt.Component.dispatchEvent(Component.java:3480)
 at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
 at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
 at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
 at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)