[hibernate-issues] [Hibernate-JIRA] Commented: (EJB-279) Entity Listener defined in orm.xml does not work

Emmanuel Bernard (JIRA) noreply at atlassian.com
Fri Mar 23 10:50:09 EDT 2007


    [ http://opensource.atlassian.com/projects/hibernate/browse/EJB-279?page=comments#action_26541 ] 

Emmanuel Bernard commented on EJB-279:
--------------------------------------

No it works for me

org.hibernate.MappingException: Error while parsing file: META-INF/orm.xml
javax.persistence.PersistenceException: org.hibernate.MappingException: Error while parsing file: META-INF/orm.xml
        at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:258)
        at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:120)
        at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
        at org.hibernate.ejb.test.PackagedEntityManagerTest.testListenersDefaultPar(PackagedEntityManagerTest.java:80)
Caused by: org.hibernate.MappingException: Error while parsing file: META-INF/orm.xml
        at org.hibernate.ejb.Ejb3Configuration.addClassesToSessionFactory(Ejb3Configuration.java:967)
        at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:788)
        at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:186)
        at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:246)
        ... 18 more
Caused by: org.hibernate.MappingException: invalid mapping
        at org.hibernate.cfg.AnnotationConfiguration.addInputStream(AnnotationConfiguration.java:729)
        at org.hibernate.ejb.Ejb3Configuration.addClassesToSessionFactory(Ejb3Configuration.java:959)
        ... 21 more
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'garbage'. One of '{"http://java.sun.com/xml/ns/persistence/orm":entity, "http://java.sun.com/xml/ns/persistence/orm":embeddable}' is expected.
        at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
        at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
        at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
        at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
        at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
        at org.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.dom4j.io.SAXReader.read(SAXReader.java:465)
        at org.hibernate.cfg.AnnotationConfiguration.addInputStream(AnnotationConfiguration.java:725)
        ... 22 more

It sounds more like youf files are ignored (or absent) for whatever reason

> Entity Listener defined in orm.xml does not work
> ------------------------------------------------
>
>          Key: EJB-279
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-279
>      Project: Hibernate Entity Manager
>         Type: Bug

>   Components: EntityManager
>     Versions: 3.3.0.ga
>  Environment: Hibernate core 3.2.2.GA, Hibernate Annotations 3.3.0.GA, Hibernate Entity Manager 3.3.0.GA, Spring 2.0.3, Tomcat 5.5.20, Oracle 9i
>     Reporter: Gary Ip

>
>
> A default Entity Listener defined in orm.xml (this EJB3 deployment descriptor) worked in HEM and HAN 3.2.1 but not 3.3.0
> http://forums.hibernate.org/viewtopic.php?t=972352&sid=95588b2c2391806158e23a814f7babdc

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira




More information about the hibernate-issues mailing list