Problem to load java classes into Oracle

User 0ec4156b13

21-09-2004 08:46:12

Hi,





I get the folowing error messages when I launch the install.bat script:





Error while creating XXXXXXX <-- a class or resource


ORA-01031: Insufficient privileges





The Oracle user I am using has been granted the following roles and permissions:


CREATE ANY TABLE


RESOURCE


CREATE ANY INDEX





dbms_java.grant_permission( 'JCHEMUSER', 'SYS:java.net.SocketPermission', 'localhost', 'resolve' );


dbms_java.grant_permission( 'JCHEMUSER', 'SYS:java.net.SocketPermission', '127.0.0.1:8081', 'connect,resolve' );





Thanks,





Eric.

User 0ec4156b13

21-09-2004 08:59:16

The Role CREATE ANY PROCEDURE must be granted to the JCHEMUSER(obvious but not documented! :-)





Eric.

ChemAxon aa7c50abf8

21-09-2004 13:45:59

Hi Eric,





The RESOURCE role should be enough to install JChem Cartridge. The installation script creates procedures exclusively in the schema owned by the user under who's identity, the installation is performed (the user specified in the connection string for the install script - probably JCHEMUSER in your case). The RESOURCE role already includes the CREATE PROCEDURE privilege, which is needed to create procedures in the user's own schema.





Please, note that the CREATE ANY TABLE and CREATE ANY INDEX are solely needed in case the catridge is used by users not owning the schema where JChem Cartridge has been installed. In future versions, not even these extra privileges will be required for the JChem Cartridge owner to access the required objects in other users' schemata the cartridge procedures will be installed to use the identity of the caller (via the AUTHID CURRENT_USER modifier).





Peter

User 0ec4156b13

21-09-2004 13:53:48

Thanks for your help Peter.





I have now another pb with privileges: I got the following error message when I try to create a new table from jcman (the JCHEMPROPERTIES table creation is OK)





C:\downloads\jchem2.3.3\jchem\cartridge>jcman


Auto-increment trigger creation failed


java.sql.SQLException: ORA-01031: privilÞges insuffisants





at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)


at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)


at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)


at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)


at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:109


3)


at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.ja


va:2047)


at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.jav


a:1940)


at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStateme


nt.java:2709)


at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java


:796)


at chemaxon.jchem.db.TableInfo.executeSql(TableInfo.java:506)


at chemaxon.jchem.db.TableInfo.decipherAndExecute(TableInfo.java:544)


at chemaxon.jchem.db.TableInfo.decipherAndExecute(TableInfo.java:517)


at chemaxon.jchem.db.TableInfo.createTriggerIfNeeded(TableInfo.java:720)





at chemaxon.jchem.db.TableInfo.createTable(TableInfo.java:676)


at chemaxon.jchem.gui.Creator.run(Creator.java:109)


at java.lang.Thread.run(Unknown Source)





Any idea?





Thanks again,





Eric.

ChemAxon aa7c50abf8

21-09-2004 14:55:10

Eric,





Either you're trying to create a JChem table in another user's schema or your login user does not have the RESOURCE role (RESOURCE also has the CREATE TRIGGER privilege).





Please, double check to see if your user has the RESOURCE role.





If your trying to go cross-schema with JChemManager, you will need the "ANY" versions of most of the system privileges assigned to RESOURCE. (For sure, you will need CREATE ANY TABLE, CREATE ANY SEQUENCE, CREATE ANY TRIGGER.)





Peter