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

From: <>
Date: Tue, 8 Feb 2011 16:40:33 -0800 (PST)
Message-ID: <>

On Feb 7, 10:32 am, 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


>Given that the java is all centrally-help

This is not true, the Java code will be created within the schema (user) you are connected with; however if you use loadjava, you may specify the destination schema using -u option. I suggest to check which Java source is being compiled by retrieving the source, using the following query
Select text from user_source where name = 'jjo_java';

Kuassi Received on Tue Feb 08 2011 - 18:40:33 CST

Original text of this message