Changing a VARCHAR(2) to BLOB Data type
I am trying to change a VARCHAR(2) data type into a BLOB. I have researched the web and found what I thought was the solution. That was to create a new column that was a BLOB, copy the information from the column I what to modify into it, then delete the original column and rename the BLOB column to that original name.
However I am getting error messages such as…
ORA-00904: "CUSTOMER2"."Cust_Firstname": invalid identifier
When I issue this statement:
UPDATE CUSTOMER2 SET "CUSTOMER2"."Cust_Firstname"=Temp_Name;
or
ORA-00904: "CUSTOMER2"."Temp_Name": invalid identifier
When I issue this statement:
UPDATE CUSTOMER2 SET "CUSTOMER2"."Cust_Firstname"="CUSTOMER2"."Temp_Name";
Or
And I have gotten an error message saying update failed was expecting a numeric got BLOB.
I have UPDATED the table…
SQL>Alter table CUSTOMER2 ADD Temp_Name BLOB;
Table altered.
0.74 seconds
Does anyone have any ideas? All help would be very much appreciated!
-Robert
Hello Robert,
first, I don't see which part of your question concerns APEX. There is {forum:id=75} where you probably get best input for your problem.
Anyhow, just a few things you might think about before posting there.
I am trying to change a VARCHAR(2) data type into a BLOBI'm not sure if you really want this to be a BLOB. Ususally, if text fields get too small, you'd use CLOB. Again, I'd guess the 4000 bytes you can easily store in a VARCHAR2 (not VARCHAR(2), right? this would be a two byte text field) would be sufficient for what I would expect to find in a column named "Cust_Firstname".
UPDATE CUSTOMER2 SET "CUSTOMER2"."Cust_Firstname"=Temp_Name;Is this the actual code? I guess you didn't create the column "Cust_Firstname" with double quotes. Double quotes enable case sensitive handling, so "Cust_Firstname" is different from "cust_firstname" or "CUST_FIRSTNAME". The latter version would be the default if no quotes are used, i.e. everything is handled as it were in upper case.
Concerning your assignment order: If "Temp_Name" is the new BLOB column, you wouldn't want "Cust_Firstname" to be overwritten with that empty value.
If I understood you right, you want to transfer the value from "Cust_Firstname" (which is VARCHAR2) to "Temp_Name", which you created as BLOB. You should change the order in the update statement then.
-Udo
Similar Messages
-
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 exceptionTry to use the OCI native driver instead of THIN.
-
Pdf file stored as BLOB data type on Oracle
I store PDF file as BLOB data type on Oracle. There are cases
where I get multiple records from the database, that means I get
multiple PDF files. They have to be merged and displayed on the web
page. I tried CFContent which can display only one PDF file at a
time but not more than one, whereas cfdocument is having problem
converting binary data to string. I am kind of stuck.
Can you anybody please help me out? Please let me know if you
have any questions or this does not make sense to you.
Thank you in advance.BALAJI_JAY wrote:
> Can you anybody please help me out? Please let me know
if you have any
> questions or this does not make sense to you.
if by "merge" you mean 3 pdf into 1 pdf, try cfpdf (if on
cf8) or see this
thread if cf version less than 8:
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=1&catid=7&threadid=11 14635&messageid=4032202 -
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. -
Conversion failed when converting the varchar value 'undefined' to data typ
Conversion failed when converting the varchar value 'undefined' to data type int.
hi, i installed oracle insbridge following the instruction in the manual. in rate manager, when i tried to create a new "Normal rating" or "Underwriting", im getting the following exception
Server Error in '/RM' Application.
Conversion failed when converting the varchar value 'undefined' to data type int.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Conversion failed when converting the varchar value 'undefined' to data type int.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SqlException (0x80131904): Conversion failed when converting the varchar value 'undefined' to data type int.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +1948826
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4844747
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2392
System.Data.SqlClient.SqlDataReader.HasMoreRows() +157
System.Data.SqlClient.SqlDataReader.ReadInternal(Boolean setTimeout) +197
System.Data.SqlClient.SqlDataReader.Read() +9
System.Data.SqlClient.SqlCommand.CompleteExecuteScalar(SqlDataReader ds, Boolean returnSqlValue) +50
System.Data.SqlClient.SqlCommand.ExecuteScalar() +150
Insbridge.Net.Fwk.DAO.DataAccess.ScalarQuery(String connectionString, String command, Transaction transType, Object[] procParams) +110
[Exception: Cannot Execute SQL Command: Conversion failed when converting the varchar value 'undefined' to data type int.]
Insbridge.Net.Fwk.DAO.DataAccess.ScalarQuery(String connectionString, String command, Transaction transType, Object[] procParams) +265
Insbridge.Net.Fwk.DAO.SqlProcessor.ExecuteScalarQueryProc(String subscriber, String datastore, String identifier, String command, Transaction transType, Object[] procParams) +101
Insbridge.Net.Fwk.DAO.SqlProcessor.ExecuteScalarQuery(String subscriber, String identifier, String command) +22
Insbridge.Net.RM.IBRM.ExeScalar(String cmd, Object[] paramsList) +99
Insbridge.Net.RM.Components.Algorithms.AlgEdit.Page_Load(Object sender, EventArgs e) +663
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
my insbridge versions are as follows
IBRU 4.0.0 Copyright ©2010, Oracle. All rights reserved. - Version Listing
RMBUILD.DLL 4.0.0.0 (x86)
SRLOAD.DLL 3.13.0 (x86)
IBRM v04.00.0.17
IB_CLIENT v04.00.0.00
RM.DLL 4.00.0 (x86)
IBFA 3.0.2
OS: Windows Server 2003
DB: Sql Server 2008
Browser: IE8
how do i solve this, please helpThis is an error due to conversion failed from character string to int datatype. Infact, the table column contains "NO" value which you are trying to convert to Int/SUM which is illegal. Without your code and table structure, its difficult to pinpoint your
actual issue. But check, all columns for value "NO". -
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 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. -
Hi
I have stored some images in my table using blob data type. Can anyone plz tell me how to fetch those images using oracle forms.
Thanks.once you base you DataBlock in forms on this table with BLOB column you will automatically get an image item in the forms for this column.
rest is same as usual, when you do an execute query you should get the records.
but the images you have stored in the database should be as one of the following types.
BMP, CALS, GIF, JFIF, PICT, RAS, TIFF, TPIC.
set the appropriate value in the property of the Image item for the "Image Format" property. -
Need a query to retrive reocrds from a blob data type!
Hi,
I need a sql query to check in a cloumn which is a blob data type ,where the column stores the XML values and the query should check a particular value in the column if value is there it shud return with yes or no.Thanks for your reply...
Let me clearly explain my need.. for instance a table xyz and in that we have 5 columns but based on some conditions on 3 columns i need to retrive the records..like..
select * from xyz where a=** and b=** and c=***; here i need to pass the values of a,b and c while runtime only and not as static values and also i need to return with a message like records found,not found based on the condition where the particular record for the column C is there or not there. -
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] -
I have created the following trigger that fires instead of an UPDATE statement and copies the altered data over to an Audit table before proceeding with the requested UPDATE. After doing so, I wrote a simple UPDATE statement for testing:
UPDATE Products
SET ProductCode = 'XYZ 2014', ProductName = 'Special Edition Tamborine', ListPrice = 74.99, DiscountPercent = .5
WHERE ProductID = 28;
When I run this, I get the following message:
Msg 245, Level 16, State 1, Procedure Products_UPDATE, Line 14
Conversion failed when converting the varchar value 'X' to data type int.
Here is my trigger:
IF OBJECT_ID('Products_UPDATE') IS NOT NULL
DROP TRIGGER Products_UPDATE; -- LINE 14
GO
CREATE TRIGGER Products_UPDATE
ON Products
INSTEAD OF UPDATE
AS
DECLARE @ProductID int, @CategoryID int, @ProductCode varchar, @ProductName varchar,
@Description varchar, @ListPrice money, @DiscountPercent money, @DateUpdated datetime
BEGIN
SELECT @ProductID = ProductID, @CategoryID = CategoryID, @ProductCode = ProductCode,
@ProductName = ProductName, @Description = Description, @ListPrice = ListPrice,
@DiscountPercent = DiscountPercent, @DateUpdated = GetDate()
FROM deleted;
INSERT INTO ProductsAudit
VALUES (@ProductCode, @CategoryID, @ProductCode, @ProductName, @ListPrice,
@DiscountPercent, @DateUpdated);
SELECT @ProductID = ProductID, @CategoryID = CategoryID, @ProductCode = ProductCode,
@ProductName = ProductName, @Description = Description, @ListPrice = ListPrice,
@DiscountPercent = DiscountPercent, @DateUpdated = GetDate()
FROM inserted;
UPDATE Products
SET CategoryID = @CategoryID, ProductCode = @ProductCode,
ProductName = @ProductName, Description = @Description,
ListPrice = @ListPrice, DiscountPercent = @DiscountPercent
WHERE ProductID = (SELECT ProductID FROM inserted)
END
I am confused a bit by (1) the location of the error and (2) the reason. I have looked over my defined data types and they all match.
Could someone offer a second set of eyes on the above and perhaps guide me towards a solution?
Thank you.This is an issue in this trigger. It will work for single record updates alone. Also for your requirement you dont need a INSTEAD OF TRIGGER at all.
You just need this
IF OBJECT_ID('Products_UPDATE') IS NOT NULL
DROP TRIGGER Products_UPDATE;
GO
CREATE TRIGGER Products_UPDATE
ON Products
AFTER UPDATE
AS
BEGIN
INSERT INTO ProductsAudit
SELECT ProductID,
CategoryID,
ProductCode,
ProductName,
ListPrice,
DiscountPercent,
GetDate()
FROM deleted;
END
Now, in your original posted code there was a typo ie you repeated the column ProductCode twice
I think one should be ProductID which is why you got error due to data mismatch (ProductID is int and ProductName is varchar)
see below modified version of your original code
IF OBJECT_ID('Products_UPDATE') IS NOT NULL
DROP TRIGGER Products_UPDATE; -- LINE 14
GO
CREATE TRIGGER Products_UPDATE
ON Products
INSTEAD OF UPDATE
AS
DECLARE @ProductID int, @CategoryID int, @ProductCode varchar, @ProductName varchar,
@Description varchar, @ListPrice money, @DiscountPercent money, @DateUpdated datetime
BEGIN
SELECT @ProductID = ProductID, @CategoryID = CategoryID, @ProductCode = ProductCode,
@ProductName = ProductName, @Description = Description, @ListPrice = ListPrice,
@DiscountPercent = DiscountPercent, @DateUpdated = GetDate()
FROM deleted;
INSERT INTO ProductsAudit
VALUES (@ProductID, @CategoryID, @ProductCode, @ProductName, @ListPrice,
@DiscountPercent, @DateUpdated);
SELECT @ProductID = ProductID, @CategoryID = CategoryID, @ProductCode = ProductCode,
@ProductName = ProductName, @Description = Description, @ListPrice = ListPrice,
@DiscountPercent = DiscountPercent, @DateUpdated = GetDate()
FROM inserted;
UPDATE Products
SET CategoryID = @CategoryID, ProductCode = @ProductCode,
ProductName = @ProductName, Description = @Description,
ListPrice = @ListPrice, DiscountPercent = @DiscountPercent
WHERE ProductID = (SELECT ProductID FROM inserted)
END
I would prefer doing it as former way though
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs
Maybe you are looking for
-
Latest iTunes resources (?)
I upgraded to iTunes for Windows ver 5.0.1.4 despite what I read as anguish by some other users on these boards. But, what I saw after the upgrade was no different than what I saw with the first 5.x 'upgrade.' I started iTunes and watched Windows Tas
-
Setting required fields in a PDF form
I am going to start this by saying I figure this has got to be something I am doing wrong. I have created a form in LiveCycle Designer that has many fields that are set as required. I also have radio buttons that are required. I am able to set up a w
-
Always running makepkg as if `nice -19 makepkg -s` [SOLVED]
Subject says it all. Short of an alias or script, how can I get makepkg to run with a nice level of 19? Last edited by graysky (2012-03-21 18:37:03)
-
Downloading Games - ITouch User Summary Grayed Out
I had no problem with the syncing of music to our new Itouch. I downloaded a few applications (games)and it appeared to sync but they did not transfer to the ITouch. When I look on ITunes, under the IPod User information - the page with all the tabs
-
This has been happening for a while, but just realized that there may be a solution.