Re: What could "break" java in Oracle 11g..?

From: bdbafh <>
Date: Thu, 10 Feb 2011 05:24:58 -0800 (PST)
Message-ID: <>

On Feb 7, 1:32 pm, Jeremy <> wrote:
> Hi
> [11g on Windows Server 2007]
> I figured that you need people like me to ask questions in cdos to keep
> it going ;)
> I am trying to help a colleague work out why something "isn't working".
> The something in question is simple java compilation:
>         import java.lang.*;
>         import*;
>         public class jjo_java
>         {
>         };
> /
> This compiles fine in account A but in account B fails with
> Warning: Java created with compilation errors.
> Elapsed: 00:00:00.40
> 18:18:59 SQL> show errors java source "jjo_java"
> No errors.
> 18:20:04 SQL>
> If we remove the line  
>  import*;
> then it compiles OK.
> [odd that there no errors shown despite it reporting errors and if we
> look into the table USER_ERRORS I see simply
> "ORA-29535: source requires recompilation"]
> Account B is a long-established "application owner" account with lots of
> tables , plsql, types etc. and is where we perform core code development
> and in which we are trying to utilise some java APIs from within PL/SQL.
> So what has happened is that "loadjava" has been used to put stuff into
> the account and then various things have been removed and now from a
> java perspective, this account is "broken".
> Account A was created freshly this afternoon by:
>   create user a identified by a;
>   grant connect, resource to a;
> So to assist my colleague I wanted to see if anyone out there could shed
> some light on the possible cause.
> Given that the java is all centrally-held, I don't see how A could
> access it all correctly and yet B cannot. I did wonder further if there
> might be some kind of name conflict but we have looked long and hard at
> user_objects and cannot see anything that might be responsible.
> Can anyone suggest a path to find just what is wrong with account B?
> Sledgehammers to crack this nut are acceptable within reason ;)
> --
> jeremy

connect and resource have gone bye bye.
this was mentioned in the upgrade docs.
grant the app schemas some real roles with real privileges ... and in the case of app owner schemas that leverage stored code, grant real sys privs directly, not via roles.

-bdbafh Received on Thu Feb 10 2011 - 07:24:58 CST

Original text of this message