Home » Developer & Programmer » JDeveloper, Java & XML » Using Jdeveloper to compile SQLJ
Using Jdeveloper to compile SQLJ [message #91432] Thu, 29 August 2002 05:31 Go to next message
Mike Desouza
Messages: 3
Registered: August 2002
Junior Member
Hi all
I am trying to compile the following sqlj program using Jdeveloper Release 2 but i get the following error

Any Help would be appreciated

thks
Mike (Email mdesoua@lineone.net)

Error(18,33): class OracleContext not found in class sqlj.runtime.ExecutionContext
Error(18,130): method raiseNullExecCtx() not found in class sqlj.runtime.ExecutionContext
Error(18,182): method getOracleContext() not found in class sqlj.runtime.ExecutionContext

it works fine when I use freestanding sqlj.

import sqlj.runtime.*;
import sqlj.runtime.ref.*;
import java.sql.*;

public class secondsqlj extends Object {

public static void main (String [[]] args) throws SQLException {
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
DefaultContext.setDefaultContext(new DefaultContext
("jdbc:oracle:thin:@gangster:1521:TEST","ora1","ora1",false));

#sql iterator instructorlinesiter
(int instructor_id, String instructor_name);

instructorlinesiter instructorlines = null;

#sql instructorlines = {select instructor_id,instructor_name from instructor };

while (instructorlines.next()) {
System.out.println("instructor_id = " + instructorlines.instructor_id());
System.out.println("Instructor_name = " + instructorlines.instructor_name());
}

instructorlines.close();
} //Main
Re: Using Jdeveloper to compile SQLJ [message #91572 is a reply to message #91432] Mon, 18 November 2002 05:49 Go to previous messageGo to next message
Phil
Messages: 32
Registered: March 2001
Member
How did you resolve this, I would like to know as I am having a similar problem.

Thanks
Re: Using Jdeveloper to compile SQLJ [message #91587 is a reply to message #91572] Mon, 02 December 2002 02:33 Go to previous messageGo to next message
Jon Hunt
Messages: 1
Registered: December 2002
Junior Member
I too am having a similar problem.

For some reason my installation of jDeveloper 9.0.2 can not find the OracleContext class.

I am working on the basis that the Project needs an additional Class Path adding, but any help on how to resolve this would be much appreciated.

Regards
There is no soloution [message #91589 is a reply to message #91587] Mon, 02 December 2002 03:51 Go to previous messageGo to next message
phil.palij
Messages: 2
Registered: December 2002
Junior Member
There was no soloution, I don't use the Jdeveloper IDE any more I just use command line compilation on the server.

There is no help on this anywhere, let me know if you find any

Phil.
Re: There is no soloution [message #91665 is a reply to message #91587] Fri, 03 January 2003 14:40 Go to previous messageGo to next message
Judy Hollingsworth
Messages: 1
Registered: January 2003
Junior Member
I had the same problem. I found that the problem was caused by the order of the libraries in the project settings. I changed the order of the libraries and put the sqlj runtime at the top and it compiled fine.

Hope this helps!
Re: There is no soloution [message #91861 is a reply to message #91589] Tue, 27 May 2003 15:06 Go to previous messageGo to next message
Brent Brown
Messages: 1
Registered: May 2003
Junior Member
Move the sqlj runtime to the top of your libraries in the project settings. Also make sure nothing is referenced before the runtime in your "additional classpaths."
Re: There is no soloution [message #91862 is a reply to message #91861] Wed, 28 May 2003 02:23 Go to previous messageGo to next message
phil.palij
Messages: 2
Registered: December 2002
Junior Member
Thanks for the response, and yes you are right, it feels like a message in a bottle has just come back!

I did as you suggest some time ago, but by accident and got it working. Amazing what a couple of lines of knowledge can make.

I still have a bump on my head where I was banging it on the terminal trying to solve this. I think ORACLE should come up with some kind of dependancy tool. With the amorphous mass of interelated mega java software they are pumping out, its becoming a nightmare trying to maintain all the versions and compilation sequences.

Somebody is going to twig this over complicated software paradigm soon and suggest we all go back to basics.

Good luck and thanks,
Phil.
Re: There is no soloution - Yeh here is the Solution [message #92350 is a reply to message #91665] Sat, 12 June 2004 01:36 Go to previous message
Akhilesh
Messages: 1
Registered: June 2004
Junior Member
it really works to change the order of libraries and making SQLJ rumtime at the top.
Previous Topic: How to find the port number on which my oracle is running
Next Topic: Problem with connecting oracle to Java !
Goto Forum:
  


Current Time: Thu Mar 28 09:25:24 CDT 2024