This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Five Lines of Code and have Christian Clausen on-line!
See this thread for details.
Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Oracle JDBC loadjava stored proc problem

 
Ranch Hand
Posts: 127
  • 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.
 
Ranch Hand
Posts: 1143
1
Eclipse IDE Oracle Java
  • 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.
 
His brain is the size of a cherry pit! About the size of this ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic