File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Oracle JDBC loadjava stored proc problem

 
Graeme Byers
Ranch Hand
Posts: 127
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1141
1
Java Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic