Encountered Exception ORA-21700 Mostly
884061Oct 18 2011 — edited Oct 18 2011I am receiving the following error.
java.sql.SQLException: ORA-21700: object does not exist or is marked for delete
ORA-06512: at "BusLogic ", line 99
ORA-06512: at line 1
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:204)
at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1007)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1315)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3677)
at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4714)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1374)
I have declared all the constants in a seperate package ...like this
Package Constants:
create or replace
PACKAGE ProjectConstants AS
-- Package Name
ConstantValue1 CONSTANT SYS.ODCIVARCHAR2LIST :=SYS.ODCIVARCHAR2LIST('US','INDIA','UK');
END ProjectConstants;
I have used the above constant in another procedure while query as follows.
Create or Replace Procedure BusLogic AS
------
BEGIN
SELECT 'Y' INTO CONDITION1
FROM DUAL
WHERE COUNTRY IN (SELECT COLUMN_VALUE FROM TABLE(ProjectConstants.ConstantValue1));
EXCEPTION
WHEN NO_DATA_FOUND THEN
CONDITION1:='N'
END;
-----