I am having trouble
embedding the MarvinView applet in HTML pages using a jar on a local
machine. Take for example the following code:
<html>
<body>
<script type="text/javascript" SRC="marvin/marvin.js"></script>
<script type="text/javascript">
mview_name = "AView";
mview_param("mol", "mols/aspirin.csmol");
mview_end();
mview_name = "BView";
mview_param("mol", "mols/aspirin.csmol");
mview_end();
mview_name = "CView";
mview_begin("marvin", 200, 200);
mview_param("mol", "mols/aspirin.csmol");
mview_end();
mview_name = "DView";
mview_begin("marvin", 200, 200, true);
mview_param("mol", "mols/aspirin.csmol");
mview_end();
</script>
</body>
</html>
Outcome:
AView: Successful.
BView: Successful.
CView: Displays a 200 by 200 gray box.
DView: Displays an outlined white box with an error message; clicking it gives the following stack trace:
java.lang.RuntimeException: java.lang.NoClassDefFoundError: chemaxon/marvin/view/swing/ViewPanel
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: chemaxon/marvin/view/swing/ViewPanel
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$12.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: chemaxon.marvin.view.swing.ViewPanel
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 20 more
(The class "chemaxon/marvin/view/swing/ViewPanel" is in the jar file.)
Notes about the jar itself:
Due to a reported untrusted class package error, the unsigner was run on this jar (
https://www.chemaxon.com/forum/ftopic65.html).
However this error remains. Additionally, it seems as though this
continues to be an error even if the jar has been removed from the
directory.
I am presently using Ubuntu 10.04
The errors were obtained using Google Chrome 11.0.696.71
Firefox 4.0.1 is having extra trouble even loading the page.
Thank you for your assistance.