Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Help with Java Stored Procedures in Oracle
I finally figured out what the problem was. My Java Stored Procedure opens
a debug file, and the NullPointerException occurred because I wasn't
properly handling the IOException in the catch. When I executed the Java
Stored Procedure from sqlplus on the server, it ran with my permissions so
it had no problem opening the file (though oddly enough the file was owned
by oracle). However, when I executed it from the client it ran with the
oracle user's permissions so it failed when trying to open the file. I was
finally able to determine this when I noticed that a child process the my
Java Stored Procedure spawns runs as me when I executed it from sqlplus on
the server, but it runs as the oracle user when executed from the client. I
hope I explained it clearly enough.
Thanks,
Gary Fowler
3M Health Information Systems
grfowler_at_mmm.com
Gary Fowler wrote:
> Hopefully someone has run across this before. I have been beating my
> head on this for several days.
>
> The client side is JBuilder Enterprise Version 3.00 on a Pentium III
> running NT 4.0.
> The server side is Oracle 8i Version 8.1.5 on a Data General Aviion
> running DG/UX Release R4.20MU05.
>
> I have written a Java Stored Procedure and I can execute it without any
> trouble from sqlplus.
> I can also execute PL/SQL Stored Procedures without any trouble from the
> client. However if I try to execute the Java Stored Procedure from the
> client either directly using a CallableStatement object, or indirectly
> (i.e. Database Trigger or from a PL/SQL Stored Procedure) I get the
> following error:
>
> SQLException: ORA-29532: Java call terminated by uncaught Java
> exception: java.lang.NullPointerException
> ORA-06512: at "ALPHA1V1.EXEC_COMPILER", line 0
>
> where EXEC_COMPILER is the call spec that publishes the Java Stored
> Procedure.
>
> Again, I have not trouble calling it from the sqlplus command prompt
> either directly or indirectly, but I get that error no matter what I try
> when calling it from the client. I would greatly appreciate any input.
>
> Thank you,
>
> Gary Fowler
> 3M Health Information Systems
> grfowler_at_mmm.com
Received on Wed Dec 29 1999 - 14:20:29 CST
![]() |
![]() |