ORA-06502

User 4140faeba5

08-05-2006 09:00:24

Hi.


JCHEM_CORE_PKG.GETENVIRONMENT()


--------------------------------------------------------------------------------


Oracle Database 10g Enterprise Edition Release 10.1.0.5.0 - 64bi


PL/SQL Release 10.1.0.5.0 - Production


CORE 10.1.0.5.0 Production


TNS for Linux: Version 10.1.0.5.0 - Production


NLSRTL Version 10.1.0.5.0 - Production


NLSRTL Version 10.1.0.5.0 - Production


JChem version in the database: 3.1.5


JChem version in the Tomcat server: 3.1.5


java.vm.version: 1.5.0_06-b05


java.vm.vendor: Sun Microsystems Inc.


Apache Tomcat/5.5.15





JCHEM_CORE_PKG.GETENVIRONMENT()


--------------------------------------------------------------------------------


Major JDBC version in Tomcat: 10


Minor JDBC version in Tomcat: 2





I'm trying to calculate pka (strongest and second strongest)


The following works.


select jc_evaluate('OC(=O)c1c2ccccc2nc3ccccc13','pka("1")') from dual;


JC_EVALUATE('OC(=O)C1C2CCCCC2NC3CCCCC13','PKA("1")')


----------------------------------------------------


6.81196975





But when I try the following


select jc_evaluate('OC(=O)c1c2ccccc2nc3ccccc13','pka("2")') from dual;


select jc_evaluate('OC(=O)c1c2ccccc2nc3ccccc13','pka("2")') from dual


*


ERROR at line 1:


ORA-06502: PL/SQL: numeric or value error: character to number conversion error


ORA-06512: at "JCHEM.EVALUATE_FUNC", line 10





What am I missing ?


/Mikael

ChemAxon aa7c50abf8

08-05-2006 11:32:59

Mikael,





This is what appears to be a bug in JChem Cartridge. It will be fixed in the next JChem version.





In the meantime, if you absolutely need a workaround you can use
Code:



select jc_evaluate_x('OC(=O)c1c2ccccc2nc3ccccc13','chemTerms:pka("2")') from dual



and check for the 'NaN' return value -- until the next JChem release. In the current release, jc_evaluate_x will return 'NaN' for Chemical Terms expressions which should evalute to double or float, but yield (for a given structure) no meaningful result (which appears to be the case of pka("2") for OC(=O)c1c2ccccc2nc3ccccc13). Note, however, that from the next JChem release on jc_evaluate_x will also return NULL in such cases (which is the most logical return value, isn't it? [Let me know if you disagree.])





Sorry for the inconvenience.





Regards,


Peter