File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases 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
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Oracle JDBC loadjava stored proc problem" Watch "Oracle JDBC loadjava stored proc problem" New topic

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: 1141

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

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:

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

Good Luck,
I agree. Here's the link:
subject: Oracle JDBC loadjava stored proc problem
It's not a secret anymore!