-
Friends:
I issued the following command to load java stored proc and I got the following error :
loadjava -u user/password -resolve Foo.java
internal error: unanticipated exception: java.lang.NoClassDefFoundError: oracle/aurora/sqljdecl/SqljDecl
java.lang.NoClassDefFoundError: oracle/aurora/sqljdecl/SqljDecl
at oracle.aurora.server.tools.loadjava.SourceFileReader.getScanner(SourceFileReader.java:52)
at oracle.aurora.server.tools.loadjava.SourceFileReader.getFirstName(SourceFileReader.java:61)
at oracle.aurora.server.tools.loadjava.LoadJava.noteSource(Compiled Code)
at oracle.aurora.server.tools.loadjava.LoadJava.processLoadAndCreate(Compiled Code)
at oracle.aurora.server.tools.loadjava.LoadJava.process(LoadJava.java:1135)
at oracle.aurora.server.tools.loadjava.LoadJavaMain.run(LoadJavaMain.java:266)
at oracle.aurora.server.tools.loadjava.LoadJavaMain.main(LoadJavaMain.java:57)
loadjava: 1 errors
And this is the code in Foo.java :
import java.lang.*;
import java.util.*;
public class Foo {
public static void main(String args[]) {
System.out.println("Hello World !");
}
public static String prependHello(String tail) {
return "Hello " + tail;
}
}
Does anyone know what this error mean ? Has anyone created a Java stored proc ?
Any help will greatly be appreciated. Thanks.
-
Still looking for some answer .......
-
Well for one loadjava is supposed to be used on classes/jars etc, not source files. Compile it first and try
loadjava -u user/password Foo.class
I'm playing with it and still getting an error but you should use compiled classes not source files at any rate.
-
actually maybe it can be used with .java files. do some searches in the forum, google, or metalink and i'm sure you will find examples on how to use the utilities.
-
You have to set up java virtual machine first.
So you have to run following script as sys:
$ORACLE_HOME/javavm/install/initjvm.sql
Then check to make sure you have DBMS_JAVA package.
Then run
$loadjava -u scott/tiger -resolve /note/Hello.java
$sqlplus scott/tiger
select object_name, status , object_type from user_objects where object_type like '%JAVA%';
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|