-->
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: Trying to insert blob of size 10000 bytes into Oracle 9
PostPosted: Fri Mar 07, 2008 11:23 am 
Newbie

Joined: Fri Mar 07, 2008 11:16 am
Posts: 2
Hi,
I am trying to insert blob of size more than 6 kb upto 1.5MB using apache
commons ServletFileUpload, but its thrwoing the following exception while inserting the data into the corresponding table.

But I tried with 1600 bytes file, it worked fine but if I go with any pdf or any image file more than 6kb , its failing and throwing the following exception. If anybody knows the answer plz help me its very urgent to me.


org.hibernate.exception.GenericJDBCException: could not update: [com.mastercard.
sponsorship.sponsorshipmanagement.business.domain.UploadCrteFile#125]
at org.hibernate.exception.ErrorCodeConverter.handledNonSpecificExceptio
n(ErrorCodeConverter.java:92)
at org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter
.java:80)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelp
er.java:43)
at org.hibernate.persister.entity.BasicEntityPersister.update(BasicEntit
yPersister.java:2000)
at org.hibernate.persister.entity.BasicEntityPersister.updateOrInsert(Ba
sicEntityPersister.java:1909)
at org.hibernate.persister.entity.BasicEntityPersister.update(BasicEntit
yPersister.java:2149)
at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.ja
va:75)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:239)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:223)

at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:137)

at org.hibernate.event.def.AbstractFlushingEventListener.performExecutio
ns(AbstractFlushingEventListener.java:274)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlus
hEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:730)
at com.mastercard.sponsorship.sponsorshipmanagement.integration.dao.hibe
rnate.CreativeApprovalCaseDAOImpl.addCrteFile(CreativeApprovalCaseDAOImpl.java:1
18)
at com.mastercard.sponsorship.sponsorshipmanagement.business.manager.Cre
ativeApprovalCaseManagerImpl.addCrteFile(CreativeApprovalCaseManagerImpl.java:32
1)
at com.mastercard.sponsorship.sponsorshipmanagementservice.service.Downl
oadService.service(DownloadService.java:123)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:157)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
atcher.java:704)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(Applica
tionDispatcher.java:474)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationD
ispatcher.java:409)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDis
patcher.java:312)
at com.mastercard.sponsorship.sponsorshipmanagementservice.web.filter.Us
erAccessFilter.doFilter(UserAccessFilter.java:135)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:186)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:157)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.do
FilterInternal(OpenSessionInViewFilter.java:173)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR
equestFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:186)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(Standard
ContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:118)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)

at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:16
0)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ssConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:683)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.sql.SQLException: operation not allowed: streams type cannot be
used in batching
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.driver.OraclePreparedStatement.addBatch(OraclePreparedSta
tement.java:3775)
at org.apache.commons.dbcp.DelegatingPreparedStatement.addBatch(Delegati
ngPreparedStatement.java:171)
at org.hibernate.jdbc.BatchingBatcher.addToBatch(BatchingBatcher.java:29
)
at org.hibernate.persister.entity.BasicEntityPersister.update(BasicEntit
yPersister.java:1982)
... 48 more
[/b]


Top
 Profile  
 
 Post subject: Trying to insert blob of size 10000 bytes into Oracle 9
PostPosted: Fri Mar 07, 2008 4:55 pm 
Newbie

Joined: Fri Mar 07, 2008 11:16 am
Posts: 2
I got the answer.
Its problem with the driver.
Juss I got the latest jdbc thin driver from oracle website.
Driver name is ojdbc14.jar.
Get this driver from oracle website . Follow this link

http://www.oracle.com/technology/softwa ... 01040.html.



There select ojdbc14.jar driver under the
JDBC Thin for All Platforms


It definitely solve this headache problem.


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.