[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - org.jboss.resource.adapter.jdbc.WrappedCallableStatement
cybercollege
do-not-reply at jboss.com
Thu Dec 13 15:51:51 EST 2007
I have done a lot of search and also have tried whatever I could fine but the issue could not be resoved. When I run the code I get the following error:
Error in java.lang.ClassCastException: org.jboss.resource.adapter.jdbc.WrappedCallableStatement"
Here is a part of the code:
import oracle.jdbc.OracleCallableStatement;
import oracle.jdbc.OracleTypes;
import oracle.jdbc.pool.OracleDataSource;
import java.lang.*;
import java.util.*;
import java.io.*;
import java.sql.*;
............
........
.....
OracleCallableStatement cstmt = null;
String[] orgNames = null;
int maxTablLen = 250;
int eleMaxLen = 100;
try{
ConnPool conObj = new ConnPool();
con = conObj.getConnection();
cstmt = (OracleCallableStatement) con.prepareCall(" begin"+
"GETS_LMS_RECAP_DEFECTS_PKG.GETS_PL_SQL_TEST(?);"+
" end;");
cstmt.registerIndexTableOutParameter(1,maxTablLen,OracleTypes.VARCHAR,eleMaxLen);
cstmt.execute();
orgNames = (String [])cstmt.getObject(1);
System.out.println("Number of rows= "+orgNames.length);
for (int i=0; i<orgNames.length; i++){
System.out.print(orgNames);
System.out.println();
}
The exception is thrown prior to even executing "cstmt.execute();".
Please advise how to fix this error?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4112720#4112720
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4112720
More information about the jboss-user
mailing list