setMol() fails with 'cannot import file in format smiles'

User 1f6fd578ec

04-09-2009 17:00:47

Hi


I've had quite  alot of trouble getting Marvin sketch 5.2.4 working correctly under IIS7 on Vista, mainly due to the need for various Mime type settings (which I'll document at the end in case anyone else finds themselves on this path).


I thought I'd finally got everything working OK, but now I find that 'Smiles' (and other I suspect) imports via setMol() are failing with exception 'cannot import file in format smiles'.


I'm using the example page at /marvin/examples/applets/sketch/js_io.html from the full install package, version 5.2.4. This fails as above on my local setup, but works on the same machine using the chemaxon page at http://www.chemaxon.com/marvin/examples/applets/sketch/js_io.html.


Here are the entries from the IIS log:


2009-09-04 16:36:59 127.0.0.1 GET /QBrowser/marvin/sjars/sketchbackground.jar - 80 - 127.0.0.1 Mozilla/4.0+(Windows+Vista+6.0)+Java/1.6.0_15 304 0 0 15
2009-09-04 16:37:01 127.0.0.1 GET /QBrowser/marvin/sjars/smilesimport.jar - 80 - 127.0.0.1 Mozilla/4.0+(Windows+Vista+6.0)+Java/1.6.0_15 304 0 0 0
2009-09-04 16:37:01 127.0.0.1 GET /QBrowser/marvin/sjars/singlelinerecordreader.jar - 80 - 127.0.0.1 Mozilla/4.0+(Windows+Vista+6.0)+Java/1.6.0_15 200 0 0 31
2009-09-04 16:37:01 127.0.0.1 GET /QBrowser/marvin/chemaxon/marvin/io/formats/SingleLineRecordReader.class - 80 - 127.0.0.1 Mozilla/4.0+(Windows+Vista+6.0)+Java/1.6.0_15 404 0 2 0
2009-09-04 16:37:01 127.0.0.1 GET /QBrowser/marvin/sjars/common/swing/exceptionframe.jar - 80 - 127.0.0.1 Mozilla/4.0+(Windows+Vista+6.0)+Java/1.6.0_15 304 0 0 15
2009-09-04 16:37:56 127.0.0.1 GET /QBrowser/marvin/chemaxon/marvin/io/formats/smiles/SMILESRecordReader.class - 80 - 127.0.0.1 Mozilla/4.0+(Windows+Vista+6.0)+Java/1.6.0_15 404 0 2 0
2009-09-04 16:37:56 127.0.0.1 GET /QBrowser/marvin/chemaxon/marvin/common/swing/modules/ExceptionFrame.class - 80 - 127.0.0.1 Mozilla/4.0+(Windows+Vista+6.0)+Java/1.6.0_15 404 0 2 0
2009-09-04 16:38:08 127.0.0.1 GET /QBrowser/marvin/META-INF/services/com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager - 80 - 127.0.0.1 Mozilla/4.0+(Windows+Vista+6.0)+Java/1.6.0_15 404 0 2 0
2009-09-04 16:38:08 127.0.0.1 GET /QBrowser/marvin/META-INF/services/com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager - 80 - 127.0.0.1 Mozilla/4.0+(Windows+Vista+6.0)+Java/1.6.0_15 404 0 2 0
2009-09-04 16:38:21 127.0.0.1 GET /QBrowser/marvin/chemaxon/marvin/io/formats/SingleLineRecordReader.class - 80 - 127.0.0.1 Mozilla/4.0+(Windows+Vista+6.0)+Java/1.6.0_15 404 0 2 0


Looks like it can't find SMILESRecordReader.class or SingleLineRecordReader.class, but I don't know where to get these from - they're not in the downloads for v.5.2.4


Any ideas appreciated - I don't know much about Java packages etc so I may be missing something obvious!!


 


Thanks in advance


Tom


 


PS the mime types for IIS7:


.properties = "text/plain"


.mol = "chemical/x-mdl-molfile"


.data = "application/octet-stream"


.mrv = "text/xml"

ChemAxon 7c2d26e5cf

08-09-2009 09:49:32

We are checking this issue.


Have you got any error message on the Java console?


We are working on another setMol issue, probably this fix will solve also this problem.

User 1f6fd578ec

08-09-2009 10:12:32

Hi Tamas


 


Thanks for the quick reply. Here's the error from the console:


this occurs when I call setMol()


java.lang.NullPointerException
 at chemaxon.marvin.sketch.swing.SketchPanel.molLoaded(Unknown Source)
 at chemaxon.marvin.sketch.swing.SketchPanel.molLoaderFinished(Unknown Source)
 at chemaxon.marvin.util.MolLoader.run(Unknown Source)
 at java.awt.event.InvocationEvent.dispatch(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.pumpEventsForFilter(Unknown Source)
 at java.awt.Dialog$1.run(Unknown Source)
 at java.awt.Dialog$3.run(Unknown Source)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.awt.Dialog.show(Unknown Source)
 at javax.swing.JOptionPane.showOptionDialog(Unknown Source)
 at chemaxon.marvin.common.swing.modules.ExceptionFrame.b(Unknown Source)
 at chemaxon.marvin.common.swing.modules.ExceptionFrame.a(Unknown Source)
 at chemaxon.marvin.common.swing.modules.ExceptionFrame.a(Unknown Source)
 at chemaxon.marvin.common.swing.modules.ExceptionFrame$1.run(Unknown Source)
 at java.awt.event.InvocationEvent.dispatch(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)


Java Plug-in 1.6.0_15
Using JRE version 1.6.0_15-b03 Java HotSpot(TM) Client VM


Let me know if there's anything else you want me to try.


 


Thanks


Tom

ChemAxon 5433b8e56b

16-09-2009 18:49:54

Hi Tom!


First of all, i'm sorry for the late answer.


As we tested it, the problem occuring only with the 1.6.0_u15 and above versions of the java plugin. We noticed some other problems with the latest plugin versions, we are keen on to fix them, and release a version of applets, that are dealing with the latest changes in java.


We will inform you in this topic right after the release is out.


If you experienced this problem with java 1.6.0_u13 plugin too, please inform me, and send me the html snippet you using to display the applet, and the related javascript snippet.


Best regards,
Istvan

User 1f6fd578ec

29-09-2009 13:21:18

Hi Istvan


 


Mysteriously our (unchanged) code seems to work now, even with the more recent plugins we were having trouble with.


Is it possible that this is a 'first time' problem? I.e. when you first hit the page with the embedded Marvin applet it attempts to retrieve many modules on separate connections, and if any of these fail it is left in an inconsistent state?


We have certainly seen it fail in this way under IIS 5.1 on windows xp pro development machine with the default connection limit of 10...


 


Thanks


Tom



ChemAxon 5433b8e56b

30-09-2009 20:17:55

Hi Tom


After i dug deep into the jre related problem, it seems your issue is not that i have think about before. I will check this issue a little more with the help of the information you have provided and get back to you as soon as i have any progress.


Regards,
Istvan

ChemAxon 5433b8e56b

21-01-2010 14:10:30

Dear Tom,


i'm glad to inform you about the progress in the issue you have reported.


Finally we have found missbehaviours which seem to be similar to your problem. The issues experienced while the applet has been called by a javascript code, in this case the applet code itself run also in the secured sandbox of javascript, even when the applet code is certified and signed.


This behavoiur has been workarounded by us, but unfortunatelly the 5.3.0 relese of Marvin has errors in the workaround routines, so it will work properly from 5.3.0.1 which will be released in theese days.


Best regards,
István