[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: ArrayDescriptor creation throws ClassCastException in JB
rcdlrp
do-not-reply at jboss.com
Mon Feb 5 10:44:08 EST 2007
Hi!
I had the same problem in the last week, and found the solution,
The ArrayDescriptor and ARRAY needed a Native Connection, and the mode to get this is:
cstmt = (OracleCallableStatement) getSession().connection().prepareCall(" call REP_UPDATE_STOCK_WAREHOUSE(?, ?, ?, ?, ?) ");
ArrayDescriptor descCE = ArrayDescriptor.createDescriptor("NUMBER_NT", cstmt.getConnection());
A OracleCallableStatement.getConnection returns a Native Connection... use that for parameter the ArrayDescriptor.createDescriptor and the ClassCastException will solve.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4011400#4011400
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4011400
More information about the jboss-user
mailing list