-->
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.  [ 4 posts ] 
Author Message
 Post subject: java.sql.SQLException: Unable to parameterize variable of ty
PostPosted: Thu Feb 12, 2004 5:46 pm 
Beginner
Beginner

Joined: Wed Jan 28, 2004 2:06 am
Posts: 33
I am not sure what is this error caused by. Can anybody please point me to the right direction ?


java.sql.SQLException: Unable to parameterize variable of type : OTHER

at weblogic.jdbc.mssqlserver4.TdsParameter.getDeclaration(TdsParameter.j
ava:206)
at weblogic.jdbc.mssqlserver4.TdsPreparedInputStream.<init>(TdsPreparedI
nputStream.java:36)
at weblogic.jdbc.mssqlserver4.TdsStatement.doEscapeProcessing(TdsStateme
nt.java:1395)
at weblogic.jdbc.mssqlserver4.TdsStatement.execute(TdsStatement.java:176
)
at weblogic.jdbc.mssqlserver4.TdsStatement.executeUpdate(TdsStatement.ja
va:97)
at weblogic.jdbc.mssqlserver4.TdsStatement.executeUpdate(TdsStatement.ja
va:1516)
at weblogic.jdbc.pool.Statement.executeUpdate(Statement.java:293)
at net.sf.hibernate.impl.NonBatchingBatcher.addToBatch(NonBatchingBatche
r.java:22)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.jav
a:469)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.jav
a:443)
at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.j
ava:29)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2308)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2261)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2187)
at com.trulogica.truaccess.wfengpersist.dao.WfInstActivityDataDAOImpl.ad
dInstActivity(WfInstActivityDataDAOImpl.java:45)
at com.trulogica.truaccess.wfengpersist.ejb.WfEngineEJB.addInstActivity(
WfEngineEJB.java:93)
at com.trulogica.truaccess.wfengpersist.ejb.WfEngineEJB_wodjec_EOImpl.ad
dInstActivity(WfEngineEJB_wodjec_EOImpl.java:169)
at com.trulogica.truaccess.wfengpersist.ejb.WfEngineEJB_wodjec_EOImpl_WL
Skel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:360)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerR
ef.java:93)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.jav
a:329)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
.java:22)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:140)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:121)
5687 [ExecuteThread: '13' for queue: 'default'] ERROR impl.SessionImpl - Could
not synchronize database state with session
net.sf.hibernate.JDBCException: could not insert: [com.trulogica.truaccess.wfeng
persist.model.WfInstActivityData#313]
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.jav
a:479)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.jav
a:443)
at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.j
ava:29)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2308)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2261)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2187)
at com.trulogica.truaccess.wfengpersist.dao.WfInstActivityDataDAOImpl.ad
dInstActivity(WfInstActivityDataDAOImpl.java:45)
at com.trulogica.truaccess.wfengpersist.ejb.WfEngineEJB.addInstActivity(
WfEngineEJB.java:93)
at com.trulogica.truaccess.wfengpersist.ejb.WfEngineEJB_wodjec_EOImpl.ad
dInstActivity(WfEngineEJB_wodjec_EOImpl.java:169)
at com.trulogica.truaccess.wfengpersist.ejb.WfEngineEJB_wodjec_EOImpl_WL
Skel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:360)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerR
ef.java:93)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.jav
a:329)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
.java:22)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:140)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:121)
Caused by:
java.sql.SQLException: Unable to parameterize variable of type : OTHER
at weblogic.jdbc.mssqlserver4.TdsParameter.getDeclaration(TdsParameter.j
ava:206)
at weblogic.jdbc.mssqlserver4.TdsPreparedInputStream.<init>(TdsPreparedI
nputStream.java:36)
at weblogic.jdbc.mssqlserver4.TdsStatement.doEscapeProcessing(TdsStateme
nt.java:1395)
at weblogic.jdbc.mssqlserver4.TdsStatement.execute(TdsStatement.java:176
)
at weblogic.jdbc.mssqlserver4.TdsStatement.executeUpdate(TdsStatement.ja
va:97)
at weblogic.jdbc.mssqlserver4.TdsStatement.executeUpdate(TdsStatement.ja
va:1516)
at weblogic.jdbc.pool.Statement.executeUpdate(Statement.java:293)
at net.sf.hibernate.impl.NonBatchingBatcher.addToBatch(NonBatchingBatche
r.java:22)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.jav
a:469)
... 15 more
Feb 12, 2004 03:42:59 PM com.trulogica.truaccess.wfengpersist.ejb.WfEngineEJB ad
dInstActivity WARNING: Exception: could not insert: [com.trulogica.truaccess.wfe
ngpersist.model.WfInstActivityData#313]
throw ejb exception[/b]


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 12, 2004 6:29 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Yes, have a look at the logs to find any clue.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 13, 2004 12:34 pm 
Beginner
Beginner

Joined: Wed Jan 28, 2004 2:06 am
Posts: 33
Hi:

Found the error. I had a mapping type of "text". When i donot set this field the above error was thrown.


Another question:

I have 3 fields in database. I need to update just one out of 3. Currently if i don't set the other fields it just nulls the field. Is there a way to make hibernate to issue a update command to just update the field that i want to and keep the rest of the field untouched?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 13, 2004 2:47 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
dynamic-update="true", I suppose.

_________________
Emmanuel


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