Marvin Applets Frequently Asked Questions
-
Class and JAR files
ChemAxon products support only Oracle distributed Java. On Mac platform (where Oracle Java is not available), our products support Apple's built-in Java that is compatible with Oracle's distribution. Marvin applets requires at least Java 1.6.
Several packages can be downloaded from the Marvin site:
marvin-bin-VERSION.tar.gz or marvin-bin-VERSION.zip
Download and unpack:
zip: unzip marvin-bin-VERSION.zip
tar.gz: gunzip < marvin-bin-VERSION.tar.gz |tar xf -
This distribution contains all files necessary for using MarvinSketch and MarvinView applets, without HTML pages and examples.
marvin-all-VERSION.tar.gz and marvin-all-VERSION.zip
Download and unpack:
zip: unzip marvin-all-VERSION.zip
tar.gz: gunzip < marvin-all-VERSION.tar.gz | tar xf -
This distribution contains all files necessary for using MarvinSketch and MarvinView applets, as well as the documentation and examples.
Remove chemaxon/marvin/plugin and sjars/plugin directories from the marvin directory.
cd marvin
rm -r chemaxon/marvin/plugin
rm -r sjars/plugin
Read the following document, to check the expiration date of signing for Marvin applets: Expiration date of releases
The following exception occurs with Marvin 5.2.x versions:
Exception in thread "AWT-EventQueue-2" java.lang.RuntimeException: java.lang.NoClassDefFoundError:
Could not initialize class chemaxon.marvin.modules.GraphInvariants
at chemaxon.marvin.util.MarvinModule.load(Unknown Source)
at chemaxon.struc.MoleculeGraph.a(Unknown Source)
IIS servers versioned 6.0 and above serve only those files that are on the mime type list of the server or web site, but some types required by Marvin are not on the list by default.
Solution: add the following mime types in the HTTP headers tab on the properties dialog of the web site or the server:
-
.properties = "text/plain"
-
.data = "application/octet-stream"
-
.mytemplates = "chemical/x-chemaxon-marvinfile"
If IIS should transfer molecule files to the clients, then the molecule file formats should also be registered with their extension.
A few commonly used extensions and the corresponding mime types are below:
-
.mrv = "chemical/x-chemaxon-marvinfile"
-
.mol = "chemical/x-mdl-molfile"
-
.cdx = "chemical/x-cdx"
-
.sdf = "chemical/x-mdl-sdfile"
-
.smi = "chemical/x-daylight-smiles"
-
.rxn = "chemical/x-mdl-rxnfile"
-
.rdf = "chemical/x-mdl-rdfile"
-
.pdb = "chemical/x-pdb"
On the Java console a ClassNotFoundException is thrown, caused by an IOException which is thrown when the webserver reports an error to the GET request for the http://host.tld/appletpath/JMSketch.class
This problem occurs with Java 1.6.0_u15+ versions, if the Java cache is turned off.
The problem will no longer exist after Marvin 5.3, until that the Java cache is not suggested to be switched off.
On the Java console a ClassNotFoundException is thrown, caused by an IOException wich is thrown when the webserver reports and error to the GET request for a .class file.
This problem occurs with Java 1.6.0_u15+ versions.
The problem is caused by the 6888528 java bug. A possible solution is to clean the java cache, and redo the actions with a clean cache when this error occurs. Another solution is to turn off the "Enable the next-generation Java Plug-in" in the Java Plug-in group on the Advanced tab of the Java Control Panel.
-
MarvinSketch and MarvinView
The rotation and the linkage to the sketcher have negligible contribution to the memory footprint. The largest contributions are from
-
double buffering of Swing components
-
size of Molecule objects
-
large color arrays that store the shades for 3D rendering modes
Even if we provided a "thin" applet without 3D support, it would only enable you to use about twice as many molecules. Then you would run out of memory again because of the double buffering.
You should use an n-molecule scrollable MView table instead of n applets. Then the common data will be stored in only one place (instead of n) and the number of Swing components will be equal to the number of visible molecules which is usually much smaller than n.
Your molecule string may contain consecutive space characters in applet parameters which are converted to only one space. This bug applies to Mozilla 0.9.7-1.0 and probably some earlier versions too.
-
Other:
See the documentation of oOracle's Java: Manual Installation and Registration of Linux Plugin
The CODEBASE attribute of the OBJECT tag refers to a non-secure page that the browser does not accept. The browser downloads the plugin from this URL, if the Java Plugin is not installed on your machine.
You should change this URL to a secure one.
-
To provide a secure page for downloading a Java Plugin, copy a JRE cab file to your site.
http://java.sun.com/products/plugin/autodl/jinstall-1_4_2-windows-i586.cab#Version=1,3,0,0
-
Modify the reference to this cab file in marvin.js. (Search the following code in the applet_begin function).
s += ' CODEBASE=" http://java.sun.com/products/plugin/autodl/jinstall-1_4_2-windows-i586.cab#Version=1,3,0,0"\n';
You should replace the text with
s += ' CODEBASE=" https://<PLUGINLOCATION>/jinstall-1_4_2-windows-i586.cab#Version=1,3,0,0"\n';
where <PLUGINLOCATION> is the new location of the cab file (e.g.: www.my_secure_site.com/java_plugin ).
Note: The new URL must start with "https" protocol instead of "http".
-
To see further questions, visit the following pages: