-->
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: binary data type in SYBASE
PostPosted: Wed Nov 13, 2013 10:55 am 
Newbie

Joined: Wed May 15, 2013 3:01 am
Posts: 5
Hi there,

I have a column in Sybase which is of type 'long binary' When Iam trying to Write a record in to that table Iam getting below exception

2013-11-13 20:22:52,498 WARN [org.hibernate.util.JDBCExceptionReporter] - SQL Error: 0, SQLState: JZ0BE
2013-11-13 20:22:52,498 ERROR [org.hibernate.util.JDBCExceptionReporter] - JZ0BE: BatchUpdateException: Error occurred while executing batch statement: SQL Anywhere Error -1000121: binary data not sup
ported on data longer than 32767 Bind host variable,
-- (df_Heap.cxx 2953)
2013-11-13 20:22:52,500 WARN [org.hibernate.util.JDBCExceptionReporter] - SQL Error: 21, SQLState: QDB21
2013-11-13 20:22:52,501 ERROR [org.hibernate.util.JDBCExceptionReporter] - SQL Anywhere Error -1000121: binary data not supported on data longer than 32767 Bind host variable,
-- (df_Heap.cxx 2953)
2013-11-13 20:22:52,516 ERROR [org.hibernate.event.def.AbstractFlushingEventListener] - Could not synchronize database state with session
org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126) ~[hibernate-core-3.3.2.GA.jar:3.3.2.GA]
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114) ~[hibernate-core-3.3.2.GA.jar:3.3.2.GA]
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) ~[hibernate-core-3.3.2.GA.jar:3.3.2.GA]
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275) ~[hibernate-core-3.3.2.GA.jar:3.3.2.GA]
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266) ~[hibernate-core-3.3.2.GA.jar:3.3.2.GA]
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167) ~[hibernate-core-3.3.2.GA.jar:3.3.2.GA]
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) ~[hibernate-core-3.3.2.GA.jar:3.3.2.GA]
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50) [hibernate-core-3.3.2.GA.jar:3.3.2.GA]
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1028) [hibernate-core-3.3.2.GA.jar:3.3.2.GA]
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:366) [hibernate-core-3.3.2.GA.jar:3.3.2.GA]
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:137) [hibernate-core-3.3.2.GA.jar:3.3.2.GA]
at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:657) [spring-orm-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:755) [spring-tx-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:724) [spring-tx-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:387) [spring-tx-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:120) [spring-tx-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [spring-aop-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91) [spring-aop-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [spring-aop-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) [spring-aop-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at $Proxy37.generateReport(Unknown Source) [na:na]


I tried by setting <prop key="hibernate.jdbc.use_streams_for_binary">true</prop> but it didn't help.
Could any one please let me know what should I do to write more than 32767 bytes to the long binary data type.

Thanks in advance.


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.