org.apache.openejb.OpenEJBException: Cannot unmarshall the openejb-cmp-orm.xml file: jar:f ile:/E:/Softwares/apache-tomee-1.5.1-plus/apache-tomee-plus-1.5.1/apps/EntityBean.jar!/MET A-INF/openejb-cmp-orm.xml: unexpected element (uri:"http://java.sun.com/xml/ns/javaee", lo cal:"entity"). Expected elements are <{http://java.sun.com/xml/ns/persistence/orm}package> ,<{http://java.sun.com/xml/ns/persistence/orm}sequence-generator>,<{http://java.sun.com/xm l/ns/persistence/orm}mapped-superclass>,<{http://java.sun.com/xml/ns/persistence/orm}named -query>,<{http://java.sun.com/xml/ns/persistence/orm}access>,<{http://java.sun.com/xml/ns/ persistence/orm}table-generator>,<{http://java.sun.com/xml/ns/persistence/orm}persistence- unit-metadata>,<{http://java.sun.com/xml/ns/persistence/orm}entity>,<{http://java.sun.com/ xml/ns/persistence/orm}embeddable>,<{http://java.sun.com/xml/ns/persistence/orm}catalog>,< {http://java.sun.com/xml/ns/persistence/orm}named-native-query>,<{http://java.sun.com/xml/ ns/persistence/orm}sql-result-set-mapping>,<{http://java.sun.com/xml/ns/persistence/orm}sc hema>,<{http://java.sun.com/xml/ns/persistence/orm}description>

openejb-users | Bibhuti | 4 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Re: Unmarshalling error when I rename my mapping file to make sure at runtime this mapping is referred not the generated one.

    openejb-users | 4 years ago | Bibhuti
    org.apache.openejb.OpenEJBException: Cannot unmarshall the openejb-cmp-orm.xml file: jar:f ile:/E:/Softwares/apache-tomee-1.5.1-plus/apache-tomee-plus-1.5.1/apps/EntityBean.jar!/MET A-INF/openejb-cmp-orm.xml: unexpected element (uri:"http://java.sun.com/xml/ns/javaee", lo cal:"entity"). Expected elements are <{http://java.sun.com/xml/ns/persistence/orm}package> ,<{http://java.sun.com/xml/ns/persistence/orm}sequence-generator>,<{http://java.sun.com/xm l/ns/persistence/orm}mapped-superclass>,<{http://java.sun.com/xml/ns/persistence/orm}named -query>,<{http://java.sun.com/xml/ns/persistence/orm}access>,<{http://java.sun.com/xml/ns/ persistence/orm}table-generator>,<{http://java.sun.com/xml/ns/persistence/orm}persistence- unit-metadata>,<{http://java.sun.com/xml/ns/persistence/orm}entity>,<{http://java.sun.com/ xml/ns/persistence/orm}embeddable>,<{http://java.sun.com/xml/ns/persistence/orm}catalog>,< {http://java.sun.com/xml/ns/persistence/orm}named-native-query>,<{http://java.sun.com/xml/ ns/persistence/orm}sql-result-set-mapping>,<{http://java.sun.com/xml/ns/persistence/orm}sc hema>,<{http://java.sun.com/xml/ns/persistence/orm}description>
  2. 0

    Re: Unmarshalling error when I rename my mapping file to make sure at runtime this mapping is referred not the generated one.

    openejb-users | 4 years ago | Bibhuti
    org.apache.openejb.OpenEJBException: Cannot unmarshall the openejb-cmp-orm.xml file: jar:f ile:/E:/Softwares/apache-tomee-1.5.1-plus/apache-tomee-plus-1.5.1/apps/EntityBean.jar!/MET A-INF/openejb-cmp-orm.xml: unexpected element (uri:"http://java.sun.com/xml/ns/javaee", lo cal:"entity"). Expected elements are <{http://java.sun.com/xml/ns/persistence/orm}package> ,<{http://java.sun.com/xml/ns/persistence/orm}sequence-generator>,<{http://java.sun.com/xm l/ns/persistence/orm}mapped-superclass>,<{http://java.sun.com/xml/ns/persistence/orm}named -query>,<{http://java.sun.com/xml/ns/persistence/orm}access>,<{http://java.sun.com/xml/ns/ persistence/orm}table-generator>,<{http://java.sun.com/xml/ns/persistence/orm}persistence- unit-metadata>,<{http://java.sun.com/xml/ns/persistence/orm}entity>,<{http://java.sun.com/ xml/ns/persistence/orm}embeddable>,<{http://java.sun.com/xml/ns/persistence/orm}catalog>,< {http://java.sun.com/xml/ns/persistence/orm}named-native-query>,<{http://java.sun.com/xml/ ns/persistence/orm}sql-result-set-mapping>,<{http://java.sun.com/xml/ns/persistence/orm}sc hema>,<{http://java.sun.com/xml/ns/persistence/orm}description>
  3. 0

    Re: Unmarshalling error when I rename my mapping file to make sure at runtime this mapping is referred not the generated one.

    openejb-users | 4 years ago | Bibhuti
    orm.xml: unexpected element (uri:"http://java.sun.com/xml/ns/javaee", lo cal:"entity"). Expected elements are <{http://java.sun.com/xml/ns/persistence/orm}package> ,<{http://java.sun.com/xml/ns/persistence/orm}sequence-generator>,<{http://java.sun.com/xm l/ns/persistence/orm}mapped-superclass>,<{http://java.sun.com/xml/ns/persistence/orm}named -query>,<{http://java.sun.com/xml/ns/persistence/orm}access>,<{http://java.sun.com/xml/ns/ persistence/orm}table-generator>,<{http://java.sun.com/xml/ns/persistence/orm}persistence- unit-metadata>,<{http://java.sun.com/xml/ns/persistence/orm}entity>,<{http://java.sun.com/ xml/ns/persistence/orm}embeddable>,<{http://java.sun.com/xml/ns/persistence/orm}catalog>,< {http://java.sun.com/xml/ns/persistence/orm}named-native-query>,<{http://java.sun.com/xml/ ns/persistence/orm}sql-result-set-mapping>,<{http://java.sun.com/xml/ns/persistence/orm}sc hema>,<{http://java.sun.com/xml/ns/persistence/orm}description>
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Unmarshaling the Body from SOAP | Java.net

    java.net | 1 year ago
    javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"shipTo"). Expected elements are <{}address>,<{}comment>,<{}purchaseOrder>,<{}purchaseOrders>
  6. 0

    TomEE Users - SSL install config errors.

    nabble.com | 7 months ago
    javax.xml.bind.UnmarshalException: unexpected element (uri:" ", local:"role"). Expected elements are <{ }Service>,<{ }Resource>,<{ }JndiProvider>,<{ }Connector>,<{ }Container>

  1. davidvanlaatum 1 times, last 11 months ago
8 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. javax.xml.bind.UnmarshalException

    unexpected element (uri:"http://java.sun.com /xml/ns/javaee", local:"entity"). Expected elements are <{http://java.sun.com/xml/ns/persi stence/orm}package>,<{http://java.sun.com/xml/ns/persistence/orm}sequence-generator>,<{htt p://java.sun.com/xml/ns/persistence/orm}mapped-superclass>,<{http://java.sun.com/xml/ns/pe rsistence/orm}named-query>,<{http://java.sun.com/xml/ns/persistence/orm}access>,<{http://j ava.sun.com/xml/ns/persistence/orm}table-generator>,<{http://java.sun.com/xml/ns/persisten ce/orm}persistence-unit-metadata>,<{http://java.sun.com/xml/ns/persistence/orm}entity>,<{h ttp://java.sun.com/xml/ns/persistence/orm}embeddable>,<{http://java.sun.com/xml/ns/persist ence/orm}catalog>,<{http://java.sun.com/xml/ns/persistence/orm}named-native-query>,<{http: //java.sun.com/xml/ns/persistence/orm}sql-result-set-mapping>,<{http://java.sun.com/xml/ns /persistence/orm}schema>,<{http://java.sun.com/xml/ns/persistence/orm}description>

    at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent()
  2. Old JAXB Runtime
    SAXConnector.startElement
    1. com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:662)
    2. com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:258)
    3. com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:253)
    4. com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElement(Loader.java:120)
    5. com.sun.xml.bind.v2.runtime.unmarshaller.Loader.childElement(Loader.java:105)
    6. com.sun.xml.bind.v2.runtime.unmarshaller.StructureLoader.childElement(StructureLoader.java:262)
    7. com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:498)
    8. com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:480)
    9. com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java:150)
    9 frames
  3. Java RT
    XMLFilterImpl.startElement
    1. org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:527)
    1 frame
  4. OpenEJB :: Container :: Java EE
    JaxbJavaee$JavaeeNamespaceFilter.startElement
    1. org.apache.openejb.jee.JaxbJavaee$JavaeeNamespaceFilter.startElement(JaxbJavaee.java:284)
    1 frame
  5. Xerces2-j
    SAXParserImpl$JAXPSAXParser.parse
    1. org.apache.xerces.parsers.AbstractSAXParser.startElement(UnknownSource)
    2. org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(UnknownSource)
    3. org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    4. org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(UnknownSource)
    5. org.apache.xerces.parsers.XML11Configuration.parse(UnknownSource)
    6. org.apache.xerces.parsers.XML11Configuration.parse(UnknownSource)
    7. org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    8. org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    9. org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(UnknownSource)
    9 frames
  6. Java RT
    XMLFilterImpl.parse
    1. org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333)
    1 frame
  7. Old JAXB Runtime
    UnmarshallerImpl.unmarshal
    1. com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:218)
    2. com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:196)
    3. com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:247)
    3 frames
  8. OpenEJB :: Container :: Java EE
    JaxbJavaee.unmarshalJavaee
    1. org.apache.openejb.jee.JaxbJavaee.unmarshalJavaee(JaxbJavaee.java:132)
    1 frame
  9. OpenEJB :: OSGi :: Core
    OpenEJB.init
    1. org.apache.openejb.config.ReadDescriptors.readCmpOrm(ReadDescriptors.java:468)
    2. org.apache.openejb.config.ReadDescriptors.deploy(ReadDescriptors.java:95)
    3. org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:338)
    4. org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:827)
    5. org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:674)
    6. org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:446)
    7. org.apache.openejb.assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java:364)
    8. org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:343)
    9. org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:144)
    10. org.apache.openejb.OpenEJB.init(OpenEJB.java:290)
    10 frames
  10. OpenEJB :: TomEE :: Catalina
    ServerListener.lifecycleEvent
    1. org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:233)
    2. org.apache.tomee.catalina.TomcatLoader.init(TomcatLoader.java:130)
    3. org.apache.tomee.catalina.ServerListener.lifecycleEvent(ServerListener.java:121)
    3 frames
  11. Glassfish Core
    Catalina.load
    1. org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    2. org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
    3. org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
    4. org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110)
    5. org.apache.catalina.startup.Catalina.load(Catalina.java:633)
    6. org.apache.catalina.startup.Catalina.load(Catalina.java:658)
    6 frames
  12. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:597)
    4 frames
  13. Glassfish Core
    Bootstrap.main
    1. org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:281)
    2. org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)
    2 frames