Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Unable to load Java procedure in Oracle 8i

Re: Unable to load Java procedure in Oracle 8i

From: C. Ferguson <c_ferguson_at_rationalconcepts.com>
Date: Fri, 13 Aug 1999 12:04:16 -0700
Message-ID: <37B46C30.9DCE7F1A@rationalconcepts.com>


I'm going to jump in on part of this thread. The white paper I read over on the technet site states you can load .java files, .class files, and .jar files. Because you are trying to load a .java file, the oracle vm is being used to compile it. Your .java file seems to be using a class/classes that the vm does not have. You say you successfully loaded the class file, so one way you might be able to get the .java in is to load the supporting class files first that you used to build your .class file on the outside....haven't tried this myself yet, still in the research stage. Another note is that since you couldn't originally get the .java file, and even though you got the .class file, it might not execute, since the VM still doesn't have all the correct classes...Go to technet and read the white papers on writing stored procedures in java, and the architecture of 8i and its VM. Lots of interesting tidbits in there.

cindy

"mbeaubie_at_yahoo.com" wrote:

> Hi!
>
> I believe the loadjava utility is intended to load classes and not
> source.
>
> You procedure specification probably has an error, try the following
> from SQL*Plus:
>
> alter procedure fib compile;
> show errors
>
> Hope this helps
>
> Michel
>
> smanux_at_dream.club-internet.fr wrote:
> >
> > Hello,
> >
> > I'm facing a weird problem with Java stored procedures in Oracle 8i.
> > Each time i try to use the loadjava utility, i get this error message :
> >
> > C:\>loadjava -u scott/tiger_at_myPC:1521:orcl -v -r -t test.java
> >
> > internal error: unanticipated exception: java.lang.NoClassDefFoundError:
> > oracle/aurora/sqljdecl/SqljDecl
> > java.lang.NoClassDefFoundError: oracle/aurora/sqljdecl/SqljDecl
> > at oracle.aurora.server.tools.SourceFileReader.getScanner
> > (SourceFileReader.java:52)
> > at oracle.aurora.server.tools.SourceFileReader.getFirstName
> > (SourceFileReader.java:61)
> > at oracle.aurora.server.tools.LoadJava.processLoadAndCreate
> > (LoadJava.java:1094)
> > at oracle.aurora.server.tools.LoadJava.process(LoadJava.java:1021)
> > at oracle.aurora.server.tools.LoadJavaMain.run(LoadJavaMain.java:193)
> > at oracle.aurora.server.tools.LoadJavaMain.main(LoadJavaMain.java:49)
> > resolver :
> > loadjava: 1 err
> >
> > Anyway, if i try to load the .class instead of the .java, loadjava works
> > C:\>loadjava -u scott/tiger_at_myPC:1521:orcl -v -r -t test.class
> >
> > But then i'm unable to publish my procedure in Oracle (I copy/past the
> > Fibonnaci example from Oracle documentation, and Oracle says that the
> > object 'fib' is invalid when i type the 'desc fib' command.)
> >
> > Has anyone an idea about this ?
> >
> > Thanks
> >
> > Emmanuel BOURG
Received on Fri Aug 13 1999 - 14:04:16 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US