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: ORACLE 10G WITH Hibernate
PostPosted: Mon Oct 20, 2008 6:34 am 
Newbie

Joined: Mon Oct 20, 2008 3:12 am
Posts: 2
Location: pakistan
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

I am using oracle 10g with hibernate 3 . i am using it in an ejb application
when ever i insert many records of a table with CLOB as a field then i get exception. The version of driver i am using is 10.2.0.1.0. in pojo i am using string for that CLOB field

at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:69)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:202)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:230)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:140)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1007)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:354)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
at lmkr.eoffice.blc.pm.service.common.Pc1CommonService.savePc1ConfigurationBean(Pc1CommonService.java:438)
at lmkr.eoffice.blc.pm.service.Pc1Service.savePc1Page2Bean(Pc1Service.java:2337)
at lmkr.eoffice.blc.pm.controller.PMSessionControllerBean.savePc1Page2Bean(PMSessionControllerBean.java:1113)
at lmkr.eoffice.blc.pm.controller.EJSRemoteStatelessPMSessionController_b9c8c88d.savePc1Page2Bean(EJSRemoteStatelessPMSessionController_b9c8c88d.java:17654)
at lmkr.eoffice.blc.pm.controller._PMSessionController_Stub.savePc1Page2Bean(_PMSessionController_Stub.java:3713)
at lmkr.eoffice.gui.pm.page.Pc1Page2.savePage(Pc1Page2.java:111)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:127)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:73)
at javax.faces.component.UICommand.broadcast(UICommand.java:312)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:302)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:416)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:77)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java(Compiled Code))
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:91)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1212)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1173)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:69)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:626)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:250)
at lmkr.eoffice.gui.filter.SessionTrackingFilter.doFilter(SessionTrackingFilter.java:318)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:142)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:77)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:626)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2837)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:220)
at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:204)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1681)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:77)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:421)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:367)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:94)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:548)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:934)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1021)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1332)
Caused by: java.sql.BatchUpdateException: ORA-01400: cannot insert NULL into ("CDADEV"."TPM_PC1CONFIGDATA"."PC1CONFIGDATAID")

at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:343)
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10656)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:1723)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:58)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:195)
... 49 more

_________________
Muhammad Faisal


Top
 Profile  
 
 Post subject: Re: ORACLE 10G WITH Hibernate
PostPosted: Mon Oct 20, 2008 3:58 pm 
Newbie

Joined: Thu Oct 09, 2008 4:03 pm
Posts: 16
Location: US, Itasca Illinois
Hi,

I think the POJO will have to have a different data type other than String. http://www.hibernate.org/hib_docs/v3/re ... types.html says the following:

clob, blob
Type mappings for the JDBC classes java.sql.Clob and java.sql.Blob. These types may be inconvenient for some applications, since the blob or clob object may not be reused outside of a transaction. (Furthermore, driver support is patchy and inconsistent.)


I'm also using Oracle 10G with Hibernate but have not used Clobs with Hibernate yet. My driver version is in jar file ojdbc14.jar and manifest is
Specification-Vendor: Oracle Corporation
Specification-Version: Oracle JDBC Driver version - "10.2.0.4.0"


Top
 Profile  
 
 Post subject: CLOB Hibernate Oracle 10g
PostPosted: Wed Oct 22, 2008 7:33 am 
Newbie

Joined: Mon Oct 20, 2008 3:12 am
Posts: 2
Location: pakistan
i have read on some other forum that this is the bug of oracle driver. Has oracle provided any solution for it in some new version of driver? and is there any better jdbc driver for oracle exists? . And as you asked about using data type of java.sql.CLOB it will not be very handy in using in application however i will try it. thank you for response.

_________________
Muhammad Faisal


Top
 Profile  
 
 Post subject: Re: CLOB Hibernate Oracle 10g
PostPosted: Wed Oct 22, 2008 10:44 am 
Newbie

Joined: Thu Oct 09, 2008 4:03 pm
Posts: 16
Location: US, Itasca Illinois
This link tells which database drivers are certified by Hibernate: http://www.hibernate.org/382.html

I've also read about buggy Oracle drivers but I've not run into any issues yet. Using Oracle 10g Express, dialect org.hibernate.dialect.Oracle9Dialect and the driver below:

Manifest-Version: 1.0
Specification-Title: Oracle JDBC driver classes for use with JDK14
Sealed: true
Created-By: 1.4.2_14 (Sun Microsystems Inc.)
Implementation-Title: ojdbc14.jar
Specification-Vendor: Oracle Corporation
Specification-Version: Oracle JDBC Driver version - "10.2.0.4.0"
Implementation-Version: Oracle JDBC Driver version - "10.2.0.4.0"
Implementation-Vendor: Oracle Corporation
Implementation-Time: Sat Feb 2 11:40:29 2008


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.