upgrade to JChem16.4-25 failed

User 579b3160ef

22-10-2016 19:33:56

I'm the Oracle DBA, and trying to upgrade jchem cartridge for developers.   We're currently running jchem for Oracle version 6.21 on linux redhat 5.11 and Oracle 12.1.0.2  I've been asked to upgrade to jchem 16.4-25.  I've done upgrades in the past with no problem, but today seems to be challenging.   

When running the upgrade.sh script and asked for whether to upgrade indexes I tried the ask parameter - have always had developers do rebuild of indexes after upgrade, but thought I'd try it today myself.  Figured that since it would ask first I could say yes or no for each.  Unfortunately, it didn't get that far.  I get the following error :


SEVERE: error


java.lang.UnsupportedOperationException: Index type could not be upgraded. Creation during upgrade process is not supported. Schema: Schema[username=JCC_UPGR_STAGE, cartOwnerName=jchem, isDba=false, connectionString=jdbc:oracle:thin:@localhost:1521:rgntdev], implementation name: JC_IDXTYPE_IM


        at chemaxon.jchem.cartridge.install.schema.IndexType.prepareCreatePlan(IndexType.java:217)


        at chemaxon.jchem.cartridge.install.schema.Schema.prepareUpgrade(Schema.java:276)


        at chemaxon.jchem.cartridge.install.schema.Schema.createUpgradePlan(Schema.java:264)


        at chemaxon.jchem.cartridge.install.Upgrader.upgradeSchemaObjects(Upgrader.java:108)


        at chemaxon.jchem.cartridge.install.Upgrader.upgrade(Upgrader.java:64)


        at chemaxon.jchem.cartridge.install.Upgrader.upgrade(Upgrader.java:57)


        at chemaxon.jchem.cartridge.install.UpgradeCmdLine.upgrade(UpgradeCmdLine.java:311)


        at chemaxon.jchem.cartridge.install.UpgradeCmdLine.upgrade(UpgradeCmdLine.java:72)


        at chemaxon.jchem.cartridge.install.UpgradeCmdLine.main(UpgradeCmdLine.java:769)


 


I tried rerunning the upgrade with upgrade index: none, but still get the same error. It acted as if it worked except for regeneration of index, so I tried starting up cartridge, but got error that I needed to run 'createAccessControlContext'.  I tried that - but received an error that it couldn't find the jcart.jar file.  It's not in the cartridge directory!


Any help would be appreciated.  Such as, how do I restart a failed upgrade.  I tried renaming JChem16425 to JChem16425 _save and starting over.  Untarred file to new directory, ran upgrade script saying none to rebuild index, but it seemed to fail even sooner.  Same error about unsupported index types.

I seem to be able to run old cartridge, but very slow.   


Update:   I was able to run call
dbms_java.grant_permission('
JCC_BASIC_ROLE', 'SYS:java.security.SecurityPermission', 'createAccessControlContext',''
);  successfully.
Just not 
loadjava -grant '<JCHEM_USER>' -user
jchem/<password>@ORCLjcart.jar  


if I try the loadjava call,  I get the missing jcart.jar error.

Now if I try a test structure query, I get the following:


chemaxon.jchem.cartridge.sharedorajcsrv.rmi.VersionMismatchException: JChem


version mismatch: 6.2.1 in Oracle, 16.4.25.0 in RMI Server


 


Does that mean I just need to rebuild index?   I don't want to leave system in unusable state  (currently I can bring up 6.2.1 so it's usable)


thank you for any help


 


 


ChemAxon abe887c64e

24-10-2016 13:36:47

Hi Jennifer,


Thank you for your report.


Our first guess is that you might not give the correct path of the old JChem or the jcart.properties file in that old JChem refers to a database at local host:1521:rgntdev where no jc_idxtype indexes are present.


Have you also moved the old database to a new place ?


Best regards,


Krisztina

User 579b3160ef

24-10-2016 17:28:29

Hi Krisztina,


First question - should I be able to re-run the upgrade with existing installation directory, or should I delete the new directory and start over. (i.e. rm JChem15425 directory,  untar file, and rerun installation?)


As for the path of old cartridge, I copied and pasted it, so I know it's correct. And there is only one database it's pointing to, so I know the connection info is fine.  What's strange is that it's trying to find JChem indexes when I said not to upgrade them.  Also, it's complaining that we don't have any indexes of type: JC_IDXTYPE_IM,  which is correct.  Ours are type JC_IDXTYPE.  I assumed the complaint about mismatched versions, was because we haven't done the index rebuild.  I was hesitant to try to rebuild indexes though, having gotten an error in the upgrade process.  Since it didn't put the jcart.jar file in the cartridge directory,  I suspected that it maybe didn't finish the upgrade ?


 


thanks


Jennifer

ChemAxon abe887c64e

25-10-2016 12:28:31

Hi Jennifer,


Unfortunately, we still do not understand why you got the first error:


java.lang.UnsupportedOperationException: Index
type could not be upgraded. Creation during upgrade process is not
supported. Schema: Schema[username=JCC_UPGR_STAGE, cartOwnerName=jchem,
isDba=false, connectionString=jdbc:oracle:thin:@localhost:1521:rgntdev],
implementation name: JC_IDXTYPE_IM


If this error message really relates to the to-be-upgraded schema of the cartridge owner then there must be a serious problem with the old system. The type (and not the indextype!)  JC_IDXTYPE_IM should have been present in that schema. JC_IDXTYPE is the name of the indextype, and its implementation name is JC_IDXTYPE_IM.


Based on that assumption, we think that upgrade of that old cartridge might not be possible, only a new installation of the JChem Oracle Cartridge could create a proper environment.


By the way, you can check the jcart.properties file in JChem15425/cartridge/conf/ folder, whether it contains any information about the upgrade. After a successful upgrade it should contain the path to the old JChem, the database connection parameters, etc...


Best regards,


Krisztina


 

User 579b3160ef

25-10-2016 15:29:02

Hi Krisztina,


 


Everything looks good.in jcart.properties of failed upgrade directory: shows correct path to old version - /usr/oracle/ChemAxon/JChem621/cartridge, correct sid, etc.

Can you answer the question as to what to do to retry the upgrade?  Do I delete new directory and start over,  ie.   rm -rf Jchem16425,   unzip jchem-16.4.25.0.zip,  re-run install.sh  ?

Also,  shouldn't the unzipped directory have jcart.jar in the directory?  It's not there.  I'm wondering if I have a bad zip file?

Lastly,  I still don't understand the JC_IDXTYPE_IM type.  Where should I see that?  There is one table within a schema that contains a jchem index, RGNT_STRUCTURE.  The index is of oracle type DOMAIN,  it's called RGNT_STRUCTURE_JC_IDX.  Why would it even be trying to upgrade an index if I said I was going to do it manually?  Can you tell me where I should see the JC_IDXTYPE_IM -   ie what query can I run to verify this?

Thank you,
Jennifer



User 579b3160ef

25-10-2016 15:35:58

One other question.


 


We're running Oracle 12.1.0.2,  RHEL 5.11, so I downloaded the following:

jchem-16.4.25.0.zip










 283.1 MB 2016-04-25 14:17:01

Is that the correct version?


 


thanks


Jennifer

User 579b3160ef

25-10-2016 19:16:48

Since it looks like with the time change, it'll be another day before I hear from you , could you answer one more question please.  We really need to get this resolved by Thursday if possible.


If I were to do a fresh install of 16.4.25 instead of upgrade - what does that do to the jchem index in the database that was created with V. 6.2.   Can I just do the install, then run  


'ALTER INDEX RGNT_STRUCTURE_JC_IDX REBUILD PARAMETERS('upgradeOnly=y');'


 


thank you,


Jennifer

ChemAxon abe887c64e

26-10-2016 10:15:04

Hi Jennifer,


Do I delete new directory and start over,  ie.   rm -rf Jchem16425,   unzip jchem-16.4.25.0.zip,  re-run install.sh  ?

Yes, you can do it.


Also,  shouldn't the unzipped directory have jcart.jar in the directory?  It's not there.  I'm wondering if I have a bad zip file?

No, you surely have a good zip file. jcart.jar is not directly included in the zip. Could you send the text of the error message relating jcart.jar, we'll check where it comes from in the code.


Please run the following statement as dba and check whether the appropriate jchem owner has JC_IDXTYPE_IM or not.


select owner, type_name from dba_types where TYPE_NAME like 'JC_IDXTYPE%';


We're running Oracle 12.1.0.2,  RHEL 5.11, so I downloaded the following:

jchem-16.4.25.0.zip










 283.1 MB 2016-04-25 14:17:01



Is that the correct version?

Yes, jchem-16.4.25.0.zip is a correct version, but why do not you download the latest version? There were some really important bugfixes in the meantime.




If I were to do a fresh install of 16.4.25 
instead of upgrade - what does that do to the jchem index in the
database that was created with V. 6.2.   Can I just do the install, then
run  

'ALTER INDEX RGNT_STRUCTURE_JC_IDX REBUILD PARAMETERS('upgradeOnly=y');'

No, unfortunately not. A fresh install requires much more steps to be executed (collecting the information how the current indexes were created, dropping the indexes, dropping the old schema of the jchem owner [needed if the new jchem owner must have the same name as the old one], installing the new cartridge, creating the new indexes.) If you need, we are ready to help within a TC meeting, but please take into account that we are in CEST time zone.


Best regards,


Krisztina

User 579b3160ef

27-10-2016 13:26:15

Hi Krisztina,


 


Ok,  so I tried the upgrade one more time.  I removed the existing jchem directory.  Unzipped the tar file again, ran the upgrade, and said 'none' to upgrading indexes.  

I still get the same error:


java.lang.UnsupportedOperationException: Index 
type could not be upgraded. Creation during upgrade process is not 
supported. Schema: Schema[username=JCC_UPGR_STAGE, cartOwnerName=jchem, 
isDba=false, connectionString=jdbc:oracle:thin:@localhost:1521:rgntdev], 
implementation name: JC_IDXTYPE_IM



I ran the query you suggested below, and I do have indexes of that type:


select owner, type_name from dba_types where TYPE_NAME like 'JC_IDXTYPE%';


OWNER     TYPE_NAME

JCHEM      JC_IDXTYPE_IM



So,  I started over with a fresh installation.

I again removed the directory, untarred the install file, then ran the install.sh script.

That worked fine.  I then dropped the existing jchem index, and did a create_index with the script the developers always use.

It finished with 4 errors of the same type:


WARNING: Generic tautomer generation threw exception:java.lang.ArrayIndexOutOfBoundsException on molecule:



<?xml version="1.0" encoding="UTF-8"?><cml xmlns="http://www.chemaxon.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.chemaxon.com/marvin/schema/mrvSchema_16_02_15.xsd" version="ChemAxon file format v16.02.15, generated by v16.4.25.0">



 Not knowing the data  but seeing that it finished with just a warning, I tried running my usual test script.  It just calls use_password for the various users and runs a couple of test queries.  Now I'm getting an error that my license is invalid.  Even though it worked fine for v. 6.2.1.   Do we need a different license for v16.4.25 than for 6.2.1?

thank you,
Jennifer 

User 579b3160ef

27-10-2016 13:38:50

Ok - I had the wrong license file.  I have the latest and it works now.

Just need help with the 4 warning below.


 


thanks,


Jennifer 

ChemAxon abe887c64e

28-10-2016 07:18:09

Could you send at least one of these four molecules? If they are confidential ones please send them to jccartridge-support at chemaxon.com.


Best regards,


Krisztina

User 579b3160ef

28-10-2016 14:46:35

Hi Krisztina,


 


I'll ask the scientists - not sure about how to do that.


 


One other question.  Now that I have the new cartridge up and running, and 2 jchem indexes built, we're frequently getting the following error:

ERROR: JChem has run out of memory when trying to cache chemical hashed
fingerprint information.
Please visit Please read further about 'cache size' in the documentation or the
FAQ according to out of memory errors

Any thoughts?  This is new.


 


thanks,
Jennifer

ChemAxon 9c0afc9aaf

30-10-2016 12:39:41

Hi Jennifer,


JChem has to be able to cache fingerprints and other necessary information in memory for searching (for all tables).


You can increase the allowed heap memory by editing the configuration file


jchem/cartridge/conf/jcart.properties


Please see the following section:



# The maximum heap memory allocated to Java process in which the JChem Server
# is running. See
# http\://www.chemaxon.com/jchem/doc/admin/cartridge.html\#server_memory for
# details on how to calculate the required amount.
jcserver.maxmem=700m


Please increase the number according to you memory needs.


Unfortunately the link in the configuration file seems to be outdated, please see this link for further information:


https://docs.chemaxon.com/display/docs/Installation+and+administration+of+JChem+Cartridge+for+Oracle#InstallationandadministrationofJChemCartridgeforOracle-SettingthemaximumsizeoftheJavaheapmemory


Best regards,


Szilard

ChemAxon 9c0afc9aaf

30-10-2016 12:45:10

PS:


The correct link is


https://docs.chemaxon.com/display/docs/Installation+and+administration+of+JChem+Cartridge+for+Oracle#InstallationandadministrationofJChemCartridgeforOracle-SettingthemaximumsizeoftheJavaheapmemory


(I have edited the post above, this is just because of e-mail notifications)


Szilard