Technical Support Forum Index
Technical Support Forum
Access ChemAxon scientists and developers here. For registration and login issues contact website support.

Support Ticket System is replacing forum

This forum was converted into a searchable archive. You cannot add posts here any more. For support please use our new Ticket System.

Create your first ticket
Applets and Java plugin2 issue with Java (>=1.6.0_15)
To watch this topic for replies  Register (enables digests) or give email address:
This topic is locked: you cannot edit posts or make replies.
Display posts from previous:   
    View previous topic :: View next topic    
Author Message
István
ChemAxon personnel
Joined: 03 Dec 2007
Posts: 688

View user's profile

Back to top
Link to postPosted: Thu Sep 24, 2009 1:12 pmPost subject: Applets and Java plugin2 issue with Java (>=1.6.0_15) Reply with quote

ChemAxon found a serious incompatibility issue between Marvin Applets and the Next Generation Java plugin (also known as plugin2 introduced in Java 1.6.0_10) with 1.6.0_15 and higher versions: Sometimes, when an applet is restarted a NoClassDefFoundError is thrown.

Details:
If the classes of a package are separated into two or more jar files, and the applet is restarted before all the classes of a package are downloaded into the cache, then upon downloading a jar that contains another class of the source package, this class will not be found in the downloaded resources and a NoClassDefFoundError is thrown from AppletClassLoader.

The cause of the error:
The AppletClassloader discovers the ClassPath and downloads the jar which contains the class, and after the new jar is downloaded the AppletClassLoader tries to load the class but fails. The fallback mechanism then tries to load the class file from the codebase of the applet, but there are no class files in the codebase, so an error is raised.

Since inside Marvin we have packages for applets that are separated into more jars (for different reasons) this affects the Marvin code deeply and it is hard to redesign it quickly.

A complete bug report has already been posted to Sun, and we are now trying to identify where this issue should be fixed. Until the final solution is achived, we suggest to use one of the following two workarounds:
1. The latest Java version installed on the computer where the applet is used should not be newer than 1.6.0_14
2. On the computer where the applet is used the Next Generation Java Plugin should be disabled. It can be made by switching the corresponding checkbox to off in the Java Control Panel's Advanced tab in the "Java Plugin" section.
Both of these workarounds need administrator privileges on the computer.

We are really sorry for any inconvenience caused by this issue. We will notify you in this topic if we have any further information.
Should you have any questions related to this issue please do not hesitate to ask us in this topic.

The Support Team

István
ChemAxon personnel
Joined: 03 Dec 2007
Posts: 688

View user's profile

Back to top
Link to postPosted: Tue Oct 06, 2009 2:08 pmPost subject: Sun dispatched our bug reports Reply with quote

Sun has dispatched our bug report in their bug database.

Our bug reports can be found at:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6888527
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6888528

 

Alfredo

Joined: 10 Jun 2008
Posts: 16

View user's profile

Back to top
Link to postPosted: Tue Nov 17, 2009 11:22 pmPost subject: Problem Observed as well on SUN 1.6.0_16 Reply with quote

The same issue has been observed on IE 7 and IE 8 with Sun plugins version 1.6.0_16

 

Are there any estimates for a fix?

Alfredo

Joined: 10 Jun 2008
Posts: 16

View user's profile

Back to top
Link to postPosted: Tue Nov 17, 2009 11:31 pmPost subject: SUN declining responsibility Reply with quote

To whom it may concern,

 

The two bugs reports form the links above are closed as not reproducible on Verision 1.6.0_18 which is not currently available fo download form http://java.sun.com/javase/downloads/index.jsp. The latest JRE available is update Java 6 update 17.

Alfredo

Joined: 10 Jun 2008
Posts: 16

View user's profile

Back to top
Link to postPosted: Wed Nov 18, 2009 1:42 amPost subject: Problem still present at 1.6.0_17 Reply with quote

After updating to Java 6 update 17 the issue persists on IE 7 and 8.

István
ChemAxon personnel
Joined: 03 Dec 2007
Posts: 688

View user's profile

Back to top
Link to postPosted: Wed Nov 18, 2009 6:35 amPost subject: Reply with quote

Yes unfortunatelly they can not reproduce the bug, because they trying with class files next to the jar files, and in this way the security exception they got is normal. It seemed to me they have not tried with only the jar files.

In the sun developer comment of the bug, was only one thing i have not tried ever, i have never enumerated all the jar files for the codebase property since this list have to take place in the manifest of the main jar as the ClassPath. After the suggestion, i have tried this, but nothing happens, and the problem persist with enumerated jars also.

I have tested this with an early access build of 1.6.0_18 and the problem is persist with that too.

I would rahter not give estimations since we are not absolutely sure about the root of the problem, so currently we do not have any plan on how to fix this.

The only thing i can tell is that, now we are concentrating on the last fixes for the feature set of Marvin and Jchem 5.3 release, after the release is out, we will investigate further possibilities on this class loading problem.

István
ChemAxon personnel
Joined: 03 Dec 2007
Posts: 688

View user's profile

Back to top
Link to postPosted: Thu Mar 04, 2010 6:20 pmPost subject: Reply with quote

For a few weeks we have tried to reinvestigate this issue, but experienced that the issue had disappeared. Neither with our applets nor with the test applet I have created before were we able to reproduce the issue. We have the suspicion that it is somehow related to environmental issues, other software, some system cache, or other cache that had been changed and the issue is solved by the change, but currently it seems everything is working fine.
We believe it is safe to upgrade to newer java versions. If you run into the described issue after upgrading, please inform us. Maybe this way we can finally figure out the root cause of the problem.

The Support Team

Chung-Yeol

Joined: 27 May 2009
Posts: 3

View user's profile

Back to top
Link to postPosted: Tue Mar 30, 2010 8:34 amPost subject: Unfortunately, the problem still occurs. Reply with quote

I have the same problem.

When I try to draw other than naphtalene from the below icon box, or access other functions such as "Clean in 2-D", I got the follwing error:

java.lang.NoClassDefFoundError: Could not initialize class chemaxon.marvin.modules.GraphInvariants

The error does not occur, when I turn off the cache or at the first time after I cleaned my cache. In your example site (e.g. https://www.chemaxon.com/marvin/examples/applets/view/embed.html), there's no problem. Is this related to setup? I'm using apache web server running in linux box and testing applet in windows with IE6, IE8, Chrome browser. The version of java is 1.6.0_18-b07.
Only the difference between chemaxon site and mine is the version of applet which is showing in Help>About. I'm using 5.3.1 built at 2010-02-23 while the chemaxon sites using 5.3.1 built at 2010-02-22, one day earlier.
Thanks in advance. (and sorry for my poor english.)
István
ChemAxon personnel
Joined: 03 Dec 2007
Posts: 688

View user's profile

Back to top
Link to postPosted: Wed Mar 31, 2010 1:47 pmPost subject: Reply with quote

Hi,

would you please confirm that the applet-path/chemaxon/isotopes.data is accessible on your server?

Regards,
Istvan

Chung-Yeol

Joined: 27 May 2009
Posts: 3

View user's profile

Back to top
Link to postPosted: Thu Apr 01, 2010 1:09 amPost subject: Reply with quote

Thanks for your reply.

I can download that file from client without problem.

The errors (other than 200, or 304 response code) I can find in the apache web server's log is as follows :

"GET /applets/marvin/chemaxon/license.cxl HTTP/1.1" 404 318 "-" "Mozilla/4.0 (Windows XP 5.1) Java/1.6.0_18"

"GET /applets/marvin/chemaxon/marvin/dict.class HTTP/1.1" 404 324 "-" "Mozilla/4.0 (Windows XP 5.1) Java/1.6.0_18"

"GET /applets/marvin/plugins/plugins.properties HTTP/1.1" 404 324 "-" "Mozilla/4.0 (Windows XP 5.1) Java/1.6.0_18"

"HEAD /applets/marvin/marvin.mytemplates HTTP/1.1" 404 - "-" "Mozilla/4.0 (Windows XP 5.1) Java/1.6.0_18"

"HEAD /applets/marvin/marvin.mytemplates HTTP/1.1" 404 - "-" "Mozilla/4.0 (Windows XP 5.1) Java/1.6.0_18"

"GET /applets/marvin/chemaxon/marvin/sketch/swing/actions/ZoomModel_ko.class HTTP/1.1" 404 353 "-" "Mozilla/4.0 (Windows XP 5.1) Java/1.6.0_18"

"GET /applets/marvin/chemaxon/marvin/sketch/swing/actions/ZoomModel_ko.properties HTTP/1.1" 404 358 "-" "Mozilla/4.0 (Windows XP 5.1) Java/1.6.0_18"

"GET /applets/marvin/chemaxon/marvin/sketch/swing/actions/ZoomModel_ko_KR.class HTTP/1.1" 404 356 "-" "Mozilla/4.0 (Windows XP 5.1) Java/1.6.0_18"

"GET /applets/marvin/chemaxon/marvin/sketch/swing/actions/ZoomModel_ko_KR.properties HTTP/1.1" 404 361 "-" "Mozilla/4.0 (Windows XP 5.1) Java/1.6.0_18"

"GET /applets/marvin/chemaxon/marvin/swing/modules/SaveImageFileChoose_ko.class HTTP/1.1" 404 356 "-" "Mozilla/4.0 (Windows XP 5.1) Java/1.6.0_18"

"GET /applets/marvin/chemaxon/marvin/swing/modules/SaveImageFileChoose_ko.properties HTTP/1.1" 404 361 "-" "Mozilla/4.0 (Windows XP 5.1) Java/1.6.0_18"

"GET /applets/marvin/chemaxon/marvin/swing/modules/SaveImageFileChoose_ko_KR.class HTTP/1.1" 404 359 "-" "Mozilla/4.0 (Windows XP 5.1) Java/1.6.0_18"

"GET /applets/marvin/chemaxon/marvin/swing/modules/SaveImageFileChoose_ko_KR.properties HTTP/1.1" 404 364 "-" "Mozilla/4.0 (Windows XP 5.1) Java/1.6.0_18"

I don't have chemaxon/marvin/{sketch,swing} diretories. What I did when I install the applet is to extract the marvin-bin-5_3_01.tar.gz and I changed the permission of all the files and directories so that the web server can read all of them.

Is this normal? or should I setup some properties?

Thanks.
Tamas
ChemAxon personnel
Joined: 21 May 2004
Posts: 2171

View user's profile

Back to top
Link to postPosted: Thu Apr 01, 2010 6:58 pmPost subject: Reply with quote

You have installed Marvin Applets package correctly.

The chemaxon/marvin/{sketch|view} directory does not present in the directory hierarchy of the archive files. Those resources that are located in these packages are wrapped into jar files.
But in this case, Java seek for optional files (that can present in the above folders). Lack of these files does not cause any restriction in the usage. Marvin does not require the present of these files.

Bob

Joined: 15 Jun 2004
Posts: 2629

View user's profile

Back to top
Link to postPosted: Mon Apr 05, 2010 1:10 amPost subject: Reply with quote

I am suddenly getting a ClassNotFoundException since I downgraded from Marvin 5.3.1 to Marvin 5.2.3. I am using Safari 4.0.5 on MacOS 10.5.8, Java 1.6.0_17. However, if I go to your Web site and look at Marvin 5.3.1, it starts up fine. Also, on another computer running Safari 4.0.5 on MacOS 10.4.11, Java 1.5.0, Marvin 5.2.3 loads fine.

Is Marvin 5.3.1 immune to the problems that you describe above?

Bob

Joined: 15 Jun 2004
Posts: 2629

View user's profile

Back to top
Link to postPosted: Mon Apr 05, 2010 2:12 pmPost subject: Reply with quote

I've managed to isolate the problem even more.

On my MacOS 10.5.8 desktop, Safari 4.0.5, "java -version" shows Java 1.5.0_22 but it also has Java 1.6 loaded, all software updates loaded:

http://epoch.chem.uky.edu/epoch-plugin/public/mechmarvin.jsp: Marvin loads.

http://128.163.140.67:9080/epoch-plugin/public/mechmarvin.jsp: Marvin doesn't load, and the Java console shows:

load: class JMSketchLaunch not found.
java.lang.ClassNotFoundException: JMSketchLaunch
	at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:211)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:317)
	at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:145)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
	at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:667)
	at sun.applet.AppletPanel.createApplet(AppletPanel.java:723)
	at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1873)
	at sun.applet.AppletPanel.runLoader(AppletPanel.java:652)
	at sun.applet.AppletPanel.run(AppletPanel.java:326)
	at java.lang.Thread.run(Thread.java:613)

If I switch the latter site to Marvin 5.3.1, it loads fine.

One difference between the two sites is that the first site runs Tomcat 5 and Java 1.5.0_02, and the second runs Tomcat 6 and Java 1.6.0_0.  

Neither site is protected, so you can go there and see what you can learn.

-- Bob

Tamas
ChemAxon personnel
Joined: 21 May 2004
Posts: 2171

View user's profile

Back to top
Link to postPosted: Tue Apr 06, 2010 10:26 amPost subject: Reply with quote

I guess it can be a caching problem.

Earlier used Marvin 5.3.1 from your site may be preserved in your cache. Probably your browser still prefer cached jars when you visit to your site, instead of downloading the 5.2.3 resources from the updated site.

I recommend to delete Java cache. I hope it solves the problem.

Bob

Joined: 15 Jun 2004
Posts: 2629

View user's profile

Back to top
Link to postPosted: Tue Apr 06, 2010 1:36 pmPost subject: Reply with quote

No, I already deleted the Java cache, the browser cache, and the classloading cache.  No joy.

I also tried unchecking the Java 6 box in Java Preferences, given that my home desktop (MacOS 10.4.11), which has only through Java 1.5, is not displaying the same problems.  Again, no joy.

Chung-Yeol

Joined: 27 May 2009
Posts: 3

View user's profile

Back to top
Link to postPosted: Thu Apr 08, 2010 8:19 amPost subject: `isotopes.data` causes problem. Reply with quote

Finally, I tracked down the problem, and the problem is starting from the following error. Of course, I'm sure that the installed `isotopes.data` file is original as was in the package and I can uncompress it using gunzip in linux.

java.io.IOException: Not in GZIP format
        at java.util.zip.GZIPInputStream.readHeader(Unknown Source)
        at java.util.zip.GZIPInputStream.<init>(Unknown Source)
        at java.util.zip.GZIPInputStream.<init>(Unknown Source)
        at chemaxon.struc.PeriodicSystem$IsotopeDataHolder.a(Unknown Source)
        at chemaxon.struc.PeriodicSystem$IsotopeDataHolder.<clinit>(Unknown Source)
        at chemaxon.struc.PeriodicSystem.a(Unknown Source)
        at chemaxon.struc.MolAtom.isotopeType(Unknown Source)
        at chemaxon.marvin.modules.GraphInvariants.<clinit>(Unknown Source)
    [.. snip ..]

Anyway, the problem is caused when uncompress cached `isotopes.data` and if I delete the cached file -- only isotopes.data -- at java control panel, the applet is loaded correctly at the next time.

So, I tried to control cache header for .data file using .htaccess in apache as a workaround for this problem. I made a ".htaccess" file in "marvin-applet/chemaxon" directory with content as follows:

<FilesMatch "\.(data)$">
FileETag None
<IfModule mod_headers.c>
Header unset ETag
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
</IfModule>
</FilesMatch>

Now, the applet loads correctly every time.

Tamas
ChemAxon personnel
Joined: 21 May 2004
Posts: 2171

View user's profile

Back to top
Link to postPosted: Thu Apr 08, 2010 6:35 pmPost subject: Reply with quote

Please do not uncompress isotopes.data Marvin expects the compressed file.

By the way, we plan to eliminate isotopes.data and provides isotopes in another format.

This topic is locked: you cannot edit posts or make replies.
Page 1 of 1


To watch this topic for replies   Register (enables digests) or give email address  
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum