MarvinView GridBagView error

User 870ab5b546

28-09-2005 18:30:29

When I use Safari, I am getting a GridBagView error when I open a MarvinView window. But my colleague using Firefox on a Linux machine is not getting the same error. I looked through your posts and found a case where a GridBagView error was solved by removing certificates, so I deleted the ChemAxon certificates, but it hasn't solved the problem. (Do I need to delete the Thawte certificates, too? I'm not being asked to verify a certificate when I reload Marvin, although I can see the certificate reappear in my Keychain.) If it were a classpath problem, wouldn't it be duplicated on other machines? Here's the stack trace:





Code:
java.io.FileNotFoundException: http://epoch.chem.uky.edu/nosession/marvin/sjars/view/swing/gridbagview.jar


   at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:798);


   at sun.plugin.net.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:402)


   at sun.plugin.net.protocol.http.HttpUtils.followRedirects(HttpUtils.java:39)


   at sun.plugin.cache.CachedJarLoader.isUpToDate(CachedJarLoader.java:286)


   at sun.plugin.cache.CachedJarLoader.loadFromCache(CachedJarLoader.java:175)


   at sun.plugin.cache.CachedJarLoader.load(CachedJarLoader.java:127)


   at sun.plugin.cache.JarCache.get(JarCache.java:182)


   at sun.plugin.net.protocol.jar.CachedJarURLConnection.connect(CachedJarURLConnection.java:94)


   at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFile(CachedJarURLConnection.java:78)


   at sun.misc.URLClassPath$JarLoader.getJarFile(URLClassPath.java:582)


   at sun.misc.URLClassPath$JarLoader.<init>(URLClassPath.java:545)


   at sun.misc.URLClassPath$6.run(URLClassPath.java:723)


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


   at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:719)


   at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:679)


   at sun.misc.URLClassPath.getResource(URLClassPath.java:160)


   at java.net.URLClassLoader$1.run(URLClassLoader.java:191)


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


   at java.net.URLClassLoader.findClass(URLClassLoader.java:187)


   at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:143)


   at java.lang.ClassLoader.loadClass(ClassLoader.java:289)


   at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:123)


   at java.lang.ClassLoader.loadClass(ClassLoader.java:235)


   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)


   at java.lang.Class.forName0(Native Method)


   at java.lang.Class.forName(Class.java:141)


   at chemaxon.marvin.util.MarvinModule.load(Unknown Source)


   at chemaxon.marvin.view.swing.ViewPanel.E(Unknown Source)


   at chemaxon.marvin.common.swing.MolPanel.init(Unknown Source)


   at chemaxon.marvin.common.swing.MolPanel.init(Unknown Source)


   at JMView.init(Unknown Source)


   at sun.applet.AppletPanel.run(AppletPanel.java:354)


   at java.lang.Thread.run(Thread.java:552)


ChemAxon 7c2d26e5cf

29-09-2005 13:03:54

Can you show me an example to reproduce this error?

User 870ab5b546

29-09-2005 13:12:33

Go to http://epoch.chem.uky.edu/lite.


Login as nfolchetti, pwd sent under separate cover.


Click on Nicole.


Press Assignments.


Click on Hybridization.


Press Solve.


Click on the Figure. A new window will open and launch MarvinView.





I get this error on two different Macs running Safari, but my colleague running Firefox on Linux doesn't get it.

ChemAxon 7c2d26e5cf

29-09-2005 13:55:25

Hi Bob,


I have tried your example but it runs perfectly on my Mac.


It may be some caching problem since gridbagview.jar does not exist in Marvin 3.5.5.


I suggest you to delete your browser's cache.

User 870ab5b546

29-09-2005 14:32:13

I have emptied my cache many, many times....





Any other suggestions? I'm using MacOS 10.3.9 and Safari 1.3.1.





Should I delete my Thawte certificates?





P.S. I don't get this error with ACE running at a different location and MarvinView 3.5.7.

ChemAxon 7c2d26e5cf

30-09-2005 10:27:35

Have you tried to clear also the Java cache?


You can do it by typing an "x" into the Java console. If the console is not popped automatically when the applet is loaded, select the "Java Console" menu item from the "Window" menu of Safari. After that, restart your browser and try the applet example again.


I don't believe that deleting Thawte certification would solve your problem.


It seems to be a Java caching problem of your browser.

User 870ab5b546

30-09-2005 11:04:36

I finally figured out how to enable the Java console in Safari. (It's not obvious.) I cleared the cache, but I still get the GridBagView error. I also found some errors occur when Marvin is loaded, although they don't keep it from working. Here's the log:





Code:
Clear classloader cache ... completed.


java.security.PrivilegedActionException: java.lang.reflect.InvocationTargetException


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


   at sun.plugin.liveconnect.SecureInvocation$2.run(SecureInvocation.java:203)


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


   at sun.plugin.liveconnect.SecureInvocation.directCallMethod(SecureInvocation.java:182)


   at sun.plugin.viewer.WebKitPluginObject.liveConnectCall(WebKitPluginObject.java:187)


Caused by: java.lang.reflect.InvocationTargetException


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


   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)


   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)


   at java.lang.reflect.Method.invoke(Method.java:324)


   at sun.plugin.javascript.JSClassLoader.invoke(JSClassLoader.java:44)


   at sun.plugin.liveconnect.PrivilegedCallMethodAction.run(SecureInvocation.java:569)


   ... 5 more


Caused by: java.lang.IllegalArgumentException: object is not an instance of declaring class


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


   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)


   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)


   at java.lang.reflect.Method.invoke(Method.java:324)


   at sun.plugin.javascript.invoke.JSInvoke.invoke(JSInvoke.java:19)


   ... 11 more


java.io.FileNotFoundException: http://epoch.chem.uky.edu/nosession/marvin/sjars/Plugin.jar


   at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:798);


   at sun.plugin.net.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:402)


   at sun.plugin.net.protocol.http.HttpUtils.followRedirects(HttpUtils.java:39)


   at sun.plugin.cache.CachedJarLoader.isUpToDate(CachedJarLoader.java:286)


   at sun.plugin.cache.CachedJarLoader.loadFromCache(CachedJarLoader.java:175)


   at sun.plugin.cache.CachedJarLoader.load(CachedJarLoader.java:127)


   at sun.plugin.cache.JarCache.get(JarCache.java:182)


   at sun.plugin.net.protocol.jar.CachedJarURLConnection.connect(CachedJarURLConnection.java:94)


   at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFile(CachedJarURLConnection.java:78)


   at sun.misc.URLClassPath$JarLoader.getJarFile(URLClassPath.java:582)


   at sun.misc.URLClassPath$JarLoader.<init>(URLClassPath.java:545)


   at sun.misc.URLClassPath$6.run(URLClassPath.java:723)


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


   at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:719)


   at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:679)


   at sun.misc.URLClassPath.getResource(URLClassPath.java:160)


   at java.net.URLClassLoader$1.run(URLClassLoader.java:191)


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


   at java.net.URLClassLoader.findClass(URLClassLoader.java:187)


   at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:143)


   at java.lang.ClassLoader.loadClass(ClassLoader.java:289)


   at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:123)


   at java.lang.ClassLoader.loadClass(ClassLoader.java:235)


   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)


   at java.lang.Class.forName0(Native Method)


   at java.lang.Class.forName(Class.java:141)


   at chemaxon.marvin.common.swing.MolPanel.N(Unknown Source)


   at chemaxon.marvin.common.swing.MolPanel.t(Unknown Source)


   at chemaxon.marvin.common.swing.MolPanel.<init>(Unknown Source)


   at chemaxon.marvin.sketch.swing.SketchPanel.<init>(Unknown Source)


   at JMSketch.init(Unknown Source)


   at sun.applet.AppletPanel.run(AppletPanel.java:354)


   at java.lang.Thread.run(Thread.java:552)


java.io.FileNotFoundException: http://epoch.chem.uky.edu/nosession/marvin/sjars/Plugin.jar


   at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:798);


   at sun.plugin.net.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:402)


   at sun.plugin.net.protocol.http.HttpUtils.followRedirects(HttpUtils.java:39)


   at sun.plugin.cache.CachedJarLoader.isUpToDate(CachedJarLoader.java:286)


   at sun.plugin.cache.CachedJarLoader.loadFromCache(CachedJarLoader.java:175)


   at sun.plugin.cache.CachedJarLoader.load(CachedJarLoader.java:127)


   at sun.plugin.cache.JarCache.get(JarCache.java:182)


   at sun.plugin.net.protocol.jar.CachedJarURLConnection.connect(CachedJarURLConnection.java:94)


   at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFile(CachedJarURLConnection.java:78)


   at sun.misc.URLClassPath$JarLoader.getJarFile(URLClassPath.java:582)


   at sun.misc.URLClassPath$JarLoader.<init>(URLClassPath.java:545)


   at sun.misc.URLClassPath$6.run(URLClassPath.java:723)


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


   at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:719)


   at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:679)


   at sun.misc.URLClassPath.getResource(URLClassPath.java:160)


   at java.net.URLClassLoader$1.run(URLClassLoader.java:191)


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


   at java.net.URLClassLoader.findClass(URLClassLoader.java:187)


   at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:143)


   at java.lang.ClassLoader.loadClass(ClassLoader.java:289)


   at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:123)


   at java.lang.ClassLoader.loadClass(ClassLoader.java:235)


   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)


   at java.lang.Class.forName0(Native Method)


   at java.lang.Class.forName(Class.java:141)


   at chemaxon.marvin.common.swing.MolPanel.N(Unknown Source)


   at chemaxon.marvin.common.swing.MolPanel.t(Unknown Source)


   at chemaxon.marvin.common.swing.MolPanel.<init>(Unknown Source)


   at chemaxon.marvin.view.swing.ViewPanel.<init>(Unknown Source)


   at JMView.init(Unknown Source)


   at sun.applet.AppletPanel.run(AppletPanel.java:354)


   at java.lang.Thread.run(Thread.java:552)

ChemAxon 7c2d26e5cf

30-09-2005 16:30:16

I have retested your example with the same OS and the same Safari (1.3.1): Marvin works perfectly for me.


The stack trace shows that your browser uses a newer jmarvin.jar than 3.5.5. The new jmarvin.jar tries to load new jar files (like Plugins.jar) that is not part of 3.5.5 Marvin, yet. (As I see, the version number of Marvin on the Epoch site is 3.5.5.)


It indicates a caching problem.


You can try to reset Safari settings and restart the computer.





Or you can try to upgrade Marvin on the Epoch site. The latest release is 4.0.1 where the "missing" jars are already available. I hope the upgrade solves all problem.





By the way, you can try earlier Marvin versions here: http://www.chemaxon.com/marvin-archive/

User 870ab5b546

04-10-2005 13:22:51

I have repeatedly emptied the cache, restarted the computer, and cleared the classloader cache, and no joy.





From where would my browser be getting a newer jmarvin.jar than 3.5.5? Would it be stored somewhere on my hard drive?





We do have Marvin 4.0alpha4 stored on the same server. Could my browser be finding it? But it has been there for a long time, and these problems only started a couple of weeks ago.





Just yesterday the Erase and Paste buttons stopped working, too. I get another set of Java errors when I try to use them. The Cut button does work, still.





None of these problems occur on the ACE installation at Prentice-Hall.





I get exactly the same errors when I use Netscape 7.2 with the Java Embedding Plugin.

ChemAxon 7c2d26e5cf

04-10-2005 14:05:30

Would you try these examples?


http://www.chemaxon.com/marvin-archive/3.5.5/marvin/doc/dev/example-sketch1.1.html


http://www.chemaxon.com/marvin-archive/3.5.5/marvin/doc/dev/example-view1.1.html


Do they work for you? Have you managed to open viewer window in the second example?


If these examples do not run for you, it means that your Java classpath may include another jmarvin.jar.





Have you tried the Internet Explorer on your OS X? IE use different Java (1.3.1) than Safari and Java Embedding Plugin of Netscape.





If the location (the directory) of your other Marvin (4.0alpha4) is different than the directory of Marvin 3.5.5, it can not cause a problem.

ChemAxon 7c2d26e5cf

04-10-2005 15:36:02

Hi Bob,


I have invastigated the caching system of Java Plugin.


Safari saves jar files into <USERHOME>/Library/Caches/Java\ Applets/cache/javapi/v1.0/jar/ (where <USERHOME> is your user home directory, e.g.: /Users/imac).


It seems that neither the "Empty Cache" command of Safari, nor the "clear classloader cache" command ('x' shortcut) of Java Console deletes cached files from this folder.





Try to remove all files from this directory. I believe it will solve your caching problem.


You can do it if you type the following command into a Terminal window.


Code:
rm $HOME/Library/Caches/Java\ Applets/cache/javapi/v1.0/jar/*.*

User 870ab5b546

04-10-2005 22:21:12

You are a genius.





The rm command solved the problem. No more Java errors, and MarvinView works great.





I would never in a million years have figured that one out on my own.