User 34df8f131d
25-03-2015 12:06:05
AgiLab, as
a partner of Chemaxon, has a VALUE ADDED RESELLER LICENSE. We’ve
installed the cartridge in a new updated environment and we have some trouble
accessing (with PL/SQL) Jchem object with not owner users.
Here is our
environment /
JCHEM_CORE_PKG.GETENVIRONMENT()
Oracle environment:
Oracle
Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
PL/SQL Release
12.1.0.2.0 - Production
CORE
12.1.0.2.0
Production
TNS for
64-bit Windows: Version 12.1.0.2.0 - Production
NLSRTL
Version 12.1.0.2.0 - Production
JChem
owner: AGILAB_CHEM
JChem
Server environment:
Java VM
vendor: Oracle Corporation
Java
version: 1.8.0_25
Java VM
version: 25.25-b02
JChem
version: 15.3.9.0
JChem index
version: 15030900
JDBC driver
version: 11.2.0.3.0
JChem
Server start directory: C:\chemaxon\jchem\cartridge
JChem
Server host:port : localhost:1099
For
instance, a very simple PL/SQL function which works fine with previous
installation. This function updates a markush structure in the adequate table
created with JCAM exe
FUNCTION
modify_markush(
p_structure IN VARCHAR2, -- in cxsmiles
p_id IN NUMBER -- Id
) RETURN
BOOLEAN
IS
begin
-- Update
target
agilab_chem.jchem_table_pkg.jc_update(p_structure,'AGILAB_CHEM.AG_MARKUSH_LIBRARY',
p_id);
return true;
END
modify_markush;
Calling
this function from a not owner user : demo
set
serveroutput on
declare
b boolean;
begin
if
ag_jchem.modify_markush('CC(
- )C1=C(*)C=COC1
|$;;_R1;;;;;;;$,c:3,6,RG:_R1={CCCCCC* |$;;;;;;_AP1$|},{CCCCCCCCC*
|$;;;;;;;;;_AP1$|}|', 1) then
dbms_output.put_line('Modify
markush OK');
else
dbms_output.put_line('Modify
markush NON OK');
end if;
end;
After
restarting JchemCartridge service, the following error (sorry in French) :
Erreur commençant à la ligne: 21 de la commande -
declare
begin
if ag_jchem.modify_markush('CC(
- )C1=C(*)C=COC1
|$;;_R1;;;;;;;$,c:3,6,RG:_R1={CCCCCC* |$;;;;;;_AP1$|},{CCCCCCCCC*
|$;;;;;;;;;_AP1$|}|', 1) then
dbms_output.put_line('Modify markush OK');
else
dbms_output.put_line('Modify markush NON OK');
end if;
end;
Rapport
d'erreur -
ORA-29532: appel Java arrêté par une exception Java non
interceptée : java.rmi.NoSuchObjectException: no such object in table
ORA-06512: à "AGILAB_CHEM.JCHEM_TABLE_PKG", ligne
52
ORA-06512: à "AGILAB_CHEM.AG_JCHEM", ligne 518
ORA-06512:
à ligne 4
29532.
00000 - "Java call terminated by uncaught Java exception: %s"
*Cause:
A Java exception or error was signaled and could not be
resolved by the Java code.
*Action:
Modify Java code, if this behavior is not intended.
It seems
that not owner users of Jchem are not correctly granted to see Jchem objects.
We have granted Demo user like that :
- With SYS user :
grant connect, resource to
demo;
grant JCC_BASIC_ROLE to demo;
grant unlimited tablespace to demo;
call dbms_java.grant_permission('DEMO',
'SYS:java.net.SocketPermission', 'localhost:1099', 'resolve, resource,
connect');
- With Jchem Owner user (AgiLab_Chem)
:
call
PRIVMAN_PKG.SYNS_FOR_JCOBJS('agilab_chem','demo');
call agilab_chem.privman_pkg.grants_on_jcobjs('agilab_chem',
'agilab_chem');
call
agilab_chem.privman_pkg.grants_on_jcobjs('agilab_chem', 'DEMO');
We also
granted and created synonyms on JC tables and Packages of Jchem owner user to
user DEMO.
In the
Jcart.properties file, we added :
# Login and
password of the predefined user of cartridge
# added by
RA - 18/03/14
oracle.server.login=agilab_chem
oracle.server.password=agilab
Could you
give us any advices. We are working around for long time now. Thanks.
Best
regards