<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
MappingException "Could not determine type for: pg-uuid" Thrown When Opening Session Factory
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/dweinhardt">Dirk Weinhardt</a> in <i>JBoss Tools</i> - <a href="https://community.jboss.org/message/824799#824799">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Hi Community,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>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.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Error Message: org.hibernate.MappingException: Could not determine type for: pg-uuid, at table: roles, for columns: [org.hibernate.mapping.Column(id)]</p><p>  </p><p>The affected ID property of the roles entity is defined as:</p><p>  </p><p>          @Id</p><p>          @Type(type = "pg-uuid")</p><p>          @GeneratedValue(generator="hibernate-uuid")</p><p>          @GenericGenerator(name="hibernate-uuid", strategy="uuid2")</p><p>          protected UUID id;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>We are not experiencing this issue when using the class and configuration with Hibernate 4.1.8 in a Spring MVC application.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>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?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Any help is highly appreciated.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Thank you,</p><p><br/>Dirk</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>  </p><p>Full Stack Trace;</p><p>  </p><p>org.hibernate.MappingException: Could not determine type for: pg-uuid, at table: roles, for columns: [org.hibernate.mapping.Column(id)]</p><p>          at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:291)</p><p>          at org.hibernate.cfg.Configuration$1.getIdentifierType(Configuration.java:2217)</p><p>          at org.hibernate.type.EntityType.getIdentifierType(EntityType.java:553)</p><p>          at org.hibernate.type.EntityType.getIdentifierOrUniqueKeyType(EntityType.java:578)</p><p>          at org.hibernate.type.ManyToOneType.getColumnSpan(ManyToOneType.java:120)</p><p>          at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:275)</p><p>          at org.hibernate.mapping.ToOne.isValid(ToOne.java:105)</p><p>          at org.hibernate.mapping.Property.isValid(Property.java:217)</p><p>          at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:464)</p><p>          at org.hibernate.mapping.SingleTableSubclass.validate(SingleTableSubclass.java:66)</p><p>          at org.hibernate.cfg.Configuration.validate(Configuration.java:1193)</p><p>          at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1378)</p><p>          at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:954)</p><p>          at org.hibernate.console.ConsoleConfiguration$5.execute(ConsoleConfiguration.java:278)</p><p>          at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)</p><p>          at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:107)</p><p>          at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:273)</p><p>          at org.hibernate.eclipse.console.workbench.LazySessionFactoryAdapter.getChildren(LazySessionFactoryAdapter.java:43)</p><p>          at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:100)</p><p>          at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:106)</p><p>          at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:235)</p><p>          at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/824799#824799">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Tools at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2128">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>