Marvin getMol() error in browsers

User 65339aced8

15-04-2005 10:28:53

Folowing gives an error on local pc. However access from a remote pc is OK. Copied website to another pc works local ok. How can I troubleshoot this. I even removed all jchem and tomcat and java. And I upgraded jre-1_5_0_02-windows-i586-p.exe and jchem3.0.3.zip. No succes.





http://localhost:8080/molstore/query.jsp





javascript


var queryStructure=""+MSketch.getMol("mol");





<script LANGUAGE='JavaScript1.1' SRC='/jchem/marvin/marvin.js'></script>


<script LANGUAGE='JavaScript1.1'>


<!--


msketch_name = 'MSketch';


msketch_begin('/jchem/marvin', '100%', '100%');


msketch_param('molbg', '#ffffff');


msketch_param('horizontalbar', 'true');


msketch_param('preload','MolExport,Parity,SmilesExport,Clean2D');


msketch_end();


//-->


</script>





Firefox


Error: uncaught exception: java.security.PrivilegedActionException: java.security.PrivilegedActionException: java.lang.reflect.InvocationTargetException





IE6


java.lang.NoSuchMethodError: chemaxon.marvin.sketch.swing.SketchPanel.getEditor()Lchemaxon/marvin/sketch/j;


at JMSketch.getMol(Unknown Source)


at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)


at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)


at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)


at java.lang.reflect.Method.invoke(Unknown Source)


at sun.plugin.javascript.invoke.JSInvoke.invoke(Unknown Source)


at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)


at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)


at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)


at java.lang.reflect.Method.invoke(Unknown Source)


at sun.plugin.javascript.JSClassLoader.invoke(Unknown Source)


at sun.plugin.com.MethodDispatcher.invoke(Unknown Source)


at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source)


at sun.plugin.com.DispatchImpl$1.run(Unknown Source)


at java.security.AccessController.doPrivileged(Native Method)


at sun.plugin.com.DispatchImpl.invoke(Unknown Source)


java.lang.Exception: java.lang.NoSuchMethodError: chemaxon.marvin.sketch.swing.SketchPanel.getEditor()Lchemaxon/marvin/sketch/j;


at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source)


at sun.plugin.com.DispatchImpl$1.run(Unknown Source)


at java.security.AccessController.doPrivileged(Native Method)


at sun.plugin.com.DispatchImpl.invoke(Unknown Source)

ChemAxon 7c2d26e5cf

15-04-2005 12:37:25

To tell the truth, it is not clear for me in which cases applet works wrong.


Are these correct?


- The web server with the applet page is on the local machine and if you try to access it from the same machine like this: http://localhost:8080/molstore/query.jsp


then applet loading fails.


- If the web server is on a remote machine, applet examples work fine from your local machine (like this http://127.0.0.13:8080/molstore/query.jsp ).





If this is true, it means that the problem is in the Marvin/JChem installation.





Please check all resources for running Marvin applets are available on your local PC when you access it via the local web server. Didn't you delete something from the "marvin" directory? The whole "marvin" directory is required for running Marvin applets (jmarvin.jar is not enough).


Does Tomcat see the "/jchem/marvin" directory?

User 65339aced8

15-04-2005 18:18:29

I thought to be smart, and put jchem.jar and marvin.jar in


C:\Program Files\Java\jre1.5.0_02\lib\ext


to avoid classpath, multiple copies and other configurations.

ChemAxon 7c2d26e5cf

18-04-2005 11:34:12

Please remove jars from "C:\Program Files\Java\jre1.5.0_02\lib\ext". Mixing of the code of Marvin Apples and JChem can cause run time error.


Never put "marvin.jar" in the CLASSPATH or in "C:\Program Files\Java\jre1.5.0_02\lib\ext". Applets never use the system CLASSPATH. The codebase attribute of the <applet> tag in the html code specifies the jar files location for an applet.


"marvin.jar" should be in the "marvin" directory as marvin.js and other Marvin resources. (See: required files for Marvin applets)


For running JChem JSP examples, "jchem.jar" should be copied in the Tomcat's "shared/lib" directory. You can find more info about the installation of JChem examples in the following document: http://www.jchem.com/examples/jsp1_x/setup.html