How to find out why Java class in oracle is INVALID

I have a java class. I load it in Oracle 11 like this:

create or replace and compile java source named CubeTester as
import java.io.PrintWriter;
import java.io.StringWriter;
... etc

      

Oracle responds to "Statement Processed" - it looks like I did everything right. But when I do a SQL statement to find its validity like this:

SELECT object_name, dbms_java.longname(object_name), status
FROM user_objects
WHERE object_type='JAVA CLASS'
AND dbms_java.longname(object_name) LIKE '%CubeTest%' 
ORDER BY 1

      

I get this:

 OBJECT_NAME    DBMS_JAVA.LONGNAME(OBJECT_NAME) STATUS
 CubeTester CubeTester  INVALID

      

Now I went and checked every import I have and every one returned as VALID. (Except for java.io. *, but since this is part of the JDK, I assume this is ok - am I wrong?)

And yes, the code works fine from eclipse (and command line too)

How do I debug this? The problem is I am doing this from APEX (SQL Workshop), so I don't have access to the box, I can't use sqlplus or something. It should be a single SQL command or something.

Any suggestions on how to proceed?

+3


source to share





All Articles