2 Replies Latest reply on Feb 3, 2012 2:38 PM by Nick Stevenson

    Possible problems with orm.xml

    Nick Stevenson Newbie

      I'm trying to deploy jbpm 5.2 on jboss 7.0.2 and keep running into the following problem :

       

      Caused by: org.hibernate.MappingException: Could not determine type for: java.util.Set, at table: ProcessInstanceInfo, for columns: [org.hibernate.mapping.Column(eventTypes)]

              at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:303) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:287) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.mapping.Property.isValid(Property.java:215) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:466) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.mapping.RootClass.validate(RootClass.java:267) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.cfg.Configuration.validate(Configuration.java:1285) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1714) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:76) [hibernate-entitymanager-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:899) [hibernate-entitymanager-4.0.0.CR2.jar:4.0.0.CR2]

              ... 80 more

       

      When I configured my personal persistence.xml and orm.xml, I referenced https://community.jboss.org/message/643956, which is really a similiar problem. This fixed by initial startup (as I changed my old ProcessInstancesWaitingForEvent query to the suggested one at the bottom of the conversation). Now, however, when Spring is deploying, I'm seeing the same issue :

       

      Caused by: javax.persistence.PersistenceException: [PersistenceUnit: org.jbpm.persistence.jpa-jboss] Unable to build EntityManagerFactory

              at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:908) [hibernate-entitymanager-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:884) [hibernate-entitymanager-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73) [hibernate-entitymanager-4.0.0.CR2.jar:4.0.0.CR2]

              at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:225) [org.springframework.orm-3.0.6.RELEASE.jar:]

              at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:310) [org.springframework.orm-3.0.6.RELEASE.jar:]

              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477) [org.springframework.beans-3.0.6.RELEASE.jar:]

              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417) [org.springframework.beans-3.0.6.RELEASE.jar:]

              ... 74 more

      Caused by: org.hibernate.MappingException: Could not determine type for: java.util.Set, at table: ProcessInstanceInfo, for columns: [org.hibernate.mapping.Column(eventTypes)]

              at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:303) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:287) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.mapping.Property.isValid(Property.java:215) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:466) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.mapping.RootClass.validate(RootClass.java:267) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.cfg.Configuration.validate(Configuration.java:1285) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1714) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:76) [hibernate-entitymanager-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:899) [hibernate-entitymanager-4.0.0.CR2.jar:4.0.0.CR2]

              ... 80 more

       

      I made sure ALL references to any orm.xml had this new query. When I searched against the jbpm 5.2 jars, I found that jbpm-persistence-jpa-5.2.0.Final.jar had its own orm.xml and JBPMorm.xml that was using the "old" query (and version=1.0). I manually changed these to use the "new" query and redeployed, but with no luck. Is this a Hibernate 4 issue? A JPA mismatch issue? Am I possible configuring Spring incorrectly?

       

      ANY information would be helpful.

       

      (Using a mysql DB with MySQL connector jar, by the way)