Using a BLOB data type in a CMP Entity Bean: Error when send large files
I've successfully impleenting BLOB in my EJB. But the main prob is, it can only work on small file which is around 3K. Any larger files than that will caused error (refer below). I got info from a friend which is using normal JDBC call to insert a file into BLOB column that you can't use java.sql.Blob data type which will have this limitation. He suggested that by using oracle.sql.BLOB, this prob won't exist.
The problem is I'm unable to use oracle.sql.BLOB in my CMP EJB because in the jbosscmp-jdbc.xml, I'm able to specify the normal BLOB only which is java.sql.Blob (Refer below).
<cmp-field>
<field-name>attachment</field-name>
<column-name>attch</column-name>
<jdbc-type>BLOB</jdbc-type>
<sql-type>BLOB</sql-type>
</cmp-field>So, how do I solve this problem? I need to store files which the size is much bigger than that. I'm using JBoss 4 as my app server and Oracle 9i as my DB. I can see that there's many ppl facing this prob, but no solution to it. Pls advise. Thanks.
20:03:34,218 INFO [Server] JBoss (MX MicroKernel) [4.0.1RC1 (build: CVSTag=JBoss_4_0_1_RC1 date=200411041143)] Started in 1m:49s:828ms
20:05:01,640 ERROR [EBCreditApplAttch] Could not create entity
java.sql.SQLException: No more data to read from socket
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:187)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:229)
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:982)
at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java:746)
at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java:705)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:373)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1477)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:888)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2051)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1961)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2672)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:452)
at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:316)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.executeInsert(JDBCAbstractCreateCommand.java:328)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.performInsert(JDBCAbstractCreateCommand.java:286)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.execute(JDBCAbstractCreateCommand.java:137)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:572)
at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:222)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:266)
at org.jboss.ejb.EntityContainer.createLocalHome(EntityContainer.java:612)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1113)
at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:90)
at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:192)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:212)
at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:90)
at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:113)
at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:61)
at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:28)
at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValidationInterceptor.java:41)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:109)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:313)
at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:126)
at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:100)
at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:508)
at org.jboss.ejb.Container.invoke(Container.java:878)
at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:342)
at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:118)
at $Proxy94.create(Unknown Source)
at com.infopro.dt.app.ca.ejb.SBCreditApplAttch.setCreditApplAttch(SBCreditApplAttch.java:148)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:113)
at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:51)
at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:313)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:146)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:122)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
at org.jboss.ejb.Container.invoke(Container.java:856)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:805)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:406)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:534)
20:05:01,656 ERROR [JDBCUtil] SQL error
java.sql.SQLException: No more data to read from socket
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:187)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:229)
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:982)
at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java:746)
at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java:705)
at oracle.jdbc.ttc7.Oclose.receive(Oclose.java:105)
at oracle.jdbc.ttc7.TTC7Protocol.close(TTC7Protocol.java:565)
at oracle.jdbc.driver.OracleStatement.close(OracleStatement.java:824)
at oracle.jdbc.driver.OraclePreparedStatement.privateClose(OraclePreparedStatement.java:346)
at oracle.jdbc.driver.OraclePreparedStatement.close(OraclePreparedStatement.java:280)
at org.jboss.resource.adapter.jdbc.WrappedStatement.internalClose(WrappedStatement.java:782)
at org.jboss.resource.adapter.jdbc.WrappedStatement.close(WrappedStatement.java:52)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCUtil.safeClose(JDBCUtil.java:92)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.performInsert(JDBCAbstractCreateCommand.java:310)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.execute(JDBCAbstractCreateCommand.java:137)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:572)
at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:222)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:266)
at org.jboss.ejb.EntityContainer.createLocalHome(EntityContainer.java:612)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1113)
at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:90)
at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:192)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:212)
at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:90)
at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:113)
at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:61)
at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:28)
at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValidationInterceptor.java:41)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:109)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:313)
at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:126)
at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:100)
at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:508)
at org.jboss.ejb.Container.invoke(Container.java:878)
at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:342)
at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:118)
at $Proxy94.create(Unknown Source)
at com.infopro.dt.app.ca.ejb.SBCreditApplAttch.setCreditApplAttch(SBCreditApplAttch.java:148)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:113)
at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:51)
at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:313)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:146)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:122)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
at org.jboss.ejb.Container.invoke(Container.java:856)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:805)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:406)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:534)
20:05:01,672 WARN [JBossManagedConnectionPool] Exception destroying ManagedConnection org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@87b71b[state=DESTROYED mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@225f0 handles=0 lastUse=1110456252484 permit=false trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@108bef4 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@1309516]
org.jboss.resource.JBossResourceException: SQLException; - nested throwable: (java.sql.SQLException: Io exception: Software caused connection abort: socket write error)
at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.checkException(BaseWrapperManagedConnection.java:541)
at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.destroy(BaseWrapperManagedConnection.java:255)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.doDestroy(InternalManagedConnectionPool.java:539)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.returnConnection(InternalManagedConnectionPool.java:329)
at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.returnConnection(JBossManagedConnectionPool.java:552)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.returnManagedConnection(BaseConnectionManager2.java:407)
at org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource.commit(TxConnectionManager.java:699)
at org.jboss.tm.TransactionImpl$Resource.commit(TransactionImpl.java:2141)
at org.jboss.tm.TransactionImpl.commitResources(TransactionImpl.java:1674)
at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:312)
at org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCMT.java:454)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:322)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:146)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:122)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
at org.jboss.ejb.Container.invoke(Container.java:856)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:805)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:406)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.sql.SQLException: Io exception: Software caused connection abort: socket write error
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:187)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:229)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:342)
at oracle.jdbc.driver.OracleConnection.close(OracleConnection.java:1438)
at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.destroy(BaseWrapperManagedConnection.java:251)
... 38 more
20:05:01,687 WARN [TransactionImpl] XAException: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=waikitteoh/17, BranchQual=, localId=17] errorCode=XA_UNKNOWN(0)
org.jboss.resource.connectionmanager.JBossLocalXAException: could not commit local tx; - nested throwable: (org.jboss.resource.JBossResourceException: SQLException; - nested throwable: (java.sql.SQLException: Io exception: Software caused connection abort: socket write error))
at org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource.commit(TxConnectionManager.java:702)
at org.jboss.tm.TransactionImpl$Resource.commit(TransactionImpl.java:2141)
at org.jboss.tm.TransactionImpl.commitResources(TransactionImpl.java:1674)
at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:312)
at org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCMT.java:454)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:322)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:146)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:122)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
at org.jboss.ejb.Container.invoke(Container.java:856)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:805)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:406)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:534)
Caused by: org.jboss.resource.JBossResourceException: SQLException; - nested throwable: (java.sql.SQLException: Io exception: Software caused connection abort: socket write error)
at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.checkException(BaseWrapperManagedConnection.java:541)
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnection.commit(LocalManagedConnection.java:100)
at org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource.commit(TxConnectionManager.java:695)
... 33 more
Caused by: java.sql.SQLException: Io exception: Software caused connection abort: socket write error
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:187)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:229)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:342)
at oracle.jdbc.driver.OracleConnection.commit(OracleConnection.java:1344)
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnection.commit(LocalManagedConnection.java:96)
... 34 more
20:05:01,718 WARN [TransactionImpl] XAException: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=waikitteoh/17, BranchQual=, localId=17] errorCode=XA_UNKNOWN(0)
org.jboss.resource.connectionmanager.JBossLocalXAException: wrong xid in rollback: expected: null, got: XidImpl[FormatId=257, GlobalId=waikitteoh/17, BranchQual=1, localId=17]
at org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource.rollback(TxConnectionManager.java:774)
at org.jboss.tm.TransactionImpl$Resource.rollback(TransactionImpl.java:2165)
at org.jboss.tm.TransactionImpl.rollbackResources(TransactionImpl.java:1727)
at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:340)
at org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCMT.java:454)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:322)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:146)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:122)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
at org.jboss.ejb.Container.invoke(Container.java:856)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:805)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:406)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:534)
20:05:01,734 ERROR [LogInterceptor] TransactionRolledbackException in method: public abstract void com.infopro.dt.app.ca.ejb.SBCreditApplAttchRemote.setCreditApplAttch(com.infopro.dt.app.ca.ejb.DTOCreditApplAttch) throws javax.ejb.CreateException,java.lang.Exception,java.rmi.RemoteException, causedBy:
org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=waikitteoh/17, BranchQual=, localId=17] status=STATUS_NO_TRANSACTION; - nested throwable: (org.jboss.resource.connectionmanager.JBossLocalXAException: could not commit local tx; - nested throwable: (org.jboss.resource.JBossResourceException: SQLException; - nested throwable: (java.sql.SQLException: Io exception: Software caused connection abort: socket write error)))
at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:344)
at org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCMT.java:454)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:322)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:146)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:122)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
at org.jboss.ejb.Container.invoke(Container.java:856)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:805)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:406)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:534)
Caused by: org.jboss.resource.connectionmanager.JBossLocalXAException: could not commit local tx; - nested throwable: (org.jboss.resource.JBossResourceException: SQLException; - nested throwable: (java.sql.SQLException: Io exception
Try to use the OCI native driver instead of THIN.
Similar Messages
-
Using a BLOB data type in a CMP Entity Bean??
Hi all,
i am trying to store blob type data using entity bean, The corresponding field in the Entity bean is defined with data type byte[ ] , and i'm getting error while creating entity bean, could anyone please help me!
This is the error:
[6/7/06 11:19:05:559 EEST] 5b7936b5 ExceptionUtil E CNTR0019E: Non-application exception occurred while processing method "create". Exception data: com.ibm.ejs.container.CreateFailureException: ; nested exception is:
javax.ejb.EJBException: nested exception is: com.ibm.ws.ejbpersistence.utilpm.PersistenceManagerException: PMGR6022E: Error using adapter to create or execute an Interaction. com.ibm.ws.rsadapter.cci.WSInteractionImpl@6593f6a7
javax.ejb.EJBException: nested exception is: com.ibm.ws.ejbpersistence.utilpm.PersistenceManagerException: PMGR6022E: Error using adapter to create or execute an Interaction. com.ibm.ws.rsadapter.cci.WSInteractionImpl@6593f6a7
com.ibm.ws.ejbpersistence.utilpm.PersistenceManagerException: PMGR6022E: Error using adapter to create or execute an Interaction. com.ibm.ws.rsadapter.cci.WSInteractionImpl@6593f6a7
at com.ibm.ws.ejbpersistence.dataaccess.DataAccessRequestImpl.execute(Unknown Source)
at com.ibm.ws.ejbpersistence.beanextensions.ConcreteBeanStatefulInstanceExtensionImpl.executeCreate(Unknown Source)
at com.ibm.ws.ejbpersistence.beanextensions.CBNotExistState.ejbCreate(Unknown Source)
at com.ibm.ws.ejbpersistence.beanextensions.ConcreteBeanStatefulInstanceExtensionImpl.ejbPostCreate(Unknown Source)
at org.epo.dg3.task.ConcreteDocStore_5418fe50.ejbPostCreate(ConcreteDocStore_5418fe50.java:133)
at org.epo.dg3.task.EJSCMPDocStoreHomeBean_5418fe50.create_Local(EJSCMPDocStoreHomeBean_5418fe50.java:29)
at org.epo.dg3.task.EJSLocalCMPDocStoreHome_5418fe50.create(EJSLocalCMPDocStoreHome_5418fe50.java:23)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.etools.utc.model.ReflectionMethodModel.invoke(ReflectionMethodModel.java:68)Try to use the OCI native driver instead of THIN.
-
Help about Date and Time by CMP entity bean
I should have two fields in my cmp .one stores current date ,another one stores current time while ejbcreate();
I should be able to get findmethod findobjectBetween ?! and ?2
or that sorts of find method.what type of the method should I use.
java.util.Date or Simply String?
if I use java.tuil.Date as the type.
How shoud my ejbcreate method look like?
public abstract void setDate(Date mydate);
public abstract Date getDate();
ejbCreate(String name,String password,Date mydate,Date mytime)
setDate()
I suppose I use write a business method getCurrentDate() which uses
java.util.Date().toLocale,But I think it just returns String
help pls.I am using oc4j(Oracle9iAS (9.0.3.0.0))
I am getting the following error using Timestamp while deploying cmp entity bean ejb1.1. Thanks...
Auto-deploying TimestampTestEntity.jar (No previous deployment found)... TimestampTest_EntityBeanWrapper0.java:1558: Missing term.
if (if(thread.contextContainer != null)
^
TimestampTest_EntityBeanWrapper0.java:1558: ')' expected.
if (if(thread.contextContainer != null)
^
TimestampTest_EntityBeanWrapper0.java:1559: Invalid expression statement.
response != null) {if(thread.contextContainer != null)
^
TimestampTest_EntityBeanWrapper0.java:1559: ';' expected.
response != null) {if(thread.contextContainer != null)
^
TimestampTest_EntityBeanWrapper0.java:1560: Missing term.
response.setNanos(if(thread.contextContainer != null)
^
TimestampTest_EntityBeanWrapper0.java:1560: ')' expected.
response.setNanos(if(thread.contextContainer != null)
^
TimestampTest_EntityBeanWrapper0.java:1561: ';' expected.
response.getNanos());} // generated from BeanMethodCompilation
^
7 errors
Error compiling F:\oc4j\j2ee\home\applications\TimestampAppl/TimestampTestEntity.jar: Syntax error in source
Oracle9iAS (9.0.3.0.0) Containers for J2EE initialized -
How to use auto incremented tabe to create a CMP Entity Bean
hi,
I want create a CMP entitybean with an auto incremented table in
Oracel. So I need to know
- how to create a table with an auto-incremented field in oracel and
- how to change the create() method according to that.
I am using Sun studio enterprise for EJB developing.
kaushalyaFor auto increment in Oracle you should use Sequence/Trigger combination.
And useful thread from EJB forum:
http://forum.java.sun.com/thread.jspa?forumID=13&threadID=478783 -
RE: Accessing a CMP Entity Bean
Hi There,
I have written a couple of CMP entity beans. When I run the client application, I am getting a ORB minor code 257. The error message follows. My code works with both BMP entity beans and session beans. Can anyone help? Thanks in advance.
Aug 21, 2005 10:24:57 PM com.sun.corba.ee.impl.encoding.CDRInputStream_1_0 read_value
WARNING: "IOP00810257: (MARSHAL) Could not find class"
org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.couldNotFindClass(ORBUtilSystemException.java:7987)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1013)
at com.sun.corba.ee.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:259)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:1989)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:2213)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1221)
at com.sun.corba.ee.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:400)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:330)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:296)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1034)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:879)
at com.sun.corba.ee.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:255)
at com.sun.corba.ee.spi.servicecontext.UEInfoServiceContext.<init>(UEInfoServiceContext.java:30)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at com.sun.corba.ee.spi.servicecontext.ServiceContextData.makeServiceContext(ServiceContextData.java:114)
at com.sun.corba.ee.spi.servicecontext.ServiceContexts.unmarshal(ServiceContexts.java:195)
at com.sun.corba.ee.spi.servicecontext.ServiceContexts.get(ServiceContexts.java:365)
at com.sun.corba.ee.spi.servicecontext.ServiceContexts.get(ServiceContexts.java:353)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(CorbaClientRequestDispatcherImpl.java:470)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:327)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:158)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:129)
at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(Unknown Source)
at ctaejb.entitybean.order._IOrderHome_DynamicStub.findByPrimaryKey(_IOrderHome_DynamicStub.java)
at mainapp.CTestApplication.main(CTestApplication.java:32)
Caused by: java.lang.ClassNotFoundException
... 27 more
org.omg.CORBA.UNKNOWN: vmcid: 0x0 minor code: 0 completed: Maybe
at com.sun.corba.ee.spi.servicecontext.UEInfoServiceContext.<init>(UEInfoServiceContext.java:34)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at com.sun.corba.ee.spi.servicecontext.ServiceContextData.makeServiceContext(ServiceContextData.java:114)
at com.sun.corba.ee.spi.servicecontext.ServiceContexts.unmarshal(ServiceContexts.java:195)
at com.sun.corba.ee.spi.servicecontext.ServiceContexts.get(ServiceContexts.java:365)
at com.sun.corba.ee.spi.servicecontext.ServiceContexts.get(ServiceContexts.java:353)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(CorbaClientRequestDispatcherImpl.java:470)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:327)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:158)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:129)
at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(Unknown Source)
at ctaejb.entitybean.order._IOrderHome_DynamicStub.findByPrimaryKey(_IOrderHome_DynamicStub.java)
at mainapp.CTestApplication.main(CTestApplication.java:32)This is probably not the best forum to get an answer. Try this one instead:
http://forum.java.sun.com/forum.jspa?forumID=13
Its difficult to know exactly the source of your problem. If your code works for session beans and Entity beans using BMP then I can only think of the following:
In a CMP Bean, the ejbLoad and ejbStore methods do nothing. The container performs the load and store for you. I don't know whether leaving code in these methods will cause any problems though.
You will need to make a few changes to your ejbCreate method though. Suppose your ejbCreate method looks like this:
public PersonKey ejbCreate(String aFirstName, String aLastName) You still need to initialise the firstName and lastName fields in the bean.
firstName = aFirstName;
lastName = aLastName;Normally, the ejbCreate method returns the key value for the created object. Using CMP, you must return null. The container generates the new key value and returns it to the client.
Not sure if that will help. Post on the link above if not.
Simon -
CMP entity bean with compound primary key
I'm trying to use a compound primary key in a CMP entity bean. I've created the custom primary key class okay, and I have the prim-key-class set in ejb-jar.xml. My client app gets the home reference okay, but when it tries to find an entity, I get the exception "SQLException: Incorrect syntax near '/'."
I think I'm having trouble deploying this in OC4J. Is there a sample orion-ejb-jar.xml deployment for a custom, compound primary key somewhere?
Many thanks for any help.
ErnieNever mind. I solved my problem. Thanks.
-
How to use clob or blob data type in OWB
how to use clob or blob data type in OWB?
if OWB not surport these data type,how can i extract the large data type from data sourceThe same question was asked just two days ago No Data Found: ORA-22992
Nikolai Rochnik -
How to store and retrieve blob data type in/from oracle database using JSP
how to store and retrieve blob data type in/from oracle database using JSP and not using servlet
thanksJSP? Why?
start here: [http://java.sun.com/developer/onlineTraining/JSPIntro/contents.html] -
Hi All
i want to create 1 simple table with BLOB data types
now i after this i want to insert 25,000 characters through insert query from oracle
could u give me 1 simple example creation n insertion of data
i have tried this but i m getting problem if i m inserting more than 4,000 character.
Pls any one help me or suggests me how can i do this
Thanks All
Regards,
AjayHi
Edited by: user10717753 on Dec 16, 2008 3:53 AM -
BLOB data type. Will it be available in BO XIR4?
Hi,
Does any know if we will be able to use BLOB data type in the new coming release of BO?
Currently the only way you can use images is copying your image files physically to a folder because BO doesn't recognize BLOB data type from the database. Is there another way around this? Please share it!
Thanks,
Katia.i dont think BO will support BLOB data
-
Oracle 01g and forms 6i with BLOB Data type
Dear All,
I have upgraded my database from oracle 9i R2 to oracle 10g R2. i have an application developed using oracle forms and reports 6i. this application have a form where it stores and retirive an image from the database, this image is stored in a table with a BLOB data type, it was being retrieved fine until we did the upgrade and now it is impossible for me to see the image and i am getting an error every time i retrive the data. it always pop a message saying that "INCONSISTENT DATA TYPE"
please guys help.
Regardsyou can try this procedure
DECLARE
t_blob BLOB;
t_len NUMBER;
t_file_name VARCHAR2(100);
t_output UTL_FILE.file_type;
t_TotalSize number;
t_position number := 1;
t_chucklen NUMBER := 4096;
t_chuck raw(4096);
t_remain number;
BEGIN
-- Get length of blob
SELECT DBMS_LOB.getlength (PHOTO), ename || '_1.jpg'
INTO t_TotalSize, t_file_name FROM DEMO WHERE ENAME ='moon';
t_remain := t_TotalSize;
-- The directory TEMPDIR should exist before executing
t_output := UTL_FILE.fopen ('TEMPDIR', t_file_name, 'wb', 32760);
-- Get BLOB
SELECT PHOTO INTO t_blob FROM DEMO WHERE ENAME ='moon';
-- Retrieving BLOB
WHILE t_position < t_TotalSize
LOOP
DBMS_LOB.READ (t_blob, t_chucklen, t_position, t_chuck);
UTL_FILE.put_raw (t_output, t_chuck);
UTL_FILE.fflush (t_output);
t_position := t_position + t_chucklen;
t_remain := t_remain - t_chucklen;
IF t_remain < 4096
THEN
t_chucklen := t_remain;
END IF;
END LOOP;
END;
it will work -
Tg4msql - Blob Data Type Support(Oracle 8i - sql server 2000)
hi,
We are trying to replicate the data from oracle 8i to sql server 2000 through tg4msql.if we want to replicate the data thet contains the blob field , we are getting invalid expression in the procedure marked with error line.
the procedure i am using is as follows
CREATE OR REPLACE PROCEDURE INSERT_SQL
AS
BEGIN
FOR VAL_CURSOR IN
--Get the Data from the table with status 0
SELECT rs_report_rowid FROM BIJU.rs_report where rs_report_status = 0
LOOP
for new_cursor in
--get the details of the record with the row id
select id ,name,DOB from biju.sample where rowid = val_cursor.rs_report_rowid
LOOP
---insert the data from oracle to sql where the oracle data type contains blob(here photo field data type is blob).
Error Line: insert into [email protected](id,name,photo) values(new_cursor.id,new_cursor.NAME,new_cursor.DOB);
END LOOP;
END LOOP;
COMMIT;
END;
i want to know that tg4msql won't support the blob data type on the oracle end?we configured blob eqivalent in sql server as binary.Any help or suggestion regarding this are welcome..
regards
SriniSrini,
Support for LOB was added in v9.2. It is not supported in 8i. -
How to migrate SQL Server image data type to Oracle 8 BLOB data type?
Hi,
I have to migrate data from sql server to Oracle 10 g.
I am unable to migrate image data type from sql server to blob data type in oracle.
Iam using Oracle Heterogenous Services to migrate the data,Using Merge statement and database link.
I am getting the following error-
ERROR at line 7:
ORA-00932: inconsistent datatypes: expected BLOB got LONG BINARY
Can any one suggest me how to migrate Image datatype to BLOB???Hi you might want to post your question in General Forum.
General Database Discussions
There's very few users visit this forum. -
Datas return from Blob data type in Sqlite
i am using sqlitejdbc-v053.jar through get SQLITE BLOB data type data. But i cannot data return from Blob type.
Error will be display from :
not implemented by SQLite JDBC driver
and point out error line
blob = rs.getBlob("NGP_REPDATA");
{try {
Class.forName("org.sqlite.JDBC");
conn = DriverManager.getConnection("jdbc:sqlite:test.DB");
stmt = conn.createStatement();
rs = stmt.executeQuery("SELECT * FROM sometable");
System.out.println("==============");
while(rs.next()) {
blob = rs.getBlob("blobDATA");//
is = blob.getBinaryStream();
catch(SQLException e) {
e.printStackTrace();
}}any sample or solution pls give
sqlite with BLOB sample there pls give linkThere explicitly tells you that the JDBC driver that you are using will not do the method that you are calling.
Thus you cannot use that method.
There is another way to extract blobs which involves using a stream. You can search for that.
If your blobs are actually short and only have character data then you might be able to use getString() as well. -
JDBC/RMI driver does not support BLOB data type
WLS 5.1 JDBC/RMI driver does not support BLOB data type. It is said in the Weblogic e-doc.
I am using DataSource for database connections, meaning JDBC/RMI driver is actually producing
database connections. I need several columns of BLOB types in my Oracle tables.
Should I use the "JTS" driver instead in order to have the BLOB types supported ?
Thanks for help.
[att1.html]The error java.rmi.UnmarshalException seems to indicate you are somehow accessing the data-source over RMI, this seems odd. Are you running TopLink on a client and trying to connect to a WebLogic DataSource on the server?
Maybe try connecting directly to the DataSource without going through TopLink and see if you encounter the same issue.
You could also look at the TopLink WebLogic Examples and see how their configuration is different than your own.
Maybe you are looking for
-
As I stated above, There is a Facetime error. can someone please help?
-
Message mapping - need Enlightening
Hi Guys, I was actually looking into the message mapping blog of sravya.Link below: [http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3414800)ID0086183650DB11663053995735659636End?blog=/pub/wlg/2792] Was just reading the blog and a lot of quest
-
Error with Data package execution from BPF or running package from custom b
custom button. 1. When run package from BPF or custom button an error apear (for all users): "Subscript out of range". Package dynamic script PROMPT(SELECTINPUT,,,,"BUDGETHOLDER,CONTRACTOR,ENTITY,RPTCURRENCY,SCENARIO,VERSION") TASK(ZMF_BPC_LOGIC_
-
Writing CMP Finder SQL Syntax?
What is the syntax for writing the finder SQL for CMP? From the CMP sample code for the OAS it looks like it might be &fieldname <op> $1 (for the first parameter?)? Joe McDaniel
-
Address Book becoming non-responsive
I have taken the I-mac (Lion 10.75) to the genius bar 3 times because the Address book program becomes non responsive after I spend some trying to clean up duplicate addresses (merging them) and updating information. The first time they said to re