Link to home
Start Free TrialLog in
Avatar of Saggi
Saggi

asked on

Facing problem when trying to pass SQl ARRAY to PL/SQL funtion.

java.lang.IncompatibleClassChangeError
        at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.1.0)].sql.OracleConnectionBCELProxy__com_evermind_sql_OrionCMTConnection__SQLBCELProxy.getUserName()
Avatar of syedarifbadsha80
syedarifbadsha80
Flag of India image

Can you provide the background of the error ?
Avatar of Saggi
Saggi

ASKER

Please find the attached file

public void updFBControlledItemStatus(String OrgId, String[] ItemList,String ItemStatus)

  {
    Connection connection=null;
    CallableStatement cs=null;
      try
        {
        connection = getConnection();
       
             ArrayDescriptor descriptor =
                ArrayDescriptor.createDescriptor( "STRING_ARRAY", connection );
             
                  ARRAY items =
                        new ARRAY( descriptor, connection, ItemList );

        String query = "begin ? := PITM06.upd_org_item_status(P_ORG_ID=>?,P_ID=>?,P_REFERENCE_5=>?,P_MODIFIED_AT=>,P_MODIFIED_BY=>?,P_MODIFIED_ON=>?); end;";
        cs=connection.prepareCall(query);
        query=null;
        cs.registerOutParameter(1,java.sql.Types.VARCHAR);
        cs.setString(2, STRINGS.replaceNull(OrgId));
        cs.setArray(3, items);
        cs.setString(4, ItemStatus);
        cs.setString(5,"localhost" );
        cs.setString(6, "eva");
        cs.setString(7, "");
        cs.executeQuery();
        if(STRINGS.isError(cs.getString(1)))
        {
           setStatus(EVAERR);
           setErrorMessage(cs.getString(1));
           rollback(connection);
        }
        else
        {
           setStatus(cs.getString(1));
           connection.commit();
        }
    }
    catch(Exception e)
        {
           e.printStackTrace();
           rollback(connection);
           setStatus(EVAERR);
           setErrorMessage(e.getMessage());
        }
    finally
    {
        close(null, cs, connection);
    }
} ABControlledItemStatus.java
Avatar of Saggi

ASKER

Error occured at        ArrayDescriptor.createDescriptor( "STRING_ARRAY", connection );
ASKER CERTIFIED SOLUTION
Avatar of CaptRespect
CaptRespect

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial