Hi all,
I am trying to generate an id with the uuid.string generator, but Hibernate throws an exception. uuid.hex, however, does work as expected. Does anyone have a clue why the uuid.string does not work?
Thanks in advance!
Arjan Huijzer
Hibernate version: 3.1.2
Mapping documents:
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="org.musicweb.model.Disc" table="DISC">
<id name="id" column="ID">
<generator class="uuid.string"/>
</id>
<property name="title" column="TITLE"/>
<property name="artistId" column="ARTIST_ID"/>
<property name="year" column="YEAR"/>
</class>
</hibernate-mapping>
Full stack trace of any exception that occurs:
org.hibernate.MappingException: could not instantiate id generator
at org.hibernate.id.IdentifierGeneratorFactory.create(IdentifierGeneratorFactory.java:97)
at org.hibernate.mapping.SimpleValue.createIdentifierGenerator(SimpleValue.java:152)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:181)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1176)
Name and version of the database you are using: MySQL 5.0.20