User 4140faeba5
12-07-2005 07:47:41
Hi.
I've installed version 3.0.12 of Jchem together with Oracle 9.2.0.6, Java 1.4.2 and Tomcat 4.1.31
The installation went fine, but when I try to run the test.sql
I get the following error.
SQL> select jchem_core_pkg.getenvironment() from dual;
select jchem_core_pkg.getenvironment() from dual
*
ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception:
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
ORA-06512: at "JCHEM.JCHEM_CORE_PKG", line 0
ORA-06512: at "JCHEM.JCHEM_CORE_PKG", line 108
I traced the error to the following in the body JCHEM_CORE_PKG
FUNCTION getEnvironment RETURN VARCHAR2 IS
TYPE EmpCurTyp IS REF CURSOR;
cur EmpCurTyp;
res VARCHAR2(32767);
tmp VARCHAR2(32767);
BEGIN
check_master_table();
OPEN cur FOR 'select banner from sys.v_$version';
LOOP
FETCH cur INTO res;
tmp := tmp || res || CHR(10);
EXIT WHEN cur%NOTFOUND;
END LOOP;
dbms_output.put_line(tmp);
res := 'JChem version in the database: '||
Jchem_Core_Pkg.getJChemVersion() || CHR(10);
res := res || 'JChem version in the Tomcat server: ' ||
get_param('JCHEM_SERVLET_URL', 'JChemVer', '');
res := res || CHR(10) ||
get_param('JCHEM_SERVLET_URL', 'ToolVer', '');
dbms_output.put_line(res);
res := TRIM(CHR(10) FROM res);
RETURN tmp || res;
END;
If I comment out the call for get_param it works.
Also the following fails.
SQL> exec jchem_core_pkg.use_password('CHEMICAL');
BEGIN jchem_core_pkg.use_password('CHEMICAL'); END;
*
ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception:
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
ORA-06512: at "JCHEM.JCHEM_CORE_PKG", line 0
ORA-06512: at "JCHEM.JCHEM_CORE_PKG", line 119
ORA-06512: at line 1
Attached is the trace file for test.sql
Help please,
Regards
Mikael
I've installed version 3.0.12 of Jchem together with Oracle 9.2.0.6, Java 1.4.2 and Tomcat 4.1.31
The installation went fine, but when I try to run the test.sql
I get the following error.
SQL> select jchem_core_pkg.getenvironment() from dual;
select jchem_core_pkg.getenvironment() from dual
*
ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception:
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
ORA-06512: at "JCHEM.JCHEM_CORE_PKG", line 0
ORA-06512: at "JCHEM.JCHEM_CORE_PKG", line 108
I traced the error to the following in the body JCHEM_CORE_PKG
FUNCTION getEnvironment RETURN VARCHAR2 IS
TYPE EmpCurTyp IS REF CURSOR;
cur EmpCurTyp;
res VARCHAR2(32767);
tmp VARCHAR2(32767);
BEGIN
check_master_table();
OPEN cur FOR 'select banner from sys.v_$version';
LOOP
FETCH cur INTO res;
tmp := tmp || res || CHR(10);
EXIT WHEN cur%NOTFOUND;
END LOOP;
dbms_output.put_line(tmp);
res := 'JChem version in the database: '||
Jchem_Core_Pkg.getJChemVersion() || CHR(10);
res := res || 'JChem version in the Tomcat server: ' ||
get_param('JCHEM_SERVLET_URL', 'JChemVer', '');
res := res || CHR(10) ||
get_param('JCHEM_SERVLET_URL', 'ToolVer', '');
dbms_output.put_line(res);
res := TRIM(CHR(10) FROM res);
RETURN tmp || res;
END;
If I comment out the call for get_param it works.
Also the following fails.
SQL> exec jchem_core_pkg.use_password('CHEMICAL');
BEGIN jchem_core_pkg.use_password('CHEMICAL'); END;
*
ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception:
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
ORA-06512: at "JCHEM.JCHEM_CORE_PKG", line 0
ORA-06512: at "JCHEM.JCHEM_CORE_PKG", line 119
ORA-06512: at line 1
Attached is the trace file for test.sql
Help please,
Regards
Mikael