3 Replies Latest reply on Mar 4, 2010 9:15 AM by Max Rydahl Andersen

    Support for JPA 2.0 resp. Hibernate 3.5

    Juergen Zimmermann Master
      When will JPA 2.0 resp. Hibernate 3.5 be supported by Hibernate Console? With 3.3.0...-CR2 these features are causing trouble:
      * Composite primary keys can be created in a different (and more readable) way
      * Collection, List etc. of primitive types like Integer
      * Queries using the TYPE keyword

      When I try to use features of JPA 2.0 then the Hibernate SessionFactory cannot be created
        • 1. Re: Support for JPA 2.0 resp. Hibernate 3.5
          Denis Golovin Master
          Do you have any exceptions in Eclipse "Error Log" View?
          • 2. Re: Support for JPA 2.0 resp. Hibernate 3.5
            Juergen Zimmermann Master

            See the stacktrace below. The relevant attribute definition is as follows:



            public abstract class Kunde implements java.io.Serializable {...}


            public class Privatkunde extends Kunde {


               @ElementCollection   // JPA 2.0
            joinColumns=@JoinColumn(name="kunde_fk"))  // JPA 2.0
               private List<Integer> hobbiesDB;


            The stacktrace:

            org.hibernate.MappingException: Could not determine type for: java.util.List, at table: kunde, for columns: [org.hibernate.mapping.Column(hobby_fk)]
            at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:292)
            at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:276)
            at org.hibernate.mapping.Property.isValid(Property.java:207)
            at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:458)
            at org.hibernate.mapping.SingleTableSubclass.validate(SingleTableSubclass.java:66)
            at org.hibernate.cfg.Configuration.validate(Configuration.java:1149)
            at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1334)
            at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
            at org.hibernate.console.ConsoleConfiguration$4.execute(ConsoleConfiguration.java:554)
            at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)
            at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:98)
            at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:549)
            at org.hibernate.eclipse.console.workbench.LazySessionFactoryAdapter.getChildren(LazySessionFactoryAdapter.java:43)
            at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:100)
            at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:106)
            at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:234)
            at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

            • 3. Re: Support for JPA 2.0 resp. Hibernate 3.5
              Max Rydahl Andersen Master

              Right now we use Hibernate 3.3 in JBoss Tools 3.1.


              That means any 3.5 specific feature won't work in the eclipse plugins.


              In JBoss Tools 3.next we will have to somehow separate the plugins from the actual execution of users mappings to allow support for multiple hibernate runtimes so the tools can work with both Hibernate 3.2, 3.3 and 3.5 projects.


              When that will happen is not certain  - external contributions will most definitly speed it up