How to upgrade to a newer version of JChem ?

19-07-2005 15:29:43

I would like to upgrade to a newer version of JChem.




Please let me know what steps should I make ?

ChemAxon 9c0afc9aaf

19-07-2005 16:09:56

Please follow the following steps:





1. Download the latest JChem installation package





2. Make sure no JChem applications are running





3. Replace your old JChem directory with the contents of the new package.


(delete/move the old directory and extract the package to the same location)





4. Run the JChemManager (jcman) GUI





5. Connect to the database in the GUI. Please make sure the user specified in the connection has sufficient rights to ALTER the structure tables and the property table





6. The GUI will automatically prompt you to allow upgrading the tables.


Some of these changes are quick, however the


regeneration of the tables can take for a while.


The time requirement for table regeneration is comparable to the time of importing the same number of structures.





7. If you are using JChem from other (standalone or web) applications, make sure you also update the .jar files used by them.


These jar files are located under the jchem\lib directory in the unpacked package. You should also restart these applications, so they can load the new code from the updated .jar files





For example if you are running a JSP application in Tomcat:





a.: Stop Tomcat


b.: Update the .jar files in Tomcat's lib directory.


c.: Clearing Tomcat's cache is also recommended.


This can be performed by deleting the content of <tomcat_home>/work directory.


d.: Start Tomcat

User 34fa07fa99

31-10-2005 23:11:39

I have a linux client that I can only access from a console. I don’t think I can run the jcman GUI from a prompt. Is there another way to update the client ?

ChemAxon 9c0afc9aaf

01-11-2005 10:32:12

Hi,





You can use the following command in the console to preform necessary the upgrade actions without GUI:





Code:
jcman u









Best regards,





Szilard

User 77bcbbb206

01-04-2009 18:26:42

I'm trying to upgrade from 3.1.1 to 5.2 and have run the installer and regenerated the structure table (which adds the formula column) successfully.  I now get this error while trying to run a query using the structure index:




















Code:
[size=12]Error: ORA-29902: error in executing ODCIIndexStart() routine


[/size]












Code:
[size=12]ORA-29532: Java call terminated by uncaught Java exception: java.lang.RuntimeException: The index on table 'JCHEM.RMS_STRUCTURE' contains obsolete data. (Current index version: 24, index version for 'JCHEM.RMS_STRUCTURE': 5020005.) Please recreate the index with the 'regenerateTable' option.[/size]


















I had assumed that this was due to the fact that the jc_idxtype had changed so I would need to recreate the index itself.  Trying to create the index, I get this error message:























Code:
[size=12]ERROR at line 1:


ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine


ORA-29532: Java call terminated by uncaught Java exception:


java.sql.SQLException: The structure table contains newer data version that


this program version can handle. Please use a later version.


ORA-06512: at "JCHEM.JCHEM_CORE_PKG", line 0


ORA-06512: at "JCHEM.JC_IDXTYPE_IM", line 17[/size]


















I'm pretty confused as to what to do next.  Any advice would be greatly appreciated.  I'm using Windows Server 2003 and Oracle 9.2.0.7.








Thanks,








Jim


ChemAxon 9c0afc9aaf

01-04-2009 19:27:49

Hi,





I'm not the expert, but I'm in your time zone, so let me try to answer.





In the Oracle Cartridge we can speak of several versions:





- the version of the structure table


- the software version inside Oracle, and the version of the associated index


- the software versions outside Oracle (JChem Server - this used to be a Tomcat instance)





From the error messages it seems that you haven't upgraded the JChem Server part.


By the way in the current version it is not running inside an Apache Tomcat web server, you can start up the server with a script.


http://www.chemaxon.com/jchem/doc/admin/cartridge.html#server_starting





Please refer to the "Manual upgrade" section on how to upgrade:





http://www.chemaxon.com/jchem/doc/admin/cartridge.html#upgrade





(Software assisted upgrade requires at least version 3.1.3)





Let us know if this helps.





Best regards,





Szilard

User 77bcbbb206

01-04-2009 21:21:25

Szilard,





Thanks so much for the quick response and the information regarding the different pieces of the cartridge.  You're right.  I was trying to apply the "software guided" upgrade when my oracle and jchem version do not allow it.





I've tried the manual upgrade and everything seems to be upgrading correctly but when I attempt to test the upgrade I get this error...











Code:
SQL> call jchem_core_pkg.use_password('JCHEM');


call jchem_core_pkg.use_password('JCHEM')


     *


ERROR at line 1:


ORA-29532: Java call terminated by uncaught Java exception:


java.lang.Exception: Problem connecting to JChemServer: rmi://localhost:1099:


Connection refused









Any thoughts?  I've executed the dbms_java.grant_permission to the role suggested (I've even forcefully appended the port number) but it doesn't seem to do any good.





Thanks in advance,





Jim

ChemAxon 9c0afc9aaf

01-04-2009 21:29:54

Is the server process running ?





Is the port free (not blocked by firewall) ?





What do you get when you telnet to this port ?

User 77bcbbb206

01-04-2009 22:02:22

It's so nice having on this side of the globe.  Have you moved here or just visiting?





You were correct.  I hadn't started the jchem server (I'm not quite used to not using Tomcat).  I also had to modify the conf/jcart.properties file with the correct server information.  After that everything worked perfectly.





Thanks so much,





Jim

ChemAxon 9c0afc9aaf

01-04-2009 22:38:17

Quote:
Have you moved here or just visiting?
I have moved to San Diego last summer.





Best regards,





Szilard

User 77bcbbb206

06-04-2009 21:05:18

Hello Again,


I'm still workingm still not finished.  It looks as if the cartridge itself has been installed/updated correctly but the for some reason the index that I've created isn't hitting the data in the structure table.  From the queries below you should be able to see the size of the table, the correct functioning of the cartridge, but the lack of functioning of the index (although it's being used).  Do I have to somehow rebuild the index or pass in some parameters to tell it to use the existing rows as a base?  I couldn't find anything in the documentation regarding this.


Thanks in advance,


Jim


SQL*Plus: Release 9.2.0.1.0 - Production>Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.



Connected to:
Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.7.0 - Production


SQL> select count(*) from rms_structure;


  COUNT(*)
----------
    552290


SQL> select count(*) from rms_structure where CD_SMILES = 'Cc1ccccc1Br';


  COUNT(*)
----------
         1


SQL>  select substr(jc_molconvert('C1cccccC1', 'sdf:-a -2'), 0, 255) from dual;


SUBSTR(JC_MOLCONVERT('C1CCCCCC1','SDF:-A-2'),0,255)
--------------------------------------------------------------------------------


  Marvin  04060913592D


  7  7  0  0  0  0            999 V2000
    0.8566    1.3632    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    1.5999    1.0053    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    1.7834    0.2009    0.0000 C



SQL> DROP INDEX JCHEM$CD_SMILES$X;


Index dropped.


SQL> CREATE INDEX JCHEM$CD_SMILES$X>Index created.


SQL> set timing>SQL> set autotrace traceonly


SQL> select CD_ID from RMS_STRUCTURE where jc_compare(CD_SMILES, 'Cc1ccccc1Br', 't:p exactIsotopeMatching:y exactChargeMatching:y')=1;


no rows selected


Elapsed: 00:00:00.03


Execution Plan
----------------------------------------------------------
   0      SELECT STATEMENT Optimizer=CHOOSE (Cost=3 Card=23878 Bytes=48281316)


   1    0   TABLE ACCESS (BY INDEX ROWID) OF 'RMS_STRUCTURE' (Cost=3 Card=23878 Bytes=48281316)


   2    1     DOMAIN INDEX OF 'JCHEM$CD_SMILES$X'


 



Statistics
----------------------------------------------------------
        851  recursive calls
         22  db block gets
        776  consistent gets
          0  physical reads
          0  redo size
        248  bytes sent via SQL*Net to client
        372  bytes received via SQL*Net from client
          1  SQL*Net roundtrips to/from client
         13  sorts (memory)
          0  sorts (disk)
          0  rows processed


SQL> exit

ChemAxon aa7c50abf8

06-04-2009 21:26:35

Hi Jim,


Not sure, if this is our Forum which is broken again...but the index creation statement looks suspicious:


SQL> CREATE INDEX JCHEM$CD_SMILES$X>Index created.


I'd expect to see also some INDEXTYPE IS ...JC_IDXTYPE at the end of the statement (I am unable to copy-paste the relevant URL here -- sorry). (I am sending you a mail separately with the URL.)


Thanks


Peter

User 77bcbbb206

06-04-2009 21:31:41

Sorry.  I was trying to format it correctly.  Here is the unformatted copy.  Not that the index creation took a very short time. 


-------------------------------------------------------


SQL*Plus: Release 9.2.0.1.0 - Production on Mon Apr 6 14:29:42 2009


Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.



Connected to:
Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.7.0 - Production


SQL> select count(*) from rms_structure;


  COUNT(*)
----------
    552290


SQL> select count(*) from rms_structure where CD_SMILES = 'Cc1ccccc1Br';


  COUNT(*)
----------
         1


SQL>  select substr(jc_molconvert('C1cccccC1', 'sdf:-a -2'), 0, 255) from dual;


SUBSTR(JC_MOLCONVERT('C1CCCCCC1','SDF:-A-2'),0,255)
--------------------------------------------------------------------------------


  Marvin  04060914302D


  7  7  0  0  0  0            999 V2000
    0.8566    1.3632    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    1.5999    1.0053    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    1.7834    0.2009    0.0000 C



SQL> DROP INDEX JCHEM$CD_SMILES$X;
DROP INDEX JCHEM$CD_SMILES$X
           *
ERROR at line 1:
ORA-01418: specified index does not exist



SQL> set timing on
SQL> CREATE INDEX JCHEM$CD_SMILES$X ON RMS_STRUCTURE(CD_SMILES) INDEXTYPE IS jc_idxtype;


Index created.


Elapsed: 00:00:00.00
SQL> set autotrace traceonly
SQL> select CD_ID from RMS_STRUCTURE where jc_compare(CD_SMILES, 'Cc1ccccc1Br', 't:p exactIsotopeMatching:y exactChargeMatching:y')=1;


no rows selected


Elapsed: 00:00:00.08


Execution Plan
----------------------------------------------------------
   0      SELECT STATEMENT Optimizer=CHOOSE (Cost=3 Card=23878 Bytes=4
          8281316)


   1    0   TABLE ACCESS (BY INDEX ROWID) OF 'RMS_STRUCTURE' (Cost=3 C
          ard=23878 Bytes=48281316)


   2    1     DOMAIN INDEX OF 'JCHEM$CD_SMILES$X'



Statistics
----------------------------------------------------------
        853  recursive calls
         22  db block gets
        785  consistent gets
          0  physical reads
          0  redo size
        248  bytes sent via SQL*Net to client
        372  bytes received via SQL*Net from client
          1  SQL*Net roundtrips to/from client
         13  sorts (memory)
          0  sorts (disk)
          0  rows processed


SQL> exit

ChemAxon aa7c50abf8

07-04-2009 20:19:17

This discussion is being carried on off line. Topic will be updated -- at the latest -- with the final findings.

ChemAxon aa7c50abf8

16-04-2009 12:11:10

Part of the problem was that there were two JChem indexes (one on the cd_structure column and one on the cd_smiles column) and only one of them was upgraded. The following upgrade sequence was successful:


install msi.
cd c:\program files\chemaxon\jchem\cartridge\
set ORACLE_HOME=D:\oracle\ora92
upgrade.bat jchem/jchem@krms
log in as sys
sqlplus "xxx/xxx@krms as sysdba"
call jchem.privman_pkg.public_syns_for_jcobjs('JCHEM');
CREATE ROLE JCC_BASIC_ROLE;
call dbms_java.grant_permission( 'JCC_BASIC_ROLE', 'SYS:java.net.SocketPermission', 'servername', 'connect,resolve');
call dbms_java.grant_permission( 'JCC_BASIC_ROLE', 'SYS:java.net.SocketPermission', 'servername:1099', 'connect,resolve');
call jchem.privman_pkg.grants_on_jcobjs('JCHEM', 'JCC_BASIC_ROLE');
commit;
exit

loadjava -grant JCC_BASIC_ROLE -user jchem/jchem@krms jcart.jar

log in as sys
sqlplus "sys/oracle@krms as sysdba"
grant JCC_BASIC_ROLE to DBUSER;
commit;
exit


cd C:\Program Files\ChemAxon\JChem\cartridge
install-interact.bat --jcserver-only
modify jcart.properties file with OraHome/Users and License File locations
Switch it to automatic and start service
sqlplus jchem/jchem@krms
select jchem.jchem_core_pkg.getenvironment() from dual;


DROP INDEX JCHEM$CD_STRUCTURE$X;
DROP INDEX JCHEM$CD_SMILES$X;

Log into jcman and upgrade table (look on desktop)

CREATE INDEX JCHEM$CD_STRUCTURE$X ON RMS_STRUCTURE(CD_STRUCTURE) INDEXTYPE IS jc_idxtype;
CREATE INDEX JCHEM$CD_SMILES$X ON RMS_STRUCTURE(CD_SMILES) INDEXTYPE IS jc_idxtype;