Permissions issues I don't know how to fix:

User 7f33ec9a5c

09-11-2012 20:07:19

===== THE ERROR IS==================


ORA-29902: error in executing ODCIIndexStart() routine
ORA-29540: class chemaxon/jchem/cartridge/JCFunctionsClob does not exist
ORA-06512: at "JCHEM.JCHEM_CLOB_PKG", line 81
ORA-06512: at "JCHEM.JC_IDXTYPE_IM", line 372
ORA-06512: at "SENOBASE.STRUCTUREID", line 37
ORA-06512: at line 6

======== THINGS THAT CAUSE THIS ERROR ==============================



--- from the jcart schema, running:  


select distinct s_structure_id
    from senobase.structure
 where jc_compare(s_smiles,'c1ccccc1','t:d tautomerSearch:n') = 1;


--- from any schema, calling a PL/SQL function with the above imbedded SQL


--SO the following PL/SQL generates the above error from anywhere.



CREATE OR REPLACE FUNCTION err_test(vSMILES IN VARCHAR2) RETURN number IS


       vStructureID number; 


BEGIN


 


     SELECT s_structure_id


       INTO vStructureID


       FROM SENOBASE.STRUCTURE


      WHERE jc_compare(s_smiles,vSMILES,'t:d tautomerSearch:n') = 1;


 


    RETURN vStructureID;


 


EXCEPTION


  WHEN NO_DATA_FOUND THEN


 


    return -1;


end;


/




 


 


===========THINGS THAT DO NOT CAUSE THE ERROR ======================


--- from any schema other than JCart, calling



  select distinct s_structure_id
    from senobase.structure
where jc_compare(s_smiles,'c1ccccc1','t:d tautomerSearch:n') = 1;


 -- from any schema other than JCart running:



declare


    iD number;


begin


 


    select distinct s_structure_id


    into id


    from structure


     where jc_compare(s_smiles,'c1ccccc1','t:d tautomerSearch:n') = 1;


 


     dbms_output.put_line(id);


 


end;



 


ChemAxon aa7c50abf8

09-11-2012 20:27:14

When executing Cartridge operators in stored procedures, the index owner (the user in whose schema the JChem index has been created) needs to be directly granted privileges on the objects in the JChem owner's schema (the schema where JChem Cartridge has been installed). (This is due to some obscure security consideration employed by Oracle.) Assuming that JChem Cartridge has bee installed in the JCHEM schema and the index has been created in JOE's schema, execute as JOE:


call privman_pkg.grants_on_jcobjs('JCHEM', 'JOE');

Let us know if this doesn't help.

User 7f33ec9a5c

09-11-2012 21:47:34

Are you sure I need to run that package to get jc_compare to work when called within the JCHEM schema?

ChemAxon aa7c50abf8

09-11-2012 23:10:48

I am not 100% sure -- especially that I don't know some of the defails of your particular context (including where JCART fits into my model of your problem). I just picked the problem scenario known to me to most closely match the description of your problem.


While I don't know some of the potentially relevant details of your problem (yet), my description fully specifies a scenario (stripped to its essentials) known to me to result in similar behavior, so you may be able to compare it with yours and decide for yourself how closely they match. You're welcome to indicate any discrepancies you may find between the two. We will then try and dig further into the details of your issue.


Conversely, if you find that my description provides a reasonably good scaffold into which to fit your issue, you may want to try to apply my solution to your situation. In this latter case, you need to be careful to make sure that if my description needs to be rotated N degrees to match your situtation, the solution also has to be rotated N degrees as well (unless, of course, you rotate your situtation minus N degrees before applying my solution, which is then to be kept in its original position).


Let me know if this doesn't help.

User 7f33ec9a5c

13-11-2012 17:21:19

Hi Peter,


You were correct, your permissions package was the first thing I needed.  


Then 


Szilard guided me to:


jchem.privman_pkg.grants_on_jcidx('PUBLIC', 'SENOBASE', 'JC_IDX', 1, 1, 1, 1);


Which resolved our permissions issues.


~mike


 


 


 

User 7f33ec9a5c

21-01-2013 21:44:51

I'm trying to use jc_compare() from a different schema (named RTECS) than the structure table schema (SENOBASE)


First thing I did was to connect as the JCHEM user and 



call privman_pkg.grants_on_jcobjs('JCHEM', 'RTECS');



Then I logged in as RTECS and tried:


call  jchem_core_pkg.use_password(<password>);


Which gives the error:


ORA-29532: Java call terminated by uncaught Java exception: java.lang.Exception: Problem connecting to JChemServer: rmi://db01:1099: the Permission (java.net.SocketPermission db01 resolve) has not been granted to RTECS. The PL/SQL to grant this is dbms_java.grant_permission( 'RTECS', 'SYS:java.net.SocketPermission', 'db01', 'resolve' )


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


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


 


... so then I go to a user that has access to update the java policy tables and it says




call dbms_java.grant_permission( 'RTECS', 'SYS:java.net.SocketPermission', 'db01', 'resolve' );


...which returns "method completed", but jchem_core_pkg.use_password still fails on the same error after granting the java permission.


What now?



 


 


 


 



 


 


 



ChemAxon 61b4fee994

22-01-2013 09:19:14

Hi,


Did you commit the transaction after calling grant permission? Have you tried to reconnect RTECS user?


Tamas

User 7f33ec9a5c

22-01-2013 16:35:34

Yes I was committing after updating java permissions.


No I did not restart the RTECS session.


Restarting the RTECS session solved the issue, thank you.


 


~Mike