PLS-00382 expression is of wrong type

From: Tim Slattery <Slattery_T_at_bls.gov>
Date: Thu, 11 Aug 2011 11:24:21 -0400
Message-ID: <evr747tabbn3na4ptnsk40ugta41skksjr_at_4ax.com>



I'm getting a PLS-00382 error and cannot decrypt the message.

I'm invoking a synonym of a function from a java program. This database has recently been jiggled so that instead of directly invoking the function, I have to call a synonym. The synonym is (apparently) properly defined, when I do:

select SOII_getSurveyControl from dual;

in SQLDeveloper, I get correct results. But when I invoke it from Java, I get the error. The Java code has not changed from when I was invoking the function directly instead of the synonym. It looks like this:

CallableStatement sproc_stmt = dbConnection.prepareCall("{? = call

      SOII_getSurveyControl}");
sproc_stmt.registerOutParameter(1, OracleTypes.CURSOR); sproc_stmt.execute();
result = (ResultSet)sproc_stmt.getObject(1);

It blows up trying to run the execute() method. The exact error being reported is:

java.sql.SQLException: [BEA][Oracle JDBC Driver][Oracle]ORA-06550: line 1, column 18:
PLS-00382: expression is of wrong type
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

It references two columns in line 1, neither of which makes any sense.

-- 
Tim Slattery
Slattery_T_at_bls.gov
http://members.cox.net/slatteryt
Received on Thu Aug 11 2011 - 10:24:21 CDT

Original text of this message