ArrayIndexoutofboundsexception error

User a83cdfbe8a

25-05-2011 06:39:55

Hi, when we want to load the structure from database. the error information jumped out"Molfile cannot be loaded because an error occured: java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 14


 at chemaxon.struc.MoleculeGraph.getAtom(Unknown Source)
 at chemaxon.struc.RgMolecule.getAtom(Unknown Source)
 at chemaxon.marvin.io.formats.cml.CMLImport.a(Unknown Source)
 at chemaxon.marvin.io.formats.cml.CMLImport.a(Unknown Source)
 at chemaxon.marvin.io.formats.cml.CMLImport.a(Unknown Source)
 at chemaxon.marvin.io.formats.cml.CMLImport.a(Unknown Source)
 at chemaxon.marvin.io.formats.cml.CMLImport.readMolecule(Unknown Source)
 at chemaxon.marvin.io.formats.cml.MrvImport.a(Unknown Source)
 at chemaxon.marvin.io.formats.cml.MrvImport.a(Unknown Source)
 at chemaxon.marvin.io.formats.cml.MrvImport.b(Unknown Source)
 at chemaxon.marvin.io.formats.cml.MrvImport.readDocument(Unknown Source)
 at chemaxon.marvin.io.MRecordImporter.b(Unknown Source)
 at chemaxon.marvin.io.MRecordImporter.a(Unknown Source)
 at chemaxon.marvin.io.MRecordImporter.b(Unknown Source)
 at chemaxon.marvin.io.MRecordImporter.readDoc(Unknown Source)
 at chemaxon.marvin.util.MolLoader.a(Unknown Source)
 at chemaxon.marvin.util.MolLoader.run(Unknown Source)
 at chemaxon.marvin.common.swing.MolPanel.startLoader(Unknown Source)
 at chemaxon.marvin.view.swing.ViewPanel.startstop(Unknown Source)
 at chemaxon.marvin.applet.JMView.createGUI(Unknown Source)
 at chemaxon.marvin.applet.AbstractMarvinApplet.init(Unknown Source)
 at chemaxon.marvin.applet.JMViewLaunch.showApplet(Unknown Source)
 at chemaxon.marvin.applet.AppletLaunch$2.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)
 


We used the pseudoatom in the structure, but the same pseudoatom was used the other structures which can be loaded.  i send a sample for your testing. Jchem(5.3.7) was used in database.


Looking forward your reply

ChemAxon 9c0afc9aaf

25-05-2011 14:39:41

Hi,


I have moved your question to the appropriate forum, my colleagues will answer in detali soon.


Meanwhile could you confirm if the Marvin Applet version is also 5.3.7 ?


(right click -> Help -> about Marvin View)


Attaching the page sorce can also be very helpful.


Best,


Szilard


 

User a83cdfbe8a

26-05-2011 09:03:56










Szilard wrote:

Hi,


I have moved your question to the appropriate forum, my colleagues will answer in detali soon.


Meanwhile could you confirm if the Marvin Applet version is also 5.3.7 ?


(right click -> Help -> about Marvin View)


Attaching the page sorce can also be very helpful.


Best,


Szilard


 



The following is informtaion of Marvin version

































Product Version: MarvinSketch 5.3.7
Build Date: 2010-08-13
Operating System: x86 Windows XP 5.1
Java: Sun Microsystems Inc. Java 1.6.0_25
Memory: 247.5M maximum, 26.8M total, 8.8M free
Environment: Trusted Applet (with administrator rights)
Browser: sun.plugin 1.1

ChemAxon 7c2d26e5cf

26-05-2011 15:55:16

 We have checked your example. It has been loaded properly.


<script type="text/javascript" src="http://www.chemaxon.com/marvin-archive/5_3_7/marvin/marvin.js"></script>
<script type="text/javascript">
msketch_begin("http://www.chemaxon.com/marvin-archive/5_3_7/marvin",400,400);
msketch_param("mol","test.mrv");
msketch_end();
</script>

I have attached the test example.


Please share your code example with us. I assume the problem can be in the embedded code since the molecule works fine for us.

User a83cdfbe8a

30-05-2011 09:13:00

please see our code


<script LANGUAGE="JavaScript1.1" SRC="/jchem/marvin/marvin.js"></script>
<script LANGUAGE="JavaScript1.1"><!--
mview_begin("/jchem/marvin", 300, 200);
mview_param("cell0", "|<?php echo $test?>");
mview_param("atomsize", "0.6");
mview_param("implicitH", "hetero");


mview_end();


//-->
</script>


 


 

ChemAxon 7c2d26e5cf

31-05-2011 12:43:36

Thanks for the given code but the generated html code would be more useful.


The clue of the problem is the embedding of the molecule source. I assume that the molecule string has not encoded properly. That's why the molecule source reading process failed.


Would you share with us how looks like this line in the generated html source. I would like to see which is the molecule string exactly where the problem occured.


mview_param("cell0", "|<?php echo $test?>");