[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-6188) java.util.UUID cannot be used for Ids

Gail Badner (JIRA) noreply at atlassian.com
Fri Oct 21 19:43:19 EDT 2011


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-6188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44128#comment-44128 ] 

Gail Badner commented on HHH-6188:
----------------------------------

This is also reproduced on Oracle by:
- org.hibernate.test.id.uuid.sqlrep.sqlbinary.UUIDBinaryTest.classMethod()
- org.hibernate.test.id.uuid.strategy.CustomStrategyTest.testUsage()

> java.util.UUID cannot be used for Ids
> -------------------------------------
>
>                 Key: HHH-6188
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6188
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.6.3
>         Environment: Hibernate 3.6.3Final, Oracle 9i
>            Reporter: Thomas Oellrich
>            Assignee: Gail Badner
>             Fix For: 4.0.0.next
>
>         Attachments: Foo.java, foo.sql, FooTest.java, fullstacktrace.txt
>
>
> Hibernate successfully maps java.util.UUID to a database field defined as raw(16) in Oracle. However, as soon as I add the @Id annotation from the JPA-API, I get the following error:
> Caused by: org.hibernate.MappingException: No Dialect mapping for JDBC type: -2
> 	at org.hibernate.dialect.TypeNames.get(TypeNames.java:77)
> 	at org.hibernate.dialect.TypeNames.get(TypeNames.java:100)
> 	at org.hibernate.dialect.Dialect.getTypeName(Dialect.java:296)
> 	at org.hibernate.mapping.Column.getSqlType(Column.java:208)
> 	at org.hibernate.mapping.Table.sqlTemporaryTableCreateString(Table.java:371)
> 	at org.hibernate.mapping.PersistentClass.prepareTemporaryTables(PersistentClass.java:774)
> 	at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:272)
> 	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1845)
> 	at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:906)
> I'm using org.hibernate.dialect.Oracle9iDialect.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list