SQL Developer Unit Test Raises Java.sql.SQLException: Missing defines (Doc ID 2032769.1)

Last updated on OCTOBER 27, 2016

Applies to:

Oracle SQL Developer - Version 4.1 and later
Information in this document applies to any platform.

Symptoms

A unit test was created for a function which causes the function to raise an exception. The unit test is defined with an Expected Result = Exception "ANY", however, the unit test fails to detect this and raises an ERROR.

Debug output:

Execution Results
ERROR
Expected exception: [ANY], Received: [20000: ORA-20000: This is an error
ORA-06512: at "HCAPI.KG_UNIT_TEST_BUG", line 10
ORA-06512: at line 2
]


When the unit test is run, the following Java exception is displayed in the results output:

java.sql.SQLException: Missing defines
oracle.jdbc.driver.Accessor.isNull(Accessor.java:744)
oracle.jdbc.driver.CharCommonAccessor.getString(CharCommonAccessor.java:350)
oracle.jdbc.driver.OracleCallableStatement.getString(OracleCallableStatement.java:661)
oracle.jdbc.driver.OracleCallableStatementWrapper.getString(OracleCallableStatementWrapper.java:860)
oracle.jdbc.proxy.oracle$1dbtools$1raptor$1proxy$1driver$1oracle$1RaptorProxyOJDBCStatement$2oracle$1jdbc$1internal$1OracleCallableStatement$$$Proxy.getString(Unknown Source)
oracle.dbtools.raptor.datatypes.strategies.callablestatement.CallableBindingVARCHAR.customOutputByPosition(CallableBindingVARCHAR.java:51)
oracle.dbtools.raptor.datatypes.strategies.callablestatement.CallableBindingDatumAtName.customOutput(CallableBindingDatumAtName.java:123)
oracle.dbtools.raptor.datatypes.impl.CallableBindingImpl.getOutput(CallableBindingImpl.java:74)
oracle.dbtools.unit_test.testObjects.UtTestImplArgs.getOutput(UtTestImplArgs.java:320)
oracle.dbtools.un ...

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms