Unable to load JSP

User ad9f2ddc4f

12-01-2005 16:23:14

I recently installed the JChem application on our webserver. I've


followed the directions as carefully as possible, however, I end up with


the following error. I am running Linux Red Hat 9.0 with Tomcat 5.0 and


Sun Jwsdp 1.5. I've placed all of the files from $JCHEM_HOME\lib into


the directory $TOMCAT_HOME\Shared\lib





batik-core.jar chart.jar dom4j.jar jchem.jar





And these files from the $JCHEM_HOME\marvin directory to the same place





marvin.jar js2java.jar jmarvin.jar





In addition, I've copied the class files from


$JCHEM_HOME\marvin\chemaxon into the directory


$TOMCAT_HOME\Shared\Classes.





I downloaded all of this from the website yesterday and today. Should


there be a DotfileUtil.class somewhere. I don't understand why the


application is not running.





Here is the error message


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





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


An error occurred at line 23 in the jsp file /examples/jsp1_x/setup.jsp





Generated servlet error


[javac] Compiling 1 source file





/usr/local/tomcat50-jwsdp/work/Catalina/localhost/jchem/org/apache/jsp/examples/jsp1_005fx/setup_jsp.java60 cannot resolve symbol


symbol variable DotfileUtil


location class org.apache.jsp.examples.jsp1_005fx.setup_jsp


String chemDir=DotfileUtil.getDotDir().getAbsolutePath();


^


1 error


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





Have I places the class files in the correct location? Is there something else that may be wrong. This problem appears to be something specific to Jchem since other JSP pages are working correctly.

ChemAxon 9c0afc9aaf

12-01-2005 16:51:14

Quote:
I've placed all of the files from $JCHEM_HOME\lib into


the directory $TOMCAT_HOME\Shared\lib





batik-core.jar chart.jar dom4j.jar jchem.jar
OK, this is all you need in shared/lib, plus the JDBC driver of course.


(this latter one usually ships with the database)
Quote:
And these files from the $JCHEM_HOME\marvin directory to the same place:





marvin.jar js2java.jar jmarvin.jar





In addition, I've copied the class files from


$JCHEM_HOME\marvin\chemaxon into the directory


$TOMCAT_HOME\Shared\Classes.
The files mentioned above should not be copied into Tomcat's lib directory,


please remove them. (otherwise version conflicts can cause nasty errors)








From the error message it seems that Tomcat cannot find a class in jchem.jar.


Did you restart Tomcat after copying the jar files into the lib directory ?





Szilard

User ad9f2ddc4f

12-01-2005 17:56:08

I have removed the files as requested and restarted tomcat and the server. Unfortunately I see the same problem. I have tried to load several of the JSP files in the examples directory. I receive the same error. Is it possible that the server is not compiling on the fly and that the JSPs need to be precompiled? However, it does appear that it is attempting to compile since the errors are found.

ChemAxon 9c0afc9aaf

17-01-2005 10:15:37

Does the user running the Tomcat server has a right to read the jchem.jar file ?





Also you wrote "$TOMCAT_HOME\Shared\lib".


You meant "$TOMCAT_HOME\shared\lib" I guess ?


(as far as I remember it is in lowercase)





You may also try to delete the content of $TOMCAT_HOME\work directory, but I'm not sure it would make any difference.

User ad9f2ddc4f

17-01-2005 20:58:40

After looking into this more, I realized the problem was that the CATALINA_OPTS environment variable had not been properly set. I adjusted the value to be "-server -Xmx400m" and everything is now working.