[jboss-user] [JBoss Tools] - MappingException "Could not determine type for: pg-uuid" Thrown When Opening Session Factory

Dirk Weinhardt do-not-reply at jboss.com
Tue Jun 25 10:32:50 EDT 2013


Dirk Weinhardt [https://community.jboss.org/people/dweinhardt] created the discussion

"MappingException "Could not determine type for: pg-uuid" Thrown When Opening Session Factory"

To view the discussion, visit: https://community.jboss.org/message/824799#824799

--------------------------------------------------------------
Hi Community,

I am trying to use Hibernate Tools within Eclipse (Eclipse Juno Service Release 2 on Windows 7 x64, PostgreSQL 9.2 on Debian 6). I was able to set up a Hibernate Configuration. All my data objects are listed under the Configuration node as well as the database can be browsed under the Database node. But a MappingException is thrown for a pg-uuid ID column when trying to open a Session Factory.

Error Message: org.hibernate.MappingException: Could not determine type for: pg-uuid, at table: roles, for columns: [org.hibernate.mapping.Column(id)]

The affected ID property of the roles entity is defined as:

          @Id
          @Type(type = "pg-uuid")
          @GeneratedValue(generator="hibernate-uuid")
          @GenericGenerator(name="hibernate-uuid", strategy="uuid2")
          protected UUID id;

We are not experiencing this issue when using the class and configuration with Hibernate 4.1.8 in a Spring MVC application.

What could we be doing wrong? Is any additional information required to understand this issue? Would this problem better be reported as a bug to the Hibernate Tools team?

Any help is highly appreciated.

Thank you,

Dirk




Full Stack Trace;

org.hibernate.MappingException: Could not determine type for: pg-uuid, at table: roles, for columns: [org.hibernate.mapping.Column(id)]
          at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:291)
          at org.hibernate.cfg.Configuration$1.getIdentifierType(Configuration.java:2217)
          at org.hibernate.type.EntityType.getIdentifierType(EntityType.java:553)
          at org.hibernate.type.EntityType.getIdentifierOrUniqueKeyType(EntityType.java:578)
          at org.hibernate.type.ManyToOneType.getColumnSpan(ManyToOneType.java:120)
          at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:275)
          at org.hibernate.mapping.ToOne.isValid(ToOne.java:105)
          at org.hibernate.mapping.Property.isValid(Property.java:217)
          at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:464)
          at org.hibernate.mapping.SingleTableSubclass.validate(SingleTableSubclass.java:66)
          at org.hibernate.cfg.Configuration.validate(Configuration.java:1193)
          at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1378)
          at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:954)
          at org.hibernate.console.ConsoleConfiguration$5.execute(ConsoleConfiguration.java:278)
          at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)
          at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:107)
          at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:273)
          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:235)
          at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/824799#824799]

Start a new discussion in JBoss Tools at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2128]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130625/a89de4a8/attachment-0001.html 


More information about the jboss-user mailing list