jcman sticky parameters?

User 1a3b6cd85b

15-02-2010 10:08:47

I created a mysql structure table with jcman (Table1), loaded it, and have searched it with no problem:



1) jcman c Table1 --coldefs ", mr_id INTEGER" --driver org.gjt.mm.mysql.Driver --dburl jdbc:mysql://localhost/database1 -s 



I then loaded Table1 with jcman and a sdfile:


2) jcman a Table1 t1.sdf --connect "MR_ID=MR_ID"


I then created a different mysql structure table (Table2):


3) jcman c Table2 --coldefs ", NEW_id text"--driver org.gjt.mm.mysql.Driver --dburl jdbc:mysql://differentHost/database2 -s   


 I then loaded table2 with a different sdfile:


4) jcman a Table2 t2.sdf  --nametofield NEW_ID --dburl jdbc:mysql://differentHost/database2 --driver org.gjt.mm.mysql.Driver


Both tables loaded fine for steps 1-4.


Table1 got corrupted somehow. I dropped it, recreated (repeated #1), and attempted a load with step #2 - however, I get an error for each attempted molecule:


Java.sql.SQLException: ERROR: field "NEW_ID" is not present in table "Table1". 


I am very perplexed by this. It seems jcman is using switches or a configuration from steps 3/4 - even though I am repeating step 2...


Please help!!!

User c1ce6b3d19

16-02-2010 08:06:46

Steve,


Using the "-s" flag will save the settings of the connection properties (jdbc Driver, url, and, if applicable, username and password) of the command.  The next jcman commands will reuse the connection properties.  


 


It seems likely with your posted scenario that the commands giving you trouble are run with the wrong configuration.   That is, the command is run after using -s on a previous command that connects to a different database (database1 vs. database2).  


 


You may check the saved configuration by looking at the .jchem file.  The exact location of this file on your operating system can be found in the help ("jcman -h") in the section describing the -s or --saveconf option.


Jon 

ChemAxon 9c0afc9aaf

18-02-2010 20:26:04

Steve,


We will try to reproduce this behavior.


Could you please let us know your exact JChem version ? 


Also:


Table1 got corrupted somehow. I dropped it

Did you drop it via "jcman d" or with equivalent API or application, or via plain SQL ? (the latter is not recommended) 


Thanks,


 


Szilard

User 1a3b6cd85b

23-02-2010 19:51:09



Yes, thanks. I understand the -s switch now and located the .jchem file.


Re: second question, I used the jcman d switch to delete the table. Not sure how it was corrupted.  I think I am o.k. now, thanks for your help.


 


-Steve



ChemAxon ebbce65bcf

03-03-2010 14:51:35

From version 5.3.2 this strange behaviour of -s option will be fixed to prevent such complications are mentioned above. So we does not intend to save field connections and structure name field to .jchem file and reuse these entries anymore.


Roland