Technical Support Forum Index
Technical Support Forum
Access ChemAxon scientists and developers here. For registration and login issues contact website support.
Updating tables - JChem 5.2.6/5.4.1.1 to 5.6.0.3
To watch this topic for replies  Register (enables digests) or give email address:
Reply to topic
Display posts from previous:   
    View previous topic :: View next topic    
Author Message
bconnor

Joined: 05 Apr 2011
Posts: 13

View user's profile

Back to top
Link to postPosted: Mon Nov 07, 2011 1:30 pmPost subject: Updating tables - JChem 5.2.6/5.4.1.1 to 5.6.0.3 Reply with quote

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();
}
}

 

pkovacs84
ChemAxon personnel
Joined: 15 Mar 2010
Posts: 83

View user's profile

Back to top
Link to postPosted: Tue Nov 08, 2011 11:02 amPost subject: Reply with quote

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

bconnor

Joined: 05 Apr 2011
Posts: 13

View user's profile

Back to top
Link to postPosted: Wed Nov 09, 2011 9:57 amPost subject: Reply with quote

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

pkovacs84
ChemAxon personnel
Joined: 15 Mar 2010
Posts: 83

View user's profile

Back to top
Link to postPosted: Thu Nov 10, 2011 3:52 pmPost subject: Reply with quote

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

Reply to topic
Page 1 of 1


To watch this topic for replies   Register (enables digests) or give email address  
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum