cartridge install issue?

ChemAxon 60ee1f1328

06-12-2005 12:39:48

Our database server has changed ip address and joined a w2003 domain (hooray) and as a result I have attempted to replace the existing jchem3.0.12 cartridge with the same install only referencing the new server name/ip address.





The following error types have occurred due to existing object references:





CREATE OR REPLACE OPERATOR jc_standardizeb BINDING(BLOB, VARCHAR2) RETURN BLOB


*


ERROR at line 1:


ORA-29809: cannot drop an operator with dependent objects





Call completed.





CREATE OR REPLACE INDEXTYPE jc_idxtype


*


ERROR at line 1:


ORA-29832: cannot drop or replace an indextype with dependent indexes





Please advise on the best course of action. Presumably these can be ignored because the cartridge version is equivalent?

ChemAxon 60ee1f1328

06-12-2005 12:41:58

select jchem_core_pkg.getenvironment() from dual;





returns an apparently correct value of:





Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production


PL/SQL Release 9.2.0.1.0 - Production


CORE 9.2.0.1.0 Production


TNS for Linux: Version 9.2.0.1.0 - Production


NLSRTL Version 9.2.0.1.0 - Production


NLSRTL Version 9.2.0.1.0 - Production


JChem version in the database: 3.0.12


JChem version in the Tomcat server: 3.0.12


java.vm.version: 1.4.2_07-b05


java.vm.vendor: Sun Microsystems Inc.


Apache Tomcat/5.0.28

ChemAxon aa7c50abf8

06-12-2005 14:59:37

If your database server and Tomcat with JChem Streams are on the same machine, the preferred way to refer to each other is through "localhost". The stored procedure could then refer to JChem Streams using "http://127.0.0.1..." URL, while JChem Streams in Tomcat could refer to the database using "jdbc:oracle:thin:@127.0.0.1...". This way you do not have to change anything, if the IP address of your JChem Cartridge machine changes.





If your database server and JChem Streams are located on different machines and the IP address of your database server changes, you have to change the JDBC URL using the WEB-based administration GUI for JChem Streams from "jdbc:oracle:thin:@<old-ip>..." to "jdbc:oracle:thin:@<new-ip>...".





If your database server and JChem Streams are located on different machines and the IP address of the JChem Streams WEB-application changes, you have to change the reference of the JChem Cartridge stored procedures from "http://<old-ip>..." to "http://<new-ip>...". With JChem versions prior to 3.1, the only way to do this is to uninstall the database resident portion of JChem Cartridge and reinstall it with the new IP address. The reason is that the JChem Streams URL is hard-wired in the stored procedures during installation. With JChem versions starting with 3.1, the alternative and simple way is to change the value of the property "jchem.service.endPoint.url.1" in the jc_idx_property table in the JChem Cartridge owner's schema (where the JChem Cartridge stored procedures are located):





Code:
update jc_idx_property set prop_value = '<new-jchem-streams-url>' where prop_name = 'jchem.service.endPoint.url.1';






Each new database session that has been started after this change has been committed will use the new URL.





Now back to your specific case. You said that your database server's IP address has changed. You also appear to have attempted to change the reference to the JChem Streams WEB-application in your JChem Cartridge stored procedures. From these two facts, I infer that (a) your database and JChem Streams application are located on the same machine; (b) you did not initially use 127.0.0.1 or "localhost" to refer to JChem Streams. The error messages reported suggests that most of the stored procedure could not be recreated. (This is obviously due to the fact that you have not properly uninstalled JChem Cartridge.) So the the old stored procedures are still in the database with the old JChem Streams URL hard-wired in them. (You can check the text of the currently installed PL/SQL stored procedures with statements like:


Code:
select * from all_source where lower(owner) = '<jchem-owner-lc>' and lower(name) like 'jchem_core_pkg'



)





I suggest to uninstall JChem Cartridge and install the newest JChem version.

User cfaffaaf29

16-12-2005 22:32:36

I'm trying to install the JChemCartridge on Windows Server 2003 but I have not been able to open the JChem Streams web application.





I have successfully installed JChemBase on Oracle 10g (running on same machine as the attempted Cartridge installation) and have created JChem structure tables and loaded them with sd files.





TomCat 5 was downloaded as the installer wizard jakarta-tomcat-5.0.28.exe. A default installation was made and the Wizard found the JVM at C:\Program Files\Java\jre1.5.0_06.





The JAVA 2 SDK Std Edition 1.4.2_10 was installed from j2sdk-1_4_2_10-windows-i586-p.exe. A default installation was made.





A new environmental JAVA_HOME was then added -> C:\Program Files\Java\j2re1.4.2_10





jogl.jar, batik-core.jar, chart.jar, dom4j.jar and jchem.jar and ojdbc14.jar were copied to C:\Program Files\Apache Software Foundation\Tomcat 5.0\shared\lib\





With TomCat still turned off, I attempted to set JAVA options, through the Configure Tomcat application.





Adding the following line to the Java Options panel under the Java tab worked


-Djava.awt.headless=true





However if


-server


-Xmx400m





were added, TomCat would not start. C:/jchem/doc/admin/cartridge.html#server_jdbc advises manually editing the <tomcat-home>/bin/catalina.bat with the Windows equivalent of


export JAVA_OPTS=${JAVA_OPTS}' -Xmx360m'


But I don't know what the Windows equivalent syntax is? However, these two settings should not be critical for starting the cartridge right?





Default port for TomCat is 8080 but this conflicts with a service running on XDB Therefore the default port assignment for TomCat was changed to 9090.





TomCat was then started in order to acces the web admin tool: http://localhost:9090/admin. This opened successfully and a new context was added:


Document Base c:\jchem and Path /jchem


Which was confirmed by opening and closing the host node which also showed the jchemstreams site.





Tomcat was then stopped and restarted and a browser page (IE) opened to


http://localhost:9090/jchemstreams/ which returned the dreaded HTTP:500 error





description The server encountered an internal error () that prevented it from fulfilling this request.





exception





org.apache.jasper.JasperException: /index.jsp(5,0) The value for the useBean class attribute chemaxon.jchem.cartridge.util.JChemCartProperties is invalid.


org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)


org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)


org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:150)


org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1227)


org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)


org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)


org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)


org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)


org.apache.jasper.compiler.Node$Root.accept(Node.java:456)


org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)


org.apache.jasper.compiler.Generator.generate(Generator.java:3272)


org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:244)


org.apache.jasper.compiler.Compiler.compile(Compiler.java:470)


org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)


org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)


org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)


org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)


org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)


org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)


javax.servlet.http.HttpServlet.service(HttpServlet.java:802)





note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.





Are my beans not registered?

ChemAxon aa7c50abf8

19-12-2005 08:42:52

You most probably forgot step 3.) in http://www.chemaxon.com/jchem/doc/admin/cartridge.html#server_install


.

User cfaffaaf29

19-12-2005 13:59:16

My apologies, my notes indicated that the jar files had been copied over, but your diagnosis was correct: shared/lib was empty. I can now confirm that


jogl.jar, batik-core.jar, chart.jar, dom4j.jar, jchem.jar and inchi.dll all currently reside in C:\Program Files\Apache Software Foundation\Tomcat 5.0\shared\lib\.





Sending my browser to http://localhost:9090/jchemstreams/ now returns





Exception


org.apache.jasper.JasperException: Unable to compile class for JSP


Unable to find a javac compiler;


com.sun.tools.javac.Main is not on the classpath.


Perhaps JAVA_HOME does not point to the JDK





My javac.exe resides in C:\j2sdk1.4.2_10\bin and


echo %JAVA_HOME% -> C:\j2sdk1.4.2_10





Did the Java SDK fail to register with COM? Do I need to add to CLASSPATH?


echo %CLASSPATH% -> G:\oracle\product\10.1.0\db_1\jdbc\lib\classes12.jar;C:\jchem\CrimsonLib\crimson


-1.1.3\crimson.jar

ChemAxon aa7c50abf8

19-12-2005 15:00:34

It has occurred to me right now that plain vanilla Tomcat 5.x cannot be used with JDK 1.4.x. For Tomcat 5.x, we recommend to use the newest JDK 1.5. Sorry for not having mentioned this earlier (I did not remember myself.) I suggest to


1.) uninstall Tomcat


2.) uninstall JDK


3.) download ( http://java.sun.com/j2se/1.5.0/download.jsp ) and install JDK 5.0 Update 6


4.) (re)install Tomcat


5.) reinstall the Tomcat-resident part of JChem Cartridge





If, for some reason, you absolutely need JDK 1.4.2, I recommend to uninstall Tomcat 5 and install the newest version of Tomcat 4 (and reinstall the Tomcat-resident part of JChem Cartridge).

ChemAxon 9c0afc9aaf

19-12-2005 15:12:17

A minor thing:





You can also remove crimson.jar from your CLASSPATH: it is only needed for JRE 1.3.1 (later Java versions contain this code).





Regards,





Szilard

User cfaffaaf29

19-12-2005 19:05:09

I believe I followed your recommendations, I uninstalled the 1.4.2 JDK and TomCat 5. I then downloaded and installed JDK 5.0 Update 6 and set JAVA_HOME to C:\Program Files\Java. I reinstalled TomCat 5 and directed it to the JVM at C:\Program Files\Java\jre1.5.0_06.





I copied jchemstreams.war to \Tomcat 5.0\webapps and the jchem .jar files and ojdbc14.jar to \Tomcat 5.0\shared\lib\





But I'm not sure what you mean by





>> 5.) reinstall the Tomcat-resident part of JChem Cartridge





I started Tomcat and tried to open a page to http://localhost:9090/jchemstreams/


but continue to get


"org.apache.jasper.JasperException: Unable to compile class for JSP


Unable to find a javac compiler;


com.sun.tools.javac.Main is not on the classpath.


Perhaps JAVA_HOME does not point to the JDK"





I changed JAVA_HOME to C:\Program Files\Java\jdk1.5.0_06 (javac.exe resides in C:\Program Files\Java\jdk1.5.0_06\bin) but that made no difference. Is this a permissions problem? Do I have to specifically grant Tomcat access to the compiler?

ChemAxon 9c0afc9aaf

19-12-2005 20:36:33

Hi,





It can also cause a problem if you set JAVA_HOME as a "User variable".


Please set it as a "System variable".


You should restart Tomcat after this.





Regards,





Szilard

ChemAxon aa7c50abf8

19-12-2005 20:56:05

Quote:
But I'm not sure what you mean by





>> 5.) reinstall the Tomcat-resident part of JChem Cartridge
I basically meant what you did anyway:
Quote:
I copied jchemstreams.war to \Tomcat 5.0\webapps and the jchem .jar files and ojdbc14.jar to \Tomcat 5.0\shared\lib\
Please, check to see if the the "JavaHome" keys are set to the appropriate values under following Windows registry entries:





HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit


HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment

User cfaffaaf29

19-12-2005 21:35:46

>It can also cause a problem if you set JAVA_HOME as a "User variable".





JAVA_HOME was set as a System variable at the outset. :-(





>Please, check to see if the the "JavaHome" keys are set to the appropriate values under following Windows registry entries:





Registries seem OK, I pulled the following off the REGEDIT:





HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit


Name Type Data


JavaHome REG_SZ C:\Program Files\Java\jdk1.5.0_06





HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment


JavaHome REG_SZ C:\Program Files\Java\jre1.5.0_06


RuntimeLib REG_SZ C:\Program Files\Java\jre1.5.0_06\bin\client\jvm.dll





So I found out that the "Unable to find a javac compiler" error is pretty nearly meaningless, supposedly its simply thrown out any time there is any kind of compilation error. Is there a more meaningful log file I can check out?

ChemAxon aa7c50abf8

19-12-2005 22:10:56

Do you have a tools.jar file in C:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib? If not, copy the one from C:\Program Files\Java\jdk1.5.0_06\lib there.





The logs are under


C:\Program Files\Apache Software Foundation\Tomcat 5.0\logs

User cfaffaaf29

21-12-2005 17:10:51

Huzzah! including tools.jar cracked it, I got http://localhost:9090/jchemstreams/ open at last. But I still have not been able to set bytecode compilation to -server or the memory allocation pool to -Xmx360m (or any other size). After I added -Djava.awt.headless=true, TomCat will still start, but adding either of the other two parameters (-server or -Xmx###m) prevents the service from restarting. Could these settings have changed from TomCat 4.1.x to 5.0? I can't find anything in the Jakarta documentation on their setting.

ChemAxon aa7c50abf8

21-12-2005 17:34:19

1.) Please, open the Tomcat 5 configuration utility. You can do this by either


(a) right clicking on the Apache Tomcat icon --if present-- in the notification area of the taskbar or


(b) selecting Start / All Programs / Apache Tomcat 5.0 / Configure Tomcat.





2.) Select the "Java" tab.





In the "Java Virtual Machine" edit box you should see "C:\Program Files\Java\jdk1.5.0_06\jre\bin\server\jvm.dll". Note that the jvm.dll in the "server" subdirectory is selected. This is the equivalent of setting the "-server" argument.





The -Xmx value can be set in the "Maximum memory pool" edit box. (Logically, it should be called "Maximum Java heap size")





Peter