I have successfully compiled a java class in schema two which provides a connection to an OEM data source. I subsequently compiled another java class, also in schema two, that uses the connection in the connection class and loads a temp table. Now, the connection class should really be in a different schema, so I recompiled it in schema one, changed the class name in schema two and then recompiled the one in schema two to essentially remove it from the picture.
When I tested my call specification to the second class, which loads the temporary table, I get an error, as expected because the connection class no longer exists in schema two.
On page 2-15 of the Java Developer's Guide 11g Release 1, it says:
You can provide other users the right to run your class in the following ways:
Using the loadjava -grant option:
Using the following command:
SQL> grant execute on myclass to scott;
However, when using the second option (as the user of schema one where I just recompiled it), I get a message that the class does not exist. I have done everything I can think of to confirm that the name I have entered is correct including:
select dbms_java.shortname('long classname') from dual;
Is this not really an acceptable way to grant execute privileges on a java source to another schema?
Thanks,
Gregory