Using Jdeveloper to compile SQLJ [message #91432] |
Thu, 29 August 2002 05:31 |
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 #91587 is a reply to message #91572] |
Mon, 02 December 2002 02:33 |
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 |
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 |
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 #91862 is a reply to message #91861] |
Wed, 28 May 2003 02:23 |
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.
|
|
|
|