-->
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.  [ 2 posts ] 
Author Message
 Post subject: Strange error with DERBY database
PostPosted: Tue Feb 22, 2005 5:18 pm 
Beginner
Beginner

Joined: Thu Jun 10, 2004 6:52 am
Posts: 29
I'm trying to simply perform an update of an object that has a java.util.Date field mapped in the database on a TIMESTAMP column. The error i get is veeery strange due to the fact that the insert is working just fine. Did anybody encountered this before ?

org.springframework.dao.DataIntegrityViolationException: (HibernateTemplate): data integrity violated by SQL 'null'; nested exception is java.sql.BatchUpdateException: An attempt was made to get a data value of type 'TIMESTAMP' from a data value of type 'null'.
java.sql.BatchUpdateException: An attempt was made to get a data value of type 'TIMESTAMP' from a data value of type 'null'.
at org.apache.derby.impl.jdbc.EmbedStatement.executeBatch(EmbedStatement.java)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeBatch(DelegatingPreparedStatement.java:231)
at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:54)
at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:126)
at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:59)
at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:56)
at net.sf.hibernate.impl.BatcherImpl.prepareBatchStatement(BatcherImpl.java:109)
at net.sf.hibernate.persister.EntityPersister.update(EntityPersister.java:656)
at net.sf.hibernate.persister.EntityPersister.update(EntityPersister.java:642)
at net.sf.hibernate.impl.ScheduledUpdate.execute(ScheduledUpdate.java:52)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2418)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2372)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2240)
at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61)
at org.springframework.orm.hibernate.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:386)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:316)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:189)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:138)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:148)
at $Proxy3.updateTicket(Unknown Source)
at com.adaptiv.ticket.services.impl.TicketServiceImpl.updateTicket(TicketServiceImpl.java:33)
at com.adaptiv.ticket.gui.model.TicketManagerModel.editSelectedItem(TicketManagerModel.java:145)
at com.adaptiv.ticket.gui.model.TicketManagerModel.access$1(TicketManagerModel.java:142)
at com.adaptiv.ticket.gui.model.TicketManagerModel$DoubleClickHandler.mouseClicked(TicketManagerModel.java:217)
at java.awt.AWTEventMulticaster.mouseClicked(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
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)

I suspect this is a Derby problem, however I thought somebody might have a workaround or something.

I am using Spring/Hibernate 2.1.6 with the latest version of Derby, on Windows XP.

Thanks in advance


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 23, 2005 3:40 pm 
Beginner
Beginner

Joined: Thu Jun 10, 2004 6:52 am
Posts: 29
Sorry, it was me again, as allways, in fact. I forgot tot change the dialect when I switched from MySQL to Derby. What's even stranger is that the inserts with generator=native were working fine!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.