Unable to compile class" error for HTMLTools.convertFor

User 59bc43367b

25-10-2007 16:42:28

I am using the code used in simple_db_search > searchresults.jsp example. When I use it in my code, I get the "Unable to compile class" error for the line;


mview_param("cell1", "|<%= HTMLTools.convertForJavaScript(dbMolfile) %>");





I am able to connect to my structure db and get data.





What do I need to do to overcome this error? Is my header not correct? It currently is;


<%@ page import="java.sql.*" %>


<%@ page import="java.util.*" %>


<%@ page import="chemaxon.util.*" %>


<%@ page import="chemaxon.jchem.db.*" %>











(I also had same problem with DatabaseTools.readBytes. But I could use rec.getstring to get the data)

ChemAxon e274e1bada

25-10-2007 17:12:26

Hi Subodh,





Please check if all of library files from jchem/lib + your JDBC driver are in the Tomcat's shared/lib directory.





Could you send me whole stack trace?





Edvard

User 59bc43367b

25-10-2007 17:23:23

As per your site instructions, I did copy all Jchem lib files to Tomcat/lib folder.


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


Copy all the .jar files from <JChem home>/lib/ and the jar or zip file containing the JDBC driver into Tomcat's lib subdirectory:





* Tomcat 4.0: $CATALINA_HOME/lib


* Tomcat 4.1 and above: $CATALINA_HOME/shared/lib


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





One question here. I have Tomcat version 6.n It didn’t have the 'shared' folder. So I copied to ...Home/lib. Do I need to create the folder?








The stacktrace is;





Stacktrace:


org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)


org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)


org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423)


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


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


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


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


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


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


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


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

ChemAxon 9c0afc9aaf

26-10-2007 12:40:17

Hi,
Quote:
One question here. I have Tomcat version 6.n It didn’t have the 'shared' folder. So I copied to ...Home/lib. Do I need to create the folder?
No, you just have to copy into the "lib" folder right under Tomcat's home directory.








Since there are significant changes between Tomcat versions, our documentation may not be up-to-date at any moment.


Now we have re-updated it :


http://www.chemaxon.com/jchem/doc/admin/tomcat.html





Have you restarted Tomcat after copying the files in the lib directory ?





Best regards,





Szilard