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

From: Jeremy <jeremy0505_at_gmail.com>
Date: Mon, 7 Feb 2011 18:32:20 -0000
Message-ID: <MPG.27ba4b1353a344c49898a7_at_News.Individual.NET>


[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 java.io.*;
	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 java.io.*;

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 ;)

Received on Mon Feb 07 2011 - 12:32:20 CST

Original text of this message