Updating tables - JChem 5.2.6/5.4.1.1 to 5.6.0.3

User a200fcbc5e

07-11-2011 12:30:44

Hi, 


I have some HSQLDB chemistry tables created with JChem 5.2.6 and JChem 5.4.1.1


I'm trying to programmatically update them to 5.6.0.3


In my code, during the multiple calls to Updater.performCurrentUpdate(), I get a warning message about FindAllRings.startRingSearch() written to the console - see below for console output and code.


Is this warning something to worry about, does this affect the integrity of the updated chemistry table. Will some required data be missing from the new chemistry database or can I trust the message "Tables have been recalculated successfully."


 


Thanks,


Barry 


 


Console output:


...


...


{expected update messages} 


...


...


07-Nov-2011 12:03:33 chemaxon.marvin.modules.FindAllRings startRingSearch


 


WARNING: Timeout reached in ringsearch.


07-Nov-2011 12:03:34 chemaxon.marvin.modules.FindAllRings startRingSearch


WARNING: Timeout reached in ringsearch.


Update:result = Tables have been recalculated successfully


========================


 


Code:



package toyJChem;


import java.sql.Connection;

import java.sql.SQLException;

import java.sql.Statement;


import chemaxon.jchem.db.Updater;

import chemaxon.util.ConnectionHandler;


public class JChemDemo_upgrade 

{

private static Connection connection;

private static ConnectionHandler conn_handler;


/**

* Test that JChem tables are automatically updated correctly when moving from version 5.2.6/5.4.1.1 to 5.6.0.3 

 * 

* @param args 

* @throws Exception

*/

public static void main (String[] args) throws Exception

{

init();


try

{

System.out.println("=======Start upgrade==============");

String message = "";


Updater ud = new Updater( conn_handler );

Updater.UpdateInfo ui = null;

ui = ud.getNextUpdateInfo();

while (ui != null)

{

System.out.println ("");

System.out.println("========================");

System.out.println("Update:before");

System.out.println (ui.message);


checkpointDatabase();

message = ud.performCurrentUpdate();


System.out.println("Update:result = " + message);

System.out.println("========================");

System.out.println ("");


ui = ud.getNextUpdateInfo();

}

shutdownDatabase();

}

catch (SQLException sqle)

{

System.out.println("Problem updating : " );

System.out.println("toString() = : " + sqle);

sqle.printStackTrace();

}

}


private static void init() throws Exception

{

connection = ConnectionFactory.getConnection();

conn_handler = ConnectionFactory.getHandler();

}


public static void checkpointDatabase() throws SQLException

{

Statement s = connection.createStatement();

s.execute("CHECKPOINT");

s.close();

}


public static void shutdownDatabase() throws SQLException

{

Statement s = connection.createStatement();

s.execute("SHUTDOWN");

s.close();

}

}


 

ChemAxon 4a2fc68cd1

08-11-2011 10:02:49

Hi Barry,


You should not worry about this warning. It denotes that for some molecules the identification of all rings has been reached a timout limit. The ring information is used to generate fingerprint for the compound, but in case of such timeouts (which is typical indeed) we set the fingerprint generation method to not include ring information. So these "problems" does not affect the integrity of the database or the updating process. It only means that the fingerprint could be somewhat less distinctive when applied in search.


Best regards,
Peter

User a200fcbc5e

09-11-2011 08:57:51

Hi Peter,


Thanks for the advice.


Since it is nothing to worry about, I want to prevent the warning message  from outputing to std error console.


I've tried changing my log4J configuration by adding a logger named "chemaxon" in the log4j.xml file, but with no effect. (Trying to send the message to a log file.)


I still get the warning message:



---------


09-Nov-2011 08:50:23 chemaxon.marvin.modules.FindAllRings startRingSearch


WARNING: Timeout reached in ringsearch.


09-Nov-2011 08:50:24 chemaxon.marvin.modules.FindAllRings startRingSearch


WARNING: Timeout reached in ringsearch.


----------


Does the code outputting this message expect a log4j Logger with a different name than "chemaxon"? Or does it output direct to the stderr. Ideally, I'd like to stop that message appearing on stderr, if possible. Can you help?

Thanks,

Barry



ChemAxon 4a2fc68cd1

10-11-2011 14:52:53

Hi Barry,


> Does the code outputting this message expect a
log4j Logger with a different name than "chemaxon"?


It seems to me that the name of the logger is "chemaxon.marvin.modules.FindAllRings". Could you try disable logging using this name?


> Or does it output
direct to the stderr.


No, it uses java.util.logging.Logger.


Peter