Problems with JChem 3.1.0 install?

User 77bcbbb206

26-08-2005 21:40:14

Hi,





Windows 2000


Tomcat 4.1


JChem 3.1.0


Oracle 9.2.0.5.0


j2sdk1.4.2_09





I'm having a problem installing JChem 3.1.0. The installation notes on the chemaxon web site seems to be a bit either out of date, incomplete, or wrong with regards to Windows OS.





I've been attempting an upgrade from JChem 3.0.8 to 3.1.0. I'm working on a development server, however, so I've dropped the schema completely and am attempting to make clean install.





I downloaded the jchem zip file ("jchem3.1.0.zip") and placed it's contents into my c:\jchem folder.





I shutdown Tomcat.





I then copied my "batik-core.jar", "chart.jar", "dom4j.jar", "jchem.jar", "jogl.jar", "ojdbc14.jar" files into my c:\Tomcat 4.1\shared\lib directory.





I then copied my "jchemstreams.war" file into my c:\Tomcat 4.1\webapps directory.





After restarting Tomcat I granted the connect privs to my newly re-created schema user (JCHEM).





The chemaxon documentation says:


"call dbms_java.grant_permission( 'JCHEM', 'SYS:java.net.SocketPermission', '127.0.0.1:8080', 'connect,resolve' )"





but I think with windows you need:


"call dbms_java.grant_permission( 'JCHEM', 'SYS:java.net.SocketPermission', 'localhost', 'resolve' );"


or


"call dbms_java.grant_permission( 'JCHEM', 'SYS:java.net.SocketPermission', 'localhost:8080', 'connect,resolve' );".





The chemaxon documentation then says to set the env variable ORA_HOME=c:\oracle\ora92 but when I do this and attempt to "install jchem/jchem" I get the error message "The ORACLE_HOME variable is not set"? I then set the ORACLE_HOME variable and the install seems to take.





I get about 3/4 of the way done and then I get total install failure. Here is the output:





C:\Documents and Settings\jmoeder>cd c:\jchem\cartridge





C:\JChem\cartridge>install jchem/jchem


ORACLE_HOME is not set.





C:\JChem\cartridge>set ORACLE_HOME=c:\oracle\ora92





C:\JChem\cartridge>install jchem/jchem


Loading Java classes into Oracle Server


This process can take several minutes





C:\JChem\cartridge>call c:\oracle\ora92\bin\loadjava.bat -force -user "jchem/jchem" ..\lib\dom4j.jar





C:\JChem\cartridge>call c:\oracle\ora92\bin\loadjava.bat -force -user "jchem/jchem" ..\lib\jchem.jar


Hard-wire the name of the JChem owner's schema into the the jchem_core_pkg...





C:\JChem\cartridge>"C:\j2sdk1.4.2_08\bin\java.exe" -cp ../lib/jchem.jar chemaxon.jchem.cartridge.ChUrl prepare-sqlscript jchem/jchem jchem_cart.sql





C:\JChem\cartridge>call c:\oracle\ora92\bin\sqlplus "jchem/jchem" @jchem_cart.sql_





SQL*Plus: Release 9.2.0.5.0 - Production on Fri Aug 26 12:15:29 2005





Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.








Connected to:


Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production


With the Partitioning, OLAP and Oracle Data Mining options


JServer Release 9.2.0.5.0 - Production








Type created.








Type created.








Type created.








Type created.








Type created.





No errors.





Package created.





No errors.





Package created.





No errors.





Package created.





No errors.





Package created.





No errors.





Package body created.





No errors.





Package body created.





No errors.





Type created.





No errors.





Type body created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Procedure created.





No errors.





Procedure created.





No errors.





Procedure created.





No errors.





Function created.





No errors.





Operator created.








Operator created.








Operator created.








Operator created.








Operator created.








Operator created.








Operator created.








Operator created.








Operator created.








Operator created.








Operator created.








Operator created.








Operator created.








Operator created.








Operator created.








Operator created.








Operator created.








Operator created.








Operator created.








Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Procedure created.





No errors.





Function created.





No errors.





Operator created.








Operator created.








Operator created.








Operator created.








Operator created.








Operator created.








Operator created.








Operator created.








Operator created.








Operator created.








Operator created.








Operator created.








Operator created.








Call completed.








Indextype created.








Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.





Function created.





No errors.


Disconnected from Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production


With the Partitioning, OLAP and Oracle Data Mining options


JServer Release 9.2.0.5.0 - Production





C:\JChem\cartridge>call c:\oracle\ora92\bin\sqlplus "jchem/jchem" @jchem_util.sql





SQL*Plus: Release 9.2.0.5.0 - Production on Fri Aug 26 12:15:36 2005





Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.








Connected to:


Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production


With the Partitioning, OLAP and Oracle Data Mining options


JServer Release 9.2.0.5.0 - Production








Package created.





No errors.





Package body created.





No errors.


Disconnected from Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production


With the Partitioning, OLAP and Oracle Data Mining options


JServer Release 9.2.0.5.0 - Production





C:\JChem\cartridge>echo Create the SQL script used to register the JChem service URLs...


Create the SQL script used to register the JChem service URLs...





C:\JChem\cartridge>"C:\j2sdk1.4.2_08\bin\java.exe" -cp ../lib/jchem.jar chemaxon.jchem.cartridge.ChUrl register-urls jchem/jchem


java.lang.NullPointerException


at chemaxon.jchem.cartridge.ChUrl.createEndPointInstallScript(ChUrl.java:136)


at chemaxon.jchem.cartridge.ChUrl.main(ChUrl.java:168)





SQL*Plus: Release 9.2.0.5.0 - Production on Fri Aug 26 12:15:37 2005





Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.








Connected to:


Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production


With the Partitioning, OLAP and Oracle Data Mining options


JServer Release 9.2.0.5.0 - Production





delete from jc_idx_property where prop_name like 'jchem.service.endPoint.url.%'


*


ERROR at line 1:


ORA-00980: synonym translation is no longer valid





SQL>








Now, just to ensure this was a failure, I attempt a "test jchem/jchem", which gives me this:





C:\JChem\cartridge>test jchem/jchem





SQL*Plus: Release 9.2.0.5.0 - Production on Fri Aug 26 12:29:28 2005





Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.








Connected to:


Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production


With the Partitioning, OLAP and Oracle Data Mining options


JServer Release 9.2.0.5.0 - Production





select jchem_core_pkg.getenvironment() from dual


*


ERROR at line 1:


ORA-29532: Java call terminated by uncaught Java exception:


java.lang.IndexOutOfBoundsException: Index: 0, Size: 0


ORA-06512: at "JCHEM.JCHEM_CORE_PKG", line 0


ORA-06512: at "JCHEM.JCHEM_CORE_PKG", line 84








Disconnected from Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production


With the Partitioning, OLAP and Oracle Data Mining options


JServer Release 9.2.0.5.0 - Production


C:\JChem\cartridge>





This is just to see if it helps you figure out what went wrong.





I have dropped the schema and re-created it a few times in an attempt to see if this was a fluke, but it happens everytime. I pretty out of ideas?????





Help?





Thanks,


Jim

ChemAxon aa7c50abf8

29-08-2005 15:08:18

Quote:
The chemaxon documentation says:


"call dbms_java.grant_permission( 'JCHEM', 'SYS:java.net.SocketPermission', '127.0.0.1:8080', 'connect,resolve' )"





but I think with windows you need:


"call dbms_java.grant_permission( 'JCHEM', 'SYS:java.net.SocketPermission', 'localhost', 'resolve' );"


or


"call dbms_java.grant_permission( 'JCHEM', 'SYS:java.net.SocketPermission', 'localhost:8080', 'connect,resolve' );".
127.0.0.1 works for me on Windows XP.
Quote:
The chemaxon documentation then says to set the env variable ORA_HOME=c:\oracle\ora92 but when I do this and attempt to "install jchem/jchem" I get the error message "The ORACLE_HOME variable is not set"? I then set the ORACLE_HOME variable and the install seems to take.
This is a bug in the documentation. It will be fixed for the next release. Sorry!





There is a bug in the install scripts. It will be fixed for the next JChem release. In the meantime, here is the fixed version:


Quote:



@echo off





if not "%ORACLE_HOME%" == "" goto first


echo ORACLE_HOME is not set.


goto eof





:zero


if exist "%JAVA_HOME%\bin\java.exe" goto first


echo The JAVA_HOME environment variable is not or not appropriately set.


goto eof





:first





if exist "%ORACLE_HOME%\bin\sqlplus.exe" goto second


echo ORACLE_HOME is not set properly. ORACLE_HOME\bin\sqlplus.exe cannot found.


goto eof





:second





if not "%1" == "" goto third


echo Usage: install.bat username[/password][@connect_string]


goto eof





:third





set URL=http://localhost:8080/jchemstreams/





if not "%2" == "" set URL="%2"





echo Loading Java classes into Oracle Server


echo This process can take several minutes





@echo on


call %ORACLE_HOME%\bin\loadjava.bat -force -user "%1" ..\lib\dom4j.jar





@echo on


call %ORACLE_HOME%\bin\loadjava.bat -force -user "%1" ..\lib\jchem.jar





@echo on


@echo Hard-wire the name of the JChem owner's schema into the the jchem_core_pkg...


"%JAVA_HOME%\bin\java.exe" -cp ../lib/jchem.jar chemaxon.jchem.cartridge.ChUrl prepare-sqlscript %1 jchem_cart.sql


@echo off





@echo off


IF %ERRORLEVEL% GEQ 1 GOTO eof





@echo on


call %ORACLE_HOME%\bin\sqlplus "%1" @jchem_cart.sql_


call %ORACLE_HOME%\bin\sqlplus "%1" @jchem_util.sql





@echo on


echo Create the SQL script used to register the JChem service URLs...


"%JAVA_HOME%\bin\java.exe" -cp ../lib/jchem.jar chemaxon.jchem.cartridge.ChUrl register-urls %1 %URL%


@echo off





call %ORACLE_HOME%\bin\sqlplus "%1" @register-urls.sql


:eof


Sorry!

User 77bcbbb206

29-08-2005 16:37:34

pkovacs,





No problem about the confusion. I'm just glad we're getting it figured out.





I'm still having problems installing the 3.1.0 version, though.





In the online documentation the line:
Quote:
On windows: set ORACLE_HOME="c:\oracle\ora92"
should be
Quote:
On windows: set ORACLE_HOME=c:\oracle\ora92
That's not a big deal, but I'm still getting this:
Quote:



......





C:\JChem\cartridge>echo Create the SQL script used to register the JChem service URLs...


Create the SQL script used to register the JChem service URLs...





C:\JChem\cartridge>"C:\j2sdk1.4.2_09\bin\java.exe" -cp ../lib/jchem.jar chemaxon.jchem.cartridge.ChUrl register-urls jchem/jchem http://localhost:8080/jchemstreams/





SQL*Plus: Release 9.2.0.5.0 - Production on Mon Aug 29 09:34:00 2005





Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.








Connected to:


Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production


With the Partitioning, OLAP and Oracle Data Mining options


JServer Release 9.2.0.5.0 - Production





delete from jc_idx_property where prop_name like 'jchem.service.endPoint.url.%'


*


ERROR at line 1:


ORA-00980: synonym translation is no longer valid











Call completed.





Disconnected from Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production


With the Partitioning, OLAP and Oracle Data Mining options


JServer Release 9.2.0.5.0 - Production


C:\JChem\cartridge>





The code seems to complete, but not after a error occurred.





Creating a structure table through jcman works, but through the command line throws an error. I'm not sure if the installation is incomplete or I'm not calling the command line jcman correctly?
Quote:



C:\JChem\cartridge>call jcman c RMS_STRUCTURE -l JCHEM -p JCHEM --driver oracle.jdbc.OracleDriver --dburl jdbc:oracle:thin:@KDEV2:1521:KRMS


Cannot connect:


java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=153093376)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))


at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)


at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)


at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:334)


at oracle.jdbc.ttc7.TTC7Protocol.handleIOException(TTC7Protocol.java:3678)


at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:352)


at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:365)


at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:547)


at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:347)


at java.sql.DriverManager.getConnection(DriverManager.java:512)


at java.sql.DriverManager.getConnection(DriverManager.java:171)


at chemaxon.util.ConnectionHandler.setConnected(ConnectionHandler.java:206)


at chemaxon.util.ConnectionHandler.connect(ConnectionHandler.java:246)


at chemaxon.jchem.Command.main(Command.java:379)





C:\JChem\cartridge>


Any ideas?





Thanks,


Jim

ChemAxon aa7c50abf8

29-08-2005 17:03:38

Quote:
The code seems to complete, but not after a error occurred.
You can safely ignore the error message about deleting from jc_idx_property. (It is not nice, I aggree.)





Did the test.bat script correctly ouptut the version information?

User 77bcbbb206

29-08-2005 17:12:17

Sorry about that. I should have done the test first. It works.
Quote:
C:\JChem\cartridge>test jchem/jchem





SQL*Plus: Release 9.2.0.5.0 - Production on Mon Aug 29 10:19:59 2005





Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.








Connected to:


Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production





With the Partitioning, OLAP and Oracle Data Mining options


JServer Release 9.2.0.5.0 - Production








JCHEM_CORE_PKG.GETENVIRONMENT()


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


Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production


PL/SQL Release 9.2.0.5.0 - Production


CORE 9.2.0.6.0 Production


TNS for 32-bit Windows: Version 9.2.0.5.0 - Production


NLSRTL Version 9.2.0.5.0 - Production


NLSRTL Version 9.2.0.5.0 - Production


JChem version in the database: 3.1


JChem version in the Tomcat server: 3.1


java.vm.version: 1.4.2_09-b05


java.vm.vendor: Sun Microsystems Inc.


Apache Tomcat/4.1.31





JCHEM_CORE_PKG.GETENVIRONMENT()


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


Major JDBC version in Tomcat: 1


Minor JDBC version in Tomcat: 0








Disconnected from Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production


With the Partitioning, OLAP and Oracle Data Mining options


JServer Release 9.2.0.5.0 - Production


C:\JChem\cartridge>

ChemAxon aa7c50abf8

29-08-2005 17:12:52

Your last error indicates that jcman does not see the Oracle database at the dburl specified (--dburl). Check if the dburl argument is correct. I also suggest to restart the OracleTNSListener service. On Windows, the OracleTNSListener is sometimes listed as a running service, even though it is not listening any more. (A database restart might also be useful.) Are you able to connect to the db from your client machine using sqlplus?

ChemAxon aa7c50abf8

29-08-2005 17:16:16

Based on the output of the test script, the cartridge is correctly installed. By "your last error" in my previous mail, I meant the SQLException generated by jcman.

User 77bcbbb206

29-08-2005 17:26:34

As usual, you're correct.





It looks like the "--dburl" parameter was incorrect. I had the SID entered as an alias in the TNS names file (not the base service). For an example, when oracle was installed, it was named ORA_DEFAULT. In the TNS names file, I have added an entry to access ORA_DEFAULT as KRMS. I then used the jcman call:
Quote:
call jcman c RMS_STRUCTURE -l JCHEM -p JCHEM --driver oracle.jdbc.OracleDriver --dburl jdbc:oracle:thin:@KDEV2:1521:KRMS
This did not work. But if I use:
Quote:
call jcman c RMS_STRUCTURE -l JCHEM -p JCHEM --driver oracle.jdbc.OracleDriver --dburl jdbc:oracle:thin:@KDEV2:1521:ORA_DEFAULT
It works perfectly. Does this mean you have to specify the service name in a jcman call? I'm assuming so.





Regarless, thanks for all the help. I think I can take it from here.





-Jim