I did some more testing - it appears that the application actually uses the American number format when I run it (i.e. executing "select SYS_CONTEXT('USERENV','NLS_TERRITORY') from dual;" from within the application returns AMERICA).
Previously I did my testing in SQL Developer (where "DENMARK" was returned in the above query). If I use sqlplus "AMERICA" is returned as well - and both jcf.molweight and jc_molweight fails in the same manner as described before:
SQL> select SYS_CONTEXT('USERENV','NLS_TERRITORY') from dual;
SYS_CONTEXT('USERENV','NLS_TERRITORY')
--------------------------------------------------------------------------------
AMERICA
SQL> select jc_molweight('C=C') from dual;
select jc_molweight('C=C') from dual
*
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: character to number conversion error
ORA-06512: at "JCHEM.MOLWEIGHT_FUNC", line 27
SQL> select jcf.molweight('C=C') from dual;
select jcf.molweight('C=C') from dual
*
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: character to number conversion error
ORA-06512: at "JCHEM.JCF", line 646
1. Did you try using jcf.molweight instead of jc_molweight in the trigger?
Yeah, jcf.molweight was no different.
2. Please, could you temporarily insert the line in the trigger at the beginning of the PL/SQL block (immediately after "begin"):
ORA-20100: 1,000,000.428571
(So American number format)
3. If the result for action #2 is as expected, could you, please, execute the following SQL command before executing the failing INSERT/UPDATE in the same database session where the INSERT/UPDATE is about to be executed
call jcart_logger.set_log_level('chemaxon', 4);
DEBUG - chemaxon.jchem.cartridge.JFunctions: calcMolProp: retval=162,2713
(So Danish number format?)