Hi 

I am getting an ClassCastException,while inserting an String(a XML) as a CLOB 
to oracle10g database using Jboss server.
I am using a JNDI ,and getting an connection,trying to use 
psNew.setStringForClob method of OraclePreparedStatement giving an error as 
follows :
Connection name  ---> 2org.jboss.resource.adapter.jdbc.WrappedConnection
java.lang.ClassCastException: 
org.jboss.resource.adapter.jdbc.WrappedPreparedStatement cannot be cast to 
oracle.jdbc.OraclePreparedStatement

Code is  :
------------------
con = getConnection();

if (con != null) {
                        System.out.println(" Connection name  ---> 2" + 
con.getClass().getName());
                        String query = "INSERT INTO HR_USERS VALUES (?, ?, ?)";
                        psNew = 
(OraclePreparedStatement)con.prepareStatement(query);
                        
                        psNew.setString(1,"John" );
                        psNew.setString(2, transDto.getAgentVersion());
                        psNew.setStringForClob(3, dto.getIncomingXml());
                        psNew.executeUpdate();

please suggest the error or guide for a new method to insert CLOB to oracle 10g 
using jndi (Jboss server)

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4214258#4214258

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4214258
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to