Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-7241

orm.xml version="2.0" doesn't work

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 3.2.0.Beta2
    • 3.2.0.M2
    • hibernate
    • None

    Description

      I'm using an orm.xml file with a JPA 2.0 declaration :
      <entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_2_0.xsd"
      version="2.0">
      </entity-mappings>

      When I create a Hibernate configuration (database connection is reused from DTP and property file is an existing one), then I get the following stacktrace. I thought that https://jira.jboss.org/browse/JBIDE-6842 had fixed this issue.

      org.hibernate.console.HibernateConsoleRuntimeException: Could not create JPA based Configuration
      Could not create JPA based Configuration
      <No message>
      java.lang.reflect.InvocationTargetException
      java.lang.reflect.InvocationTargetException: <no message>
      java.lang.reflect.InvocationTargetException
      javax.persistence.PersistenceException: [PersistenceUnit: hskaPersistence] Unable to configure EntityManagerFactory
      [PersistenceUnit: hskaPersistence] Unable to configure EntityManagerFactory
      org.hibernate.MappingException: Error while parsing file: META-INF/orm.xml
      Error while parsing file: META-INF/orm.xml
      org.hibernate.MappingException: invalid mapping
      invalid mapping
      org.xml.sax.SAXParseException: cvc-complex-type.3.1: Value '2.0' of attribute 'version' of element 'entity-mappings' is not valid with respect to the corresponding attribute use. Attribute 'version' has a fixed value of '1.0'.
      cvc-complex-type.3.1: Value '2.0' of attribute 'version' of element 'entity-mappings' is not valid with respect to the corresponding attribute use. Attribute 'version' has a fixed value of '1.0'.

      Attachments

        Activity

          People

            dgeraskov Dmitry Geraskov (Inactive)
            juergen.zimmermann Juergen Zimmermann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: