my dog learned polymorphism*
The moose likes JDBC and the fly likes Oracle JDBC loadjava stored proc problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Oracle JDBC loadjava stored proc problem" Watch "Oracle JDBC loadjava stored proc problem" New topic
Author

Oracle JDBC loadjava stored proc problem

Graeme Byers
Ranch Hand

Joined: Apr 16, 2004
Posts: 127
I'm learning JDBC from Donald Bales 'Java Programming with Oracle JDBC'.
I can compile his source (page 90) but when I attempt to load the class file into Oracle 8.1.6 using :
>loadjava -v -t system/manager@jelly:1521 rcl HelloWorld.class
I receive the following response :
initialization complete
loading : HelloWorld
creating : HelloWorld
Error while retrieving errors for HelloWorld
ORA-00904 : invalid column name.
There is nothing wrong with Mr Bale's code - I get the same error with :
public class HelloWorld {
public static String quote() { return "Hello World" ; }
}
I have no difficulty running the examples in later chapters of his book (
Statement , PreparedStatement , CallableStatement)

Thank you in advance.
Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1121

Graeme,
Oracle 8i is desupported. For your information, you can download the latest Oracle version -- 10g Release 2 -- from here:

http://otn.oracle.com

Also, you shouldn't use the SYSTEM user for anything. It is a special user intended to help administer the database. You should use a regular user. If you have installed the sample schema, then you should have a user named "scott" whose password is "tiger".

(The story goes that Scott was someone who worked at Oracle, and "Tiger" was the name of his cat.)

It looks to me like your "loadjava" command is wrong. I think it should be more like:

where you execute the above command from the directory where the "HelloWorld.class" file is located.

You should refer to the Oracle documentation for the full details regarding the "loadjava" command. The Oracle documentation is available from:

http://tahiti.oracle.com

But it doesn't have the Oracle 8i documentation since, as I said before, Oracle 8i is desupported.

Good Luck,
Avi.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Oracle JDBC loadjava stored proc problem
 
Similar Threads
LoadJava
Loadjava and user_objects table
LoadJava
LoadJava
Loadjava program