InputStream cannot be null

User 8bc8ccad88

19-01-2010 11:55:20

Hi,


since we migrated our code to JChem 5.3 beta3 the message "InputStream cannot be null " is printed to stdout or stderr each time we invoke a search in the compound database with the following code:





    JChemSearch searcher = new
JChemSearch();


    JChemSearchOptions searchOptions
= new JChemSearchOptions();




   
searcher.setConnectionHandler(connectionHandler);


   
searcher.setQueryStructure(molecule);


   
searchOptions.setSearchType(SearchConstants.DUPLICATE);


   
searcher.setSearchOptions(searchOptions);


   
searcher.setStructureTable(tableName);


    searcher.setRunMode(JChemSearch.RUN_MODE_SYNCH_COMPLETE);



    try {

      searcher.run();

      int[] results =
searcher.getResults();


      if (results.length
> 0)


        return
results[0];


      return null;

    }





Do you have any idea about that? Are there any changes in the API?

ChemAxon 9c0afc9aaf

19-01-2010 14:31:17

Hi,


 


Two quick questions that may help us track this down quicker:


- Do you also see a stack trace or only this text ? If you do could you please paste it  here please ?


- Does the search run normally or not (do you get hits) ?


 


Best regards,


 


Szilard

User 8bc8ccad88

20-01-2010 12:29:06

Hi,


there is no stack trace and the search produces normal results.


 


Greets, Ingo

ChemAxon e274e1bada

25-01-2010 10:34:41

Hi,


We tried to reproduce the error, but we could not. Could you specify
- your old JChem version,
- the messages from the stderr and stdout (before and after the error message)
- your Java vesion
- query and target molecules.

Please check your code, perhaps the message comes from there.


Regards, Edvard

User 8bc8ccad88

02-02-2010 09:38:05

Hi,


the error message seems to originate from the Xerxes XML module. The latest JChem version where the message didn't appear was JChem 5.2.4. After upgrading to JChem 5.3.0.1 the message is still there. It doesn't seem that the message belongs to a specific query molecule, as it appears after every query in our logs.


Our java version is:


java version "1.6.0_10"
Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
Java HotSpot(TM) 64-Bit Server VM (build 11.0-b15, mixed mode)

ChemAxon 9c0afc9aaf

04-02-2010 16:11:26

Hi,


 


Can you check that only the xerces.jar that is shipped with the latest version of JChem (located in its lib directory) is in the classpath of your application, and no other jars containing the javax.xml package ?


 


Best regards,


 


Szilard

User 8bc8ccad88

15-02-2010 09:44:30

Hi,


actually, it seems that we indeed use xerxes.jar files from different sources (i.e. the Lucene search engine). We will check if there is an issue with the application paths.


Thanks, Ingo