Error in chemaxon.jchem.db.Importer.importMols

User fa1369adab

11-08-2005 02:55:09

I am getting an array index out of bounds inside JChem. Here is the relevant part of the stack trace:





java.lang.ArrayIndexOutOfBoundsException: -67108856


at java.util.Vector.elementAt(Vector.java:435)


at chemaxon.jchem.db.TableInfo.fieldAt(TableInfo.java:272)


at chemaxon.jchem.db.FileToSQLHandler.createUpdateHandler(FileToSQLHandler.java:87)


at chemaxon.jchem.db.FileToSQLHandler.importFile(FileToSQLHandler.java:230)


at chemaxon.jchem.db.Importer.importMols(Importer.java:423)





I think this code used to work. I didn't set it up, and just recently started supporting our application, so consider me a newbie. I did check the obvious things. The Mol file is reasonable, and it comes right from MarvinSketch:








Marvin 08100516342D





2 1 0 0 0 0 999 V2000


-1.6875 2.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0


-0.9730 2.4125 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0


1 2 1 0 0 0 0


M END





We are using jchem3.0.10.

ChemAxon 9c0afc9aaf

12-08-2005 11:07:50

Hi,





Sorry for answering a bit late.





This exception occurs if the name of the property table is not properly defined, or the specified structure table doesn't exist.





In future JChem releases a more informative error message will appear in this case, for example:








Code:
java.sql.SQLException: The table SCOTT.TEST doesn't exist or the size of fingerprint is not properly set in property table "JCHEMPROPERTIES".






Thank you for reporting this issue.





Best regards,





Szilard

User fa1369adab

17-08-2005 14:16:54

Thanks for your answer. I think the problem is that we changed the Oracle user name at some point from name1 to name2, and the JChemProperties file still lists name1. When I start jcman, Oracle complains (ORA-00942) that the table or view does not exist; jcman's export function lists database tables of the form name1.misc_molecules_v1 instead of name2.misc_molecules_v1.





So my question now is how to modify the information in JChemProperties?

ChemAxon 9c0afc9aaf

17-08-2005 16:46:47

Hi,





Just replace all properties beginning with





table.<old_schema>.<table_Name>.





to





table.<new_schema>.<table_Name>.





in the property table.





You can ignore properties beginning with "update."





If you do not have too many tables, it's simplest to change them by hand in the Oracle Console or any other GUI that allows the editing of table data.





Best regards,





Szilard