I am trying to export the source for a java object from an oracle database using the following code.
DECLARE
blob1 BLOB;
BEGIN
DBMS_LOB.CREATETEMPORARY(blob1, FALSE);
DBMS_JAVA.EXPORT_SOURCE('OBJECTNAME', 'SCHEMANAME', blob1);
END;
Whenever I try to run it I get an oracle.aurora.rdbms.ModifyPermissionException exception even though I am running as System. Any ideas what is causing this and how I can get this to work.
Having investigated a bit more it workd when running as sysdba and also as the user that owns the objects. Unfortinatly I am making a program to dump out the java objects in an Oracle database and I can't really force my users to be sysdba or the object's owner. Is there any way I can stop this error?