Hi, im trying to pass a multidimensional Array from a Java service to Oracle, getting the connection from a ServiceExecute adapter. Everything works fine when i create a new connexion in the Java Service, but when i get the connection from the pool i get a ClassCastException . Here are my code:
IDataCursor pipelineCursor = pipeline.getCursor();
java.sql.Connection conn = null;
try
{
//the pool connection
//conn = (java.sql.Connection)IDataUtil.get(pipelineCursor, “$db_service_connection”);
//creating new connection – works fine
//conn = java.sql.DriverManager.getConnection(“jdbc:oracle:thin:@server:port:sid”, “username”, “password”);
Object anArrayIn = new Object[1];
for (int i=0; i<dParametros.length; i++) {
String nombreParam = “”;
IDataCursor idcItem = dParametros[i].getCursor();
idcItem.first("nombre");
nombreParam = (String)idcItem.getValue();
[color="red"]anArrayIn[i] = new oracle.sql.STRUCT (new oracle.sql.StructDescriptor("T_PARAMETRO_LV_TW",conn),conn,new String[]{nombreParam,valorParam,tipoParam});[/color]
//Exception line
}