Instalation problems

User 6730ca736b

03-08-2004 00:08:03

Hello,





I am trying to install the Oracle cartridge but I am getting multiple errors when running the installation script.


This is Jchem version 2.2.1 and Oracle 9i.


I also tried to run each command from the script separately to load all the java classes. A lot of the classes won't compile because they reference other classes that do not exist, as it can be seen in the errors when running the installation script(see below). What am I missing?





Thanks for the help





Radu





Here is what happens when I run the install.sh script:








$ ./install.sh user/pw@db http://localhost:8089/jchemstreams/


Loading jchem.jar, dom4j.jar, and JFunctions.class into Oracle Server.


This process can take several minutes.


errors : class JFunctions


ORA-29534: referenced object user.chemaxon/jchem/db/UpdateHandler could not be resolved


The following operations failed


class JFunctions: resolution


exiting : Failures occurred during processing


Installing JChem Cartridge services into Oracle Server


URL of JChem Streams: http://localhost:8089/jchemstreams/


Exception in thread "main" java.lang.NoClassDefFoundError: ChUrl





SQL*Plus: Release 9.2.0.4.0 - Production on Mon Aug 2 16:11:21 2004





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





Enter user-name: SP2-0306: Invalid option.


Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]


where <logon> ::= <username>[/<password>][@<connect_string>] | /


Enter user-name: SP2-0310: unable to open file "jchem_cart_.sql"

ChemAxon aa7c50abf8

03-08-2004 08:49:50

Hello Radu,





As a first step, I would like to focus on the following error message in your posting





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


Exception in thread "main" java.lang.NoClassDefFoundError ChUrl


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





This error message means that the installation script tries to start the ChUrl Java class, but the Java runtime which is used to start the class cannot find in its classpath the definition of this class.





As you might have seen in the installation script, the ChUrl Java class is started with the following command





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


java -cp . ChUrl $URL $1


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





This means that the class path for the Java runtime is set tot the current working directory. Thus the most likely explanation for the error message above is that the "ChUrl.class" file does not exist in your current working directory.





Please, could you check if the "ChUrl.class" file exists in your current working directory?





Peter

User 5efe442094

03-08-2004 09:24:46

Hello Radu,





You may also need to rename the jchem_cart.sql file located in the jchem/cartridge/ directory, to jchem_cart_.sql.





The install script is looking for the file with an extra underscore in the name. I have also found this with JChem version 23pre3.





Gemma

User 5efe442094

03-08-2004 11:21:58

Further to may last post, I am having more problems installing JChem version 23pre3.





The install.sh script seems to remove the "jchem_cart_.sql" from the jchem/cartridge directory, which means that then it cannot find it and returns the error in the attached file.





Is a bug, or have I missed a part of the installation?





Thanks in advance,


Gemma

User 5efe442094

03-08-2004 12:22:10

I have now managed to install version 23pre3, by having both "jchem_cart.sql" and "jchem_cart_.sql" in the jchem/cartridge directory.

ChemAxon aa7c50abf8

03-08-2004 13:23:41

Hi Gemma,





I am glad that your installation problem have been sorted out.





You correctly noticed that the installation script first removes the "jchem_cart_.sql" file [if the file exists]. However, the script then calles the ChUrl Java program to [re]generate "jchem_cart_.sql" based on "jchem_cart.sql".





Based on the output of the installation script you attached, ChUrl could not find "jchem_cart.sql", so "jchem_cart_.sql" was not [re]generated and that's why sqlplus later complained about not finding "jchem_cart_.sql".





I checked the 2.3.pre3 package and found that "jchem_cart.sql" is located in the jchem/cartridge directory. So I cannot really explain, why ChUrl did not find it in your case. However, I found lines #12, #13 of the output you attached very suspicious





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


./install.sh line 34 21346 Killed $ORA_HOME/bin/loadjava -res


olve -force -user "$1" BatchResultProcessor.class


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





In my opinion, these lines indicate that external events occurred during installation that may have interfered with the installation script.





Peter

User 6730ca736b

03-08-2004 17:40:39

Peter,


thank you for the reply.





I got the ChUrl to run using the following syntax:





java ChUrl url user/passord





This created file jchem_cart_.sql (which did not exist before)


Afterwards, I started a SQLPlus session and run it. Everything went fine.





I am still having problems with loading the JFunctions.class file. Here is the outcome of this one:





$ loadjava -resolve -force -user "verdi/verdi" JFunctions.class


errors : class JFunctions


ORA-29534: referenced object VERDI.chemaxon/jchem/db/UpdateHandler could not be resolved


The following operations failed


class JFunctions: resolution


exiting : Failures occurred during processing





There are many other classes that do not compile because UpdateHandler class does not exist.





Radu

ChemAxon aa7c50abf8

03-08-2004 19:57:37

Radu,





The error message





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


ORA-29534 referenced object VERDI.chemaxon/jchem/db/UpdateHandler could not be resolved


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





means that either (a) the jchem.jar has not been loaded into your default Oracle database (you may have loaded it into another database or it may have not been loaded at all) or (b) VERDI does not have some privileges in its own schema (which would be weird) and this is why the java loader does not see these classes in VERDIs schema. (You can actually have only one privilege on Java classes EXECUTE, which the schema owner automatically has I guess. But still you can try to fiddle around with privileges as a last resort.)





Please, could you check with the Enterprise Manager Console, if the classes of jchem.jar have correctly been loaded into VERDI's schema? For example, you should be able to see the UpdateHandler along the following path in the console's tree panel





Network/Databases/<your default database>/Schema/Verdi/Source Types/Java Classes/chemaxon/jchem/db/


.





Peter

User 6730ca736b

03-08-2004 22:59:54

I can see all the classes (the chemaxon tree) in OEM under Verdi.


Verdi owns 2195 java classes, but a lot of them are invalid. I was tracing backward why this classes do not compile. I started with UpdateHandler and work myself backwards. I got to class


chemaxon/descriptors/MDParameters that gives me the following error when I try to compile it:





ORA-29545: badly formed class: at offset 14 of chemaxon.descriptors.MDParameters.toString expecting a class-org.w3c.dom.Node but encountered a class-org.w3c.dom.Node.





The Node class exists and is valid. Do I have a different version of this class? I don't know if this class existed before I installed dom4j.jar





Radu

User 6730ca736b

04-08-2004 01:19:19

Ok,





I got it to work (I think).


JChem classes did not work well with some of the existing classes in the Verdi user.


I created a new user and re-run through the installation (although I had to run each step manualy and compile the classes at each step) and everything went fine.





Radu

ChemAxon aa7c50abf8

04-08-2004 09:35:53

Radu,





I would be interested to know why the installation script did not work for you so we can improve it. I would, in particular, appreciate if you could tell what you had to change in the commands included in the installation scripts to make them work for you.





Thank you!





Peter

User 6730ca736b

06-08-2004 23:33:38

Peter,





First I did the first 3 loadjava commands one at the time and after each one I would go in the database and have to re-compile all the classes since all of them would be invalid. I am not sure if having invalid classes would affect the instalation of other classes that reference them.





For the ChUrl java class I had to run the following:





java ChUrl $URL $1





for some reason the -cp flags did not work for me. (I did add the crtridge directory in the classpath)





Running the jchem_cart_.sql is straight forward and I am sure it would run just fine from the script.





One other thing.


In Oracle the standard envirnment variable for Oracle home (at least in Unix systems) is $ORACLE_HOME not $ORA_HOME, so I had to define it the same as ORACLE_HOME.

ChemAxon aa7c50abf8

09-08-2004 08:44:34

Radu,





Thank you very much for your feedback!





I am not sure if having invalid classes would affect the instalation of other classes that reference them.





The classes you have loaded with loadjava are generally marked as invalid (I do not know why), but this, in my experience, does not affect the loading of dependent classes or the use of the cartridge.





for some reason the -cp flags did not work for me





The reason almost certainly is that you do not use Sun Microsystem's JDK 1.4. Please, check what kind of java runtime it is the shell finds first in your PATH. (e.g. "which java", "java -version").





Peter

User 6730ca736b

11-08-2004 00:39:00

Peter,





I installed version 2.3.


There are many (122) classes from jchem.jar that do not compile.


It seams that the root of the problem is some references to some classes that are missing. This are not your classes.


Here is some of the classes(package names) that are referenced by jchem classes but are missing:





org/gjt/xpp/..........


org/apache/batik/...........


com/sun/msv/datatype/..........


org/relaxng/datatype/........





Where are this packages/classes (looks like third party) are suppose to be installed from?





Radu

ChemAxon aa7c50abf8

11-08-2004 08:40:29

Radu,





You do not need to compile the classes in jchem.jar. They are already compiled and should work with Oracle 9iR2 without any further processing. Just let the bundled installation script load jchem.jar into Oracle and that's it. You do not need any other classes or jar files.





If the installation scripts do not work for you, let me know what the problem exactly is.





There is separate installation issue concerning the configuration of Tomcat with JChem Cartridge in addition to jchem.jar you also have to install the file 'dom2j.jar' from the lib directory of JChem to the shared/lib directory of Tomcat. The installation documentation has to be updated to include this info.





Peter

User 6730ca736b

11-08-2004 16:06:10

Peter,


I did see in the new documentation (on the website) about puting the dom4j.jar into Tomcats directory.





The test script does not work unless most of the classes are compiled (that is the reason I go back and try to re-compile all the classes).


If I just run the install script and then attempt to run the test script I get errors.

User 6730ca736b

26-08-2004 22:53:18

Peter,


I installed the new jchem version (2.3.2).


After the installation I ran the test script and I am getting the following error:





SQL> @test


select jchem_core_pkg.getSystemPrefs() from dual


*


ERROR at line 1:


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


java.lang.Exception: The following exception has been thrown by the servlet:


Exception: INCONSISTENT JCHEM VERSIONS:


JChem version in Oracle: 2.3.2, JChem version in servlet: 2.3


java.lang.RuntimeException: INCONSISTENT JCHEM VERSIONS:


JChem version in Oracle: 2.3.2, JChem version in servlet: 2.3


at JChemServletBase.checkJChemJarVersion(JChemServletBase.java:170)


at JChemServletBase.checkJChemVersions(JChemServletBase.java:157)


at JChemServletBase.doPost(JChemServletBase.java:111)


at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)


at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)


at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)


at org.apache.tomcat.core.Handler.service(Handler.java:287)


at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)


at


org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:806)


at org.apache.tomcat.core.ContextManager.servic








I did stop Tomcat, delete the jchemstreams directory and war file, and I made sure that I got the new version of the jchemstreams.war file in there. What else am I missing?

ChemAxon aa7c50abf8

27-08-2004 08:44:57

Radu,





In addition to updating the jchemstreams.war, you also need to copy the jar files from the lib directory of JChem to the shared/lib directory of Tomcat. (The error message specifically indicates that the jchem.jar file in the shared/lib directory of Tomcat has not been updated from 2.3 to 2.3.2.)





For further details on installation issues see http//www.jchem.com/doc/admin/cartridge.html#installation .





Peter