title: trying to export java source code from an Oracle database
body: <p>I am trying to export the source for a java object from an oracle database using the following code.</p>
  
  <pre><code>DECLARE
    blob1 BLOB;
  BEGIN
    DBMS_LOB.CREATETEMPORARY(blob1, FALSE);
    DBMS_JAVA.EXPORT_SOURCE('OBJECTNAME', 'SCHEMANAME', blob1);  
  END;
  </code></pre>
  
  <p>Whenever I try to run it, I get this exception:</p>
  
  <pre><code>oracle.aurora.rdbms.ModifyPermissionException
  </code></pre>
  
  <p>even though I am running as System. Any ideas what is causing this and how I can get this to work.</p>
  
  <p>Having investigated a bit more it worked when running as sysdba and also as the user that owns the objects. Unfortunately 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. </p>
  
  <p>Is there any way I can stop this error?</p>