User f05f6b8c05
16-01-2014 22:58:16
Hi,
We are using Jchem 5.11.2 cartridge
We have created a custom Java class that we have wrapped in jchem_core_pkg.send_user_func:
create or replace function getfullstructure_func
(lotid VARCHAR2) RETURN CLOB AS
BEGIN
return jchem_core_pkg.send_user_func('akpkg.GetFull', '{delim}', lotid);
END;
The simplified Java class is this:
public class GetFull implements JChemCartModule {
public Object doFunc(String[] args) throws Exception {
//
// code that creates finalm Molecule
//
return finalm.toFormat("mol");
}
}
For large Molecules we are getting this Oracle error:
ORA-24345: A Truncation or null fetch error occurred
We have noticed that the prototype of JCHEM_CORE_PKG.send_user_func declares a return type of VARCHAR2:
FUNCTION send_user_func(name VARCHAR2, delim VARCHAR2,
params VARCHAR2) RETURN VARCHAR2 AS LANGUAGE JAVA NAME
'chemaxon.jchem.cartridge.JFunctions.sendUserFunc(java.lang.String,
java.lang.String, java.lang.String) return java.lang.String';
Is there a way for a user function to return a string that is larger than varchar2 limit?
Thanks for any help.
Best,
Andrew