JChemSearch fails with java.io.IOException

User 6eb78e46c2

22-03-2005 17:20:38

Hi,





I am seeting the following exception when I try to perform a JChemSearch against a jchem database (Oracle 9.2.0.3.0) when the sub structure search includes several atom lists. The exception is:





Code:
java.io.IOException: Unrecognized element type "i"





   at chemaxon.marvin.modules.SmilesImport.readSymbolAndAddAtom(SmilesImport.java:918)





   at chemaxon.marvin.modules.SmilesImport.readMol0(SmilesImport.java:527)





   at chemaxon.marvin.modules.SmilesImport.readMol(SmilesImport.java:445)





   at chemaxon.jchem.db.JChemSearch.retrieveBatchAndSearch(JChemSearch.java:2303)





   at chemaxon.jchem.db.JChemSearch.searchInDB(JChemSearch.java:2245)





   at chemaxon.jchem.db.JChemSearch.search1(JChemSearch.java:1355)





   at chemaxon.jchem.db.JChemSearch.search(JChemSearch.java:1183)





   at chemaxon.jchem.db.JChemSearch.setRunning(JChemSearch.java:1063)





   at chemaxon.jchem.db.JChemSearch.run(JChemSearch.java:1082)









The smiles string of the sub structure search is [n,o]1:[c,n,o]:[c,n,o]:[c,n,o]:[c,n,o]:[c,n,o]:1 Granted this is a very strange search that could very well return almost all the molecules in our database it still probably should not fail with the cryptic error that it does.





Sub structure searches that do not use atom lists seem to work fine. Here is a code snippet showing how the search is being performed:





Code:
String dviUrl = "jdbc:oracle:thin:myuser/mypsswd@myhost:myport:myinstance";


    dviCon = DriverManager.getConnection(dviUrl);


    conh.setConnection(dviCon);


    MolHandler molHandler = new MolHandler(structure);


    molHandler.setQueryMode(true);


    searcher.setQueryStructure(molHandler.getMolecule());


    searcher.setConnectionHandler(conh);


    searcher.setStructureTable(SUBSTRUCT_TABLE_NAME);


    long milliseconds = System.currentTimeMillis();


    String resultTableName = "some_result_table_name";


    searcher.setResultTable(resultTableName);


    searcher.setResultTableMode


    (DatabaseSearch.CREATE_OR_REPLACE_RESULT_TABLE);


    searcher.setSearchType(JChemSearch.SUBSTRUCTURE);


    searcher.setWaitingForResult(true);


    searcher.run();






The search runs for several minutes eventually chewing a lot (between 70 and 100%) of CPU for most of those minutes then throws the exception above. I have tested in a seperate case that the input smiles string is valid so it would seem something about the processing of the results of the search is causing the error. However, this seems strange as the results should be in the table specified for the results via the setResultTable call so why is JChemSearcher working with smiles strings on the results?





Thanks,





James

ChemAxon 9c0afc9aaf

22-03-2005 19:34:07

Hi,





Could you tell me the exact version of JChem you are using ?





Best regards,





Szilard

User 6eb78e46c2

23-03-2005 18:38:32

Szilard,





From the Help About of JChemManager I get "JChem Manager 2.3pre2". I tried runnign java -jar jchem.jar but that gave me the error





"Failed to load Main-Class manifest attribute from


jchem.jar"





Hopefully this is enough information for you to determine the version information you need.





James

ChemAxon 9c0afc9aaf

24-03-2005 08:12:43

Hi,





You are using an old beta version of JChem.





The version display of the jar file was not implemented at that time.





I suggest you to upgrade to the latest stable version (3.0.9).





Please let me know if this helps.





Best regards,





Szilard