-->
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.  [ 1 post ] 
Author Message
 Post subject: Derby cant get CHAR from Character
PostPosted: Fri Nov 03, 2006 7:07 am 
Newbie

Joined: Wed Jan 11, 2006 5:15 am
Posts: 15
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 3.2 ga (2006-04)

Full stack trace of any exception that occurs:
[ERROR .AbstractFlushingEventListener] Could not synchronize database state with session
org.hibernate.exception.DataException: could not insert: [de.kontorist.core.bo.konto.Konto]
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:77)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2202)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2595)
at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:51)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
at de.kontorist.db.HibernateUtil.save(HibernateUtil.java:563)
at de.kontorist.db.HibernateUtil.save(HibernateUtil.java:543)
at de.kontorist.db.HibernateModul.receiveMessage(HibernateModul.java:138)
at net.sf.genuine.organizer.internal.DefaultChannel$1.run(DefaultChannel.java:106)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at de.kontorist.util.JDesktopPaneStrgTab$MyEventQueue.dispatchEvent(JDesktopPaneStrgTab.java:165)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Caused by: java.sql.SQLException: An attempt was made to get a data value of type 'CHAR' from a data value of type 'java.lang.Character'.
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.ConnectionChild.newSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.dataTypeConversion(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.setObject(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.setObject(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.setObject(Unknown Source)
at de.kontorist.db.KontoristEnum.nullSafeSet(KontoristEnum.java:334)
at org.hibernate.type.CustomType.nullSafeSet(CustomType.java:146)
at org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:1932)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2178)
... 22 more

Name and version of the database you are using: Derby 10.2.1.6 (2006-10)

The generated SQL (show_sql=true):
Hibernate: insert into "Konto" (kontoart, "FK_Kontengruppe", "bezeichnung", "FK_Steuersatz", "nr", "id") values (?, ?, ?, ?, ?, ?)

***********************************************

Hi, my problem is "kontoart" - a UserType (Character Enum). It works fine with MySQL and HSQLDB, but Derby dosnt work.
Has onyone a idea what to do?

kind regards
Martin


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

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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.