-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: hbm2ddl - Could not determine type for custom UserType
PostPosted: Fri Sep 09, 2005 10:43 am 
Red Hat Associate
Red Hat Associate

Joined: Mon Aug 16, 2004 11:14 am
Posts: 253
Location: Raleigh, NC
Hi All,

The fact that this isn't listed in the forum anywhere leads me to believe I'm probably missing something silly. Since using H3 (it seems), I have not been able to generate DDL from my mapping files. In particular, it has trouble with my user types. I tried both the "legacy" schema export task, and the 3.1.alpha5 hibernatetool. Both report the same error. These mapping files work perfectly in my application, and the hibernate.cfg.xml file works in the Hibernate Console.

Any ideas?

-Chris

Hibernate version:
3.0.5

Mapping documents:
Code:
<hibernate-mapping>
   <class name="com.comerxia.core.model.Component" table="COMPONENT">

      <id name="id" column="ID" type="java.lang.Long">
         <generator class="sequence">
            <param name="sequence">COMPONENT_SEQ</param>
         </generator>
      </id>

      <property name="content" type="java.lang.String" update="true"
         insert="true" column="CONTENT" length="50" />

      <property name="activeIngredient" type="java.lang.Boolean"
         update="true" insert="true" column="ACTIVEINGREDIENTFLAG" />

      <property name="units"
         type="com.comerxia.core.dao.hibernate.type.ComponentUnitsEnumUserType"
         update="true" insert="true" column="UNITS" />

      <property name="amountPerServing" type="java.lang.Double"
         update="true" insert="true" column="AMOUNTPERSERVING" />

      <property name="dateCreated" type="java.util.Date"
         update="false" insert="false" column="DATECREATED" />
   </class>
</hibernate-mapping>


Name and version of the database you are using:
Oracle 10g

Debug level Hibernate log excerpt:
Code:
BUILD FAILED
C:\workspace\comerxia-core\build.xml:154: org.hibernate.MappingException: Could not determine type for: com.comerxia.core.dao.hibernate.type.ComponentUnitsEnumUserType, for columns: [org.hibernate.mapping.Column(UNITS)]


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 09, 2005 3:34 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
to determine the type of the usertype the usertype class must be in your classpath...

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 09, 2005 4:19 pm 
Red Hat Associate
Red Hat Associate

Joined: Mon Aug 16, 2004 11:14 am
Posts: 253
Location: Raleigh, NC
I had referenced them but I did it incorrectly. I needed to use a pathelement rather than a fileset to point to .class files.

Thanks, Max.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.