Searching with JChem Cartridge fails ORA-01460

ChemAxon aa7c50abf8

04-12-2009 17:29:00

Searching with the JC_COMPARE operator on JChem indexed column fails with the following error:
ORA-01460: unimplemented or unreasonable conversion requested


You may be trying to call the wrong database driver function (OCI, JDBC, etc.) to bind the query structure as the second parameter of the JChem Cartridge operator. Typically the length of the query structure exceeds the limit allowed by the datatype the particular driver function has been designed for. For example, you may be trying to bind a query structure longer than 4000 characters using a driver call designed to deal with VARCHAR2 (or equivalent) datatypes. In this sample case, you should bind the the query structure as CLOB into the SQL statement.

ChemAxon aa7c50abf8

04-12-2009 17:43:37

Your assumption was correct, the query structure was longer than 4000 characters, but after binding it as CLOB, the SQL statement execution fails with the following error:
java.sql.SQLException: ORA-29900: operator binding does not exist
ORA-06553: PLS-307: too many declarations of 'JC_COMPARE' match this
call


You may get ORA-29900/ORA-06553 error(s) in the case of CLOB query structures, if the indexed column (holding the targets) is of type VARCHA2. In this case, you should additionally apply the TO_CLOB Oracle operator to the target structure column as a hint that the (CLOB, CLOB, VARCHAR2) binding of JC_COMPARE should/can be used


(You can use the following code to find out the binds of a JChem Cartridge operator:


select binding#, argument_type from all_oparguments
where owner = upper(:jchem_cartridge_owner) and operator_name = upper(:op_name) order by binding#, position

)