SQLJ translation on Win2K box

Machine: Win2k 256MB on board and 40 gig harddrive
Database: Oracle 8.1.6 with jDeveloper 3.1
JDK: Sun 1.3.1
When I try to translate an sqlj file I get the following warning message:
Warning: You are using an Oracle JDBC Driver, but connecting to a non-Oracle database.
The url is jdbc:oracle:thin:@localhost:1521:SID. This url works fine with straight ODBC on the same machine, but sqlj does not seem to like it.
Any explanation of what is happening would be appreciated.
null

Do you know what version of SQLJ you are using?
(Place the SQLJ runtime.zip/translator.zip and your Oracle JDBC driver classesXX.zip in your CLASSPATH and say:
java sqlj.tools.Sqlj -version-long )
My gues would be that the SQLJ version is older that your Oracle database and thus may not correctly recognize the Oracle database designation.
Additionally, note that there are issues when translating with 8.1.7 or older SQLJ versions under JDK 1.3 - see:
http://technet.oracle.com/tech/java/sqlj_jdbc/htdocs/faq.html#usingjdk13

Similar Messages

  • SQLJ Translation does not create profile file

    SQLJ Translation does not create profile file.
    After translating a small file HelloWorld.sqlj
    the following files are created:
    HelloWorld_SJProfileKeys.class
    HelloWorld.class
    HelloWorld.java
    Although there is a HelloWorld_SJProfileKeys.class, profile file HelloWorld_SJProfile0.ser has NOT been created.
    The starting file .sqlj file HelloWorld.sqlj is taken from O'Reilly book 'Java Programming with Oracle SQLJ' by Jason Price. The file contains a valid SQL statement to display the date.
    My environment variables were set up with instructions from:
    http://www.onjava.com/pub/a/onjava/2001/12/05/learning_sqlj.html
    When I run java HelloWorld to run the .java file, I get the error:
    SQLException java.sql.SQLException: profile HelloWorld_SJProfile0 not found: java.lang.ClassNotFoundException: HelloWorld_SJProfile0
    I searched the internet high and low for a similar error to mine but I could not find a match.
    I read the following text from http://otn.oracle.com/tech/java/sqlj_jdbc/htdocs/faq.html#translationerrors
    but it does not help me.
    "ClassNotFoundException: xxx.yyy_SJProfile0 for class xxx.yyy_SJProfileKeys
    If you see an exception such as:
    java.sql.SQLException: profile xxx.yyy_SJProfile0 not found:
    java.lang.ClassNotFoundException:
    xxx.yyy_SJProfile0 for class xxx.yy_SJProfileKeys
    then you must ensure that the SQLJ profile(s), such as xxx/yyy_SJProfile0.ser, is available in the SQLJ runtime environment. This includes JARing this file as part of an applet deployment, or publishing it to the server via loadjava.
    Any ideas? Thanks in advance,
    John
    Helloworld.sqlj before translation:
    The program HelloWorld.sqlj illustrates how to connect to a
    database, and display the words "Hello World" along with
    the current date.
    // import required packages
    import java.sql.Date;
    import java.sql.SQLException;
    import oracle.sqlj.runtime.Oracle;
    public class HelloWorld {
    public static void main(String [] args) {
    java.sql.Date current_date;
    try {
    // connect to the database
    Oracle.connect(
    "jdbc:oracle:thin:@localhost:1521:orac",
    "scott",
    "tiger"
    // get the current date from the database
    #sql { SELECT sysdate INTO :current_date FROM dual };
    // display message
    System.out.println("Hello World! The current date is " +
    current_date);
    } catch ( SQLException e ) {
    System.err.println("SQLException " + e);
    } finally {
    try {
    // disconnect from the database
    Oracle.close();
    } catch ( SQLException e ) {
    System.err.println("SQLException " + e);
    } // end of main()
    HelloWorld.java after translation:
    /*@lineinfo:filename=HelloWorld*//*@lineinfo:user-code*//*@lineinfo:1^1*//*
    The program HelloWorld.sqlj illustrates how to connect to a
    database, and display the words "Hello World" along with
    the current date.
    // import required packages
    import java.sql.Date;
    import java.sql.SQLException;
    import oracle.sqlj.runtime.Oracle;
    public class HelloWorld {
    public static void main(String [] args) {
    java.sql.Date current_date;
    try {
    // connect to the database
    Oracle.connect(
    "jdbc:oracle:thin:@localhost:1521:orcl",
    "scott",
    "tiger"
    // get the current date from the database
    /*@lineinfo:generated-code*//*@lineinfo:28^7*/
    // #sql { SELECT sysdate  FROM dual  };
    sqlj.runtime.profile.RTResultSet __sJT_rtRs;
    sqlj.runtime.ConnectionContext __sJT_connCtx = sqlj.runtime.ref.DefaultContext.getDefaultContext();
    if (__sJT_connCtx == null) sqlj.runtime.error.RuntimeRefErrors.raise_NULL_CONN_CTX();
    sqlj.runtime.ExecutionContext __sJT_execCtx = __sJT_connCtx.getExecutionContext();
    if (__sJT_execCtx == null) sqlj.runtime.error.RuntimeRefErrors.raise_NULL_EXEC_CTX();
    synchronized (__sJT_execCtx) {
    sqlj.runtime.profile.RTStatement __sJT_stmt = __sJT_execCtx.registerStatement(__sJT_connCtx, HelloWorld_SJProfileKeys.getKey(0), 0);
    try
    sqlj.runtime.profile.RTResultSet __sJT_result = __sJT_execCtx.executeQuery();
    __sJT_rtRs = __sJT_result;
    finally
    __sJT_execCtx.releaseStatement();
    try
    sqlj.runtime.ref.ResultSetIterImpl.checkColumns(__sJT_rtRs, 1);
    if (!__sJT_rtRs.next())
    sqlj.runtime.error.RuntimeRefErrors.raise_NO_ROW_SELECT_INTO();
    current_date = __sJT_rtRs.getDate(1);
    if (__sJT_rtRs.next())
    sqlj.runtime.error.RuntimeRefErrors.raise_MULTI_ROW_SELECT_INTO();
    finally
    __sJT_rtRs.close();
    /*@lineinfo:user-code*//*@lineinfo:28^58*/
    // display message
    System.out.println("Hello World! The current date is " +
    current_date);
    } catch ( SQLException e ) {
    System.err.println("SQLException " + e);
    } finally {
    try {
    // disconnect from the database
    Oracle.close();
    } catch ( SQLException e ) {
    System.err.println("SQLException " + e);
    } // end of main()
    }/*@lineinfo:generated-code*/class HelloWorld_SJProfileKeys
    private static HelloWorld_SJProfileKeys inst = null;
    public static java.lang.Object getKey(int keyNum)
    throws java.sql.SQLException
    if (inst == null)
    inst = new HelloWorld_SJProfileKeys();
    return inst.keys[keyNum];
    private final sqlj.runtime.profile.Loader loader = sqlj.runtime.RuntimeContext.getRuntime().getLoaderForClass(getClass());
    private java.lang.Object[] keys;
    private HelloWorld_SJProfileKeys()
    throws java.sql.SQLException
    keys = new java.lang.Object[1];
    keys[0] = sqlj.runtime.ref.DefaultContext.getProfileKey(loader, "HelloWorld_SJProfile0");
    }

    SQLJ Translation does not create profile file.
    After translating a small file HelloWorld.sqlj
    the following files are created:
    HelloWorld_SJProfileKeys.class
    HelloWorld.class
    HelloWorld.java
    Although there is a HelloWorld_SJProfileKeys.class, profile file HelloWorld_SJProfile0.ser has NOT been created.
    The starting file .sqlj file HelloWorld.sqlj is taken from O'Reilly book 'Java Programming with Oracle SQLJ' by Jason Price. The file contains a valid SQL statement to display the date.
    My environment variables were set up with instructions from:
    http://www.onjava.com/pub/a/onjava/2001/12/05/learning_sqlj.html
    When I run java HelloWorld to run the .java file, I get the error:
    SQLException java.sql.SQLException: profile HelloWorld_SJProfile0 not found: java.lang.ClassNotFoundException: HelloWorld_SJProfile0
    I searched the internet high and low for a similar error to mine but I could not find a match.
    I read the following text from http://otn.oracle.com/tech/java/sqlj_jdbc/htdocs/faq.html#translationerrors
    but it does not help me.
    "ClassNotFoundException: xxx.yyy_SJProfile0 for class xxx.yyy_SJProfileKeys
    If you see an exception such as:
    java.sql.SQLException: profile xxx.yyy_SJProfile0 not found:
    java.lang.ClassNotFoundException:
    xxx.yyy_SJProfile0 for class xxx.yy_SJProfileKeys
    then you must ensure that the SQLJ profile(s), such as xxx/yyy_SJProfile0.ser, is available in the SQLJ runtime environment. This includes JARing this file as part of an applet deployment, or publishing it to the server via loadjava.
    Any ideas? Thanks in advance,
    John
    Helloworld.sqlj before translation:
    The program HelloWorld.sqlj illustrates how to connect to a
    database, and display the words "Hello World" along with
    the current date.
    // import required packages
    import java.sql.Date;
    import java.sql.SQLException;
    import oracle.sqlj.runtime.Oracle;
    public class HelloWorld {
    public static void main(String [] args) {
    java.sql.Date current_date;
    try {
    // connect to the database
    Oracle.connect(
    "jdbc:oracle:thin:@localhost:1521:orac",
    "scott",
    "tiger"
    // get the current date from the database
    #sql { SELECT sysdate INTO :current_date FROM dual };
    // display message
    System.out.println("Hello World! The current date is " +
    current_date);
    } catch ( SQLException e ) {
    System.err.println("SQLException " + e);
    } finally {
    try {
    // disconnect from the database
    Oracle.close();
    } catch ( SQLException e ) {
    System.err.println("SQLException " + e);
    } // end of main()
    HelloWorld.java after translation:
    /*@lineinfo:filename=HelloWorld*//*@lineinfo:user-code*//*@lineinfo:1^1*//*
    The program HelloWorld.sqlj illustrates how to connect to a
    database, and display the words "Hello World" along with
    the current date.
    // import required packages
    import java.sql.Date;
    import java.sql.SQLException;
    import oracle.sqlj.runtime.Oracle;
    public class HelloWorld {
    public static void main(String [] args) {
    java.sql.Date current_date;
    try {
    // connect to the database
    Oracle.connect(
    "jdbc:oracle:thin:@localhost:1521:orcl",
    "scott",
    "tiger"
    // get the current date from the database
    /*@lineinfo:generated-code*//*@lineinfo:28^7*/
    // #sql { SELECT sysdate  FROM dual  };
    sqlj.runtime.profile.RTResultSet __sJT_rtRs;
    sqlj.runtime.ConnectionContext __sJT_connCtx = sqlj.runtime.ref.DefaultContext.getDefaultContext();
    if (__sJT_connCtx == null) sqlj.runtime.error.RuntimeRefErrors.raise_NULL_CONN_CTX();
    sqlj.runtime.ExecutionContext __sJT_execCtx = __sJT_connCtx.getExecutionContext();
    if (__sJT_execCtx == null) sqlj.runtime.error.RuntimeRefErrors.raise_NULL_EXEC_CTX();
    synchronized (__sJT_execCtx) {
    sqlj.runtime.profile.RTStatement __sJT_stmt = __sJT_execCtx.registerStatement(__sJT_connCtx, HelloWorld_SJProfileKeys.getKey(0), 0);
    try
    sqlj.runtime.profile.RTResultSet __sJT_result = __sJT_execCtx.executeQuery();
    __sJT_rtRs = __sJT_result;
    finally
    __sJT_execCtx.releaseStatement();
    try
    sqlj.runtime.ref.ResultSetIterImpl.checkColumns(__sJT_rtRs, 1);
    if (!__sJT_rtRs.next())
    sqlj.runtime.error.RuntimeRefErrors.raise_NO_ROW_SELECT_INTO();
    current_date = __sJT_rtRs.getDate(1);
    if (__sJT_rtRs.next())
    sqlj.runtime.error.RuntimeRefErrors.raise_MULTI_ROW_SELECT_INTO();
    finally
    __sJT_rtRs.close();
    /*@lineinfo:user-code*//*@lineinfo:28^58*/
    // display message
    System.out.println("Hello World! The current date is " +
    current_date);
    } catch ( SQLException e ) {
    System.err.println("SQLException " + e);
    } finally {
    try {
    // disconnect from the database
    Oracle.close();
    } catch ( SQLException e ) {
    System.err.println("SQLException " + e);
    } // end of main()
    }/*@lineinfo:generated-code*/class HelloWorld_SJProfileKeys
    private static HelloWorld_SJProfileKeys inst = null;
    public static java.lang.Object getKey(int keyNum)
    throws java.sql.SQLException
    if (inst == null)
    inst = new HelloWorld_SJProfileKeys();
    return inst.keys[keyNum];
    private final sqlj.runtime.profile.Loader loader = sqlj.runtime.RuntimeContext.getRuntime().getLoaderForClass(getClass());
    private java.lang.Object[] keys;
    private HelloWorld_SJProfileKeys()
    throws java.sql.SQLException
    keys = new java.lang.Object[1];
    keys[0] = sqlj.runtime.ref.DefaultContext.getProfileKey(loader, "HelloWorld_SJProfile0");
    }

  • Webi/Deski report labels as part of Translation Manager in BOXI 3.1

    Hi,
          I am using Translation manager in BOXI 3.1. I am not able to see the report labels(not universe objects) in the translation manager when I open the report in the translation manager. I can only see the prompts in the translation manager. Is it possible to include labels also in the translation manager so that i can use different labels for different languages. eg:- report title, free cells etc.... 
         If I cannot use report title in the translation manager I will not be able to use same report for different languages as the most visible part of the report will be report title.
    Thanks
    Shameer

    Hi,
    I have the same problem and I've worked a lot to find a solution to that.
    Unfortunately, I guess  "translation manager" (at the moment) can translate just webi prompts and it cannot do anything with labels and webi objects names.
    I hope someone will contraddict me...

  • SQLJ translator for ISO/ANSI does not create .SER profile (Jdev 9.0.0 prev)

    The SQLJ translater that comes with JDeveloper 9.0.3 preview does not create profiles (.SER) when running with -codegen=ansi or iso. Thus producing none runnable code.
    It is not possible to set any switches in JDev.
    Previous versions of the translated did produce the .SER files.
    Is there a workaround possible?
    Thanks,
    Robert

    Fo the answer and a workaround look here:
    Re: A field is missing in my table.....
    -Robert

  • SQLJ translator for ISO/ANSI does not create .SER profile (Jdev 9.0.3 prev)

    The SQLJ translater that comes with JDeveloper 9.0.3 preview does not create profiles (.SER) when running with -codegen=ansi or iso. Thus producing none runnable code.
    It is not possible to set any switches in JDev.
    Previous versions of the translated did produce the .SER files.
    Is there a workaround possible?
    Thanks,
    Robert
    P.S.: I posted this also in the SQLJ forum.

    Robert,
    My mistake - you are correct, the change I mentioned was put in just after the Preview Release. The .ser files will go into the project source directory in the Preview Release. But this should be the same behavior as in previous releases - are you seeing a difference in behavior between a past release and the Preview Release? Everything up to and including the 9.0.3 Preview Release should put the .ser files in the project source directory. When the 9.0.3 Production Release is available, they will be put into the project output directory instead.
    The fix to put the .ser files into the output directory is not in the translator.jar file. It is in the core JDeveloper code (in jdev.jar). So unfortunately it is not a fix that could be easily dropped into the Preview Release. However, it will be available in the 9.0.3 Production Release.
    -Matt Hawkins, JDeveloper Team

  • JDev specifying SQLJ translator command line options

    Hi,
    I have come across the problem of SQLJ connections caching up to 5 sql commands and so leaving any related cursors open. This is happening mainly for statments where I have executed a SELECT ... INTO ... Any sqlj with iterators, I have closed the iterators so they do get removed and their cursors closed.
    I have found that caching can be switched off via the SQLJ translator command line option -P-Cstmtcache=0.
    How can I specify this command line option within my JDeveloper project settings? I don't want to have to build my project from the command line explicitly as this will complicate the Release Software Build procedure.
    Can anyone help me, please?
    Thanks a lot.

    Can anyone offer any words of wisdom on this? We are currently using JDeveloper 3.1 (Build 681)

  • Licensing issues - embedding SQLJ translator

    I would like to find out what it would cost to license the SQLJ translator for embedding it my company's product. Can you tell me who I might need to contact to find this out?
    - Uhyon

    There's actually two issues here that need attention. If you're just outputting to default DPS folios then the pages become for all intents and purposes images so there's no real font-related issues. The more difficult area is if you're embedding your own html files that use Adobe fonts. I'd imagine things get more coplicated here.

  • SQLJ translator connection failing

    hi, i am trying to verify the sqlj translator connection to the db using the TestInstallSQLJ.sqlj code. i am using jdk1.3/8.1.5+sqlj8.1.6SDK on win98 -> jdk1.2.1/8.1.5 on nt4, and modified the sqlj.properties file appropriately. when i execute sqlj on the Test file, it says it can't load the OracleDriver:
    TestInstallSQLJ.sqlj:40.4-40.29: Warning: Cannot load JDBC driver class oracle.jdbc.driver.OracleDriver.
    TestInstallSQLJ.sqlj:40.4-40.29: Warning: Unable to perform semantic analysis on connection jdbc:oracle:thin:@<snip> by user <snip>. Error returned by database is: No suitable driver
    Total 2 warnings.
    Any help is appreciated.
    null

    You need to have the JDBC classes111.zip (for 1.1.x) or classes12.zip in your CLASSPATH environment variable. Say the following on the command line:
    javap oracle.jdbc.driver.OracleDriver
    - this should print out the methods on the OracleDriver class. Now say:
    sqlj -version-long
    This should print out all sorts of version information on SQLJ, JDBC and the JDK you are using. If yes, then you are in business. If it prints out the JDBC driver version as 0.0, then the Oracle JDBC driver is not yet in the CLASSPATH.

  • SQLJ Translator problem

    I get the following error message when trying to compile a SQLJ
    applet under Windows 95.
    I've previously managed to compile and run simple SQLJ programs
    successfully.
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    unexpected error occurred...
    java.lang.NoClassDefFoundError:
    LDatabase;Lsqlj/runtime/profile/RTResultSet;)V
    at java.lang.Class.getDeclaredConstructors(Compiled Code)
    at
    sqlj.framework.JSClass$ClassWrapper.getDeclaredConstructors
    (Compiled Code)
    at
    sqlj.framework.JSClass.getMaximallySpecificConstructors(Compiled
    Code)
    at sqlj.framework.JSClass.resolveConstructor
    (JSClass.java:1136)
    at sqlj.codegen.IteratorMetaData.getBaseIterator
    (IteratorMetaData.java:75)
    at sqlj.codegen.IteratorMetaData.<init>
    (IteratorMetaData.java:63)
    at sqlj.codegen.ExecCodegen.addResultTypes(Compiled Code)
    at sqlj.codegen.ExecCodegen.getExecStmt
    (ExecCodegen.java:336)
    at sqlj.codegen.ExecCodegen.createExecStmt
    (ExecCodegen.java:128)
    at sqlj.codegen.ExecCodegen.createGenerator
    (ExecCodegen.java:63)
    at sqlj.codegen.ExecCodegen.generate
    (ExecCodegen.java:560)
    at sqlj.codegen.BaseCodegen.generate(BaseCodegen.java:28)
    at sqlj.codegen.ParseletFactory$ParseletImpl.generate
    (ParseletFactory.java:115)
    at sqlj.syntax.SqljParselet.generate
    (SqljParselet.java:128)
    at
    sqlj.javac.JavaParserSubTokenManager$PositionedParselet.generate
    (JavaParserSubTokenManager.java:171)
    at
    sqlj.javac.JavaParserSubTokenManager$TokenManagerParselet.generat
    e(Compiled Code)
    at sqlj.javac.ASTCompilationUnit.generate(Compiled Code)
    at sqlj.translator.Translator.translate(Compiled Code)
    at sqlj.translator.Translator.translate
    (Translator.java:170)
    at sqlj.translator.Main.translate(Compiled Code)
    at sqlj.translator.Main.runTranslation(Main.java:92)
    at sqlj.translator.Main.runTranslation(Main.java:85)
    at sqlj.tools.Sqlj.statusMain(Compiled Code)
    at sqlj.tools.Sqlj.main(Sqlj.java:117)
    Database.sqlj: Error: Exception caught:
    Total 1 error.
    >>>>>>>>>>>>>>>>>>>>>>>>>>>
    The applet code is listed below
    >>>>>>>>>>>>>>>>>>>>>>>>>>>
    import java.applet.Applet;
    import java.awt.Graphics;
    import java.sql.*;
    import sqlj.runtime.*;
    import sqlj.runtime.ref.*;
    import sqlj.runtime.profile.*;
    import oracle.sqlj.runtime.*;
    #sql context MyContext;
    #sql iterator SalesIter( String ITEM_NAME, float COST );
    public class Database extends Applet {
    String buffer = new String ();
    public void init()
    { MyContext mctx = new MyContext
    ("jdbc:oracle:thin@ntastlab:1521:lab8","training","training",fals
    e);
    System.out.println ("Connected to the database");
    public void start()
    SalesIter siter = null;
    #sql siter = {SELECT ITEM_NAME, COST FROM SALES };
    while (siter.next())
    buffer = buffer + siter.ITEM_NAME() + siter.COST ();
    repaint ();
    siter.close ();
    public void stop()
    public void destroy()
    public void paint(Graphics g) {
    g.drawString(buffer, 50, 25);
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    Any ideas ??
    null

    The problem occurs when SQLJ tries to determine the type
    of the iterator SalesIter which is in your source.
    But I do not know, what that problem actually is.
    What version of javac? of sqlj? (JDK 1.2 does not work
    before SQLJ 8.1.6 SDK-Beta).
    What is in your PATH/CLASSPATH?
    What happens when you put SalesIter in SalesIter.sqlj:
    #sql public iterator SalesIter (...);
    and add this to your SQLJ command line?
    Dominic Lawson (guest) wrote:
    : I get the following error message when trying to compile a SQLJ
    : applet under Windows 95.
    : I've previously managed to compile and run simple SQLJ programs
    : successfully.
    : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    : unexpected error occurred...
    : java.lang.NoClassDefFoundError:
    : LDatabase;Lsqlj/runtime/profile/RTResultSet;)V
    : at java.lang.Class.getDeclaredConstructors(Compiled Code)
    : at
    : sqlj.framework.JSClass$ClassWrapper.getDeclaredConstructors
    : (Compiled Code)
    : at
    sqlj.framework.JSClass.getMaximallySpecificConstructors(Compiled
    : Code)
    : at sqlj.framework.JSClass.resolveConstructor
    : (JSClass.java:1136)
    : at sqlj.codegen.IteratorMetaData.getBaseIterator
    : (IteratorMetaData.java:75)
    : at sqlj.codegen.IteratorMetaData.<init>
    : (IteratorMetaData.java:63)
    : at sqlj.codegen.ExecCodegen.addResultTypes(Compiled Code)
    : at sqlj.codegen.ExecCodegen.getExecStmt
    : (ExecCodegen.java:336)
    : at sqlj.codegen.ExecCodegen.createExecStmt
    : (ExecCodegen.java:128)
    : at sqlj.codegen.ExecCodegen.createGenerator
    : (ExecCodegen.java:63)
    : at sqlj.codegen.ExecCodegen.generate
    : (ExecCodegen.java:560)
    : at sqlj.codegen.BaseCodegen.generate(BaseCodegen.java:28)
    : at sqlj.codegen.ParseletFactory$ParseletImpl.generate
    : (ParseletFactory.java:115)
    : at sqlj.syntax.SqljParselet.generate
    : (SqljParselet.java:128)
    : at
    sqlj.javac.JavaParserSubTokenManager$PositionedParselet.generate
    : (JavaParserSubTokenManager.java:171)
    : at
    sqlj.javac.JavaParserSubTokenManager$TokenManagerParselet.generat
    : e(Compiled Code)
    : at sqlj.javac.ASTCompilationUnit.generate(Compiled Code)
    : at sqlj.translator.Translator.translate(Compiled Code)
    : at sqlj.translator.Translator.translate
    : (Translator.java:170)
    : at sqlj.translator.Main.translate(Compiled Code)
    : at sqlj.translator.Main.runTranslation(Main.java:92)
    : at sqlj.translator.Main.runTranslation(Main.java:85)
    : at sqlj.tools.Sqlj.statusMain(Compiled Code)
    : at sqlj.tools.Sqlj.main(Sqlj.java:117)
    : Database.sqlj: Error: Exception caught:
    : Total 1 error.
    : >>>>>>>>>>>>>>>>>>>>>>>>>>>
    : The applet code is listed below
    : >>>>>>>>>>>>>>>>>>>>>>>>>>>
    : import java.applet.Applet;
    : import java.awt.Graphics;
    : import java.sql.*;
    : import sqlj.runtime.*;
    : import sqlj.runtime.ref.*;
    : import sqlj.runtime.profile.*;
    : import oracle.sqlj.runtime.*;
    : #sql context MyContext;
    : #sql iterator SalesIter( String ITEM_NAME, float COST );
    : public class Database extends Applet {
    : String buffer = new String ();
    : public void init()
    : { MyContext mctx = new MyContext
    ("jdbc:oracle:thin@ntastlab:1521:lab8","training","training",fals
    : e);
    : System.out.println ("Connected to the database");
    : public void start()
    : SalesIter siter = null;
    : #sql siter = {SELECT ITEM_NAME, COST FROM SALES };
    : while (siter.next())
    : buffer = buffer + siter.ITEM_NAME() + siter.COST ();
    : repaint ();
    : siter.close ();
    : public void stop()
    : public void destroy()
    : public void paint(Graphics g) {
    : g.drawString(buffer, 50, 25);
    : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    : Any ideas ??
    null

  • SQLJ Translator NullPointerException

    Hi there folks,
    I'm using the SQLJ and the Java Dictionary for the persistence layer in an application running on the Web AS 6.40 (SP11). I'm also using NetWeaver Dev. Studio SP11.
    I have one particular .sqlj file, which returns the following non specific error when I'm saving it:
    "Save could not be completed.
    Reason: Errors during build"
    A click on the "Details" button reveals the following a little less non specific error:
    "java.lang.NullPointerException encountered while running com.sap.dictionary.tools.sqlj.translator.Translator."
    Anyone's got an idea on what is wrong, or where to find out what is wrong?
    Thanks in advance,
    Henrik, Invendium A/S

    Never mind folks, a code rewrite made the Translator accept the source (funny, because it used to accept it..).
    /Henrik

  • SQLJ Translator

    Hi all,
    I'm getting the following error while
    trying to translate using sqlj from
    the prompt.
    Error:Error in Sqlj Stub: path or file
    name "java" not found.
    what could be the problem ?Is it bcoz of installation problem ??Plz help me .

    From what you can get from
    http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
    , you have serveral options:
    1. Use SQLJ 9i releases.
    2. Use JPub 10g releases, where sqlj command line can be accessed through jpub command, such as
    % jpub -sqlj a.sqlj a.java
    Note you need to setup classpath to include translator.jar and runtime12.jar.
    3. Use jpub 10g and sqlj/bin/sqlj.exe from SQLJ 9i

  • Unable to start SQLJ Translator

    I tried to test the SQLJ and JDBC setup. I modified the connect.properties file and made the appropriate changes so that it refers to my database. When trying to compile TestInstallCreateTable.java, I get errors saying that some classes are not imported. But I am able to create SALES table thru the SQL+. But when I enter sqlj TestInstallSQLJ.sqlj from the command prompt, I get an Unable to initialize threads:cannot find class java/lang/Thread error. I have the path(Oracle_Home\bin) and classpath(Oracle_Home\jdbc\lib\classes111.zip and Oracle_Home\sqlj\lib\translator.zip) set up. The JDK version is 1.1.8. Am I missing something? Please advice.
    Thanks in advance.

    Thank you for your timely help. After setting up %JAVA_HOME%\lib\classes.zip in classpath, I am able to compile the .sqlj file. But I am not able to run. I get a java.lang.NoClassDefFoundError:oracle.sqlj.runtime.Oracle. I am able to see this class in the database, under Java classes. Kindly advice. Thanks in advance.

  • Problem translating click/highlight boxes when copy and pasting slides from another project

    I'm baffled by this problem as it doesn't seem to make sense. I opened up a new project to record a simulation in and when I was done, I copy and pasted all the slides into the appropriate section in my "Master Project" if you will. After the paste, I noticed that all the clickboxes and highlight boxes I had taken the time to carefully resize were all out of wack in terms of position. Here's the kicker, I opened up a blank project and copy/pasted the same slides...this time the click and highlight boxes were in the correct position. Any ideas?
    Thanks in advance,
    Neel

    Oh, 'in terms of position'... I see...
    Is the one project larger than the other? For example, the original perhaps at 800x600 and the new at 850x650?
    Positioning may then be off relatively....
    Pick a couple sample elements and note their x/y positions from the Properties panel in the first project (under 'Transform' in CP 5.5).
    After pasting into the new, note those same x/y positions.
    Is there a noticable factor?
    If this is the issue, be sure the sizes are the same, do the paste, then expand the project later (and maybe everything will retain its anchors?)
    I've not seen this occur in newer versions of CP.
    You could try checking the 'Constrain Proportions' option in the properties of the original, just in case that helps 'constrain the position' too...total guess...

  • Help to compile SQLJ in Oracle816 r2 with SDK2 v1.3

    Currently I have SDK2 v.1.3 from SUN installed in my Linux box. When I tried to compile an SQLJ file using the "sqlj" command, it seems that it has internal compile error.
    I read the README.txt in the SQLJ directory, and found this:
    "The SQLJ translator now works with JDK 1.2 [Bug 814692]. Ensure that you are using the proper Oracle JDBC driver file (classes12.zip)."
    Now, the default JDBC driver comes with Oracle 8.1.6 r2 is 'classes111.zip'. Is there a patch or something that can upgrade the JDBC driver so I don't have to download 560Mb of Oracle 8.1.7 just to learn how to use sqlj?
    Thanks.

    I would have expected both JDK 1.1 and JDK 1.2 JDBC driver versions to be distributed with your database. (The 1.2 version, while not certified with JDK 1.3 should work reasonably well.)
    The 8.1.7 JDBC driver is downloadable from OTN - the thin drivers (both JDK 1.1 and JDK 1.2) work with all appropriate Java platforms.
    One more thing: SQLJ 8.1.7 does not work properly under JDK 1.3. As a workaround, you can specify the -passes option (though error messages will not be given on the .sqlj file). A better workaround is to create a script (say "myjavac") that calls javac but captures stdout and stderr and sends both to stdout. Then specify -compiler-executable=myjavac in your sqlj.properties file and you should be in business.

  • Why is it so hard to deploy EJBs that contain SQLJ???

    The SQLJ translator creates _SJProfilex.ser files by default that
    contain the SQL statements the SQLJ file uses. When trying to
    use a SQLJ file for an EJB, I can't get it to deploy right--in
    fact I'm thrawted at every turn! (THIS SHOULD BE EASY!)
    1) .ser files aren't deployed by default. O.K., I added the .ser
    rule in the deployment file. No dice, still doesn't show up in
    the JAR file!
    2) Even if I force the .ser file to be in the JAR (by including
    it in the project), still no dice! After deployment, the .ser
    file doesn't make it to the server.
    3) O.K., there's a nice -ser2class option to SQLJ that turns it
    into a class file instead of a .ser file. But where to add that
    option? It's not in the SQLJ options of the project properties.
    I also tried an SQLJ_OPTIONS environment variable, and putting an
    sqlj.properties file in all the suggested places. Nothing works!
    The only way I've been able to get it to work is to manually JAR
    the .ser file, ftp it to the server, and run loadjava on it.
    THERE HAS GOT TO BE AN EASIER WAY! ...so much for one-click
    deployment.
    Please help!
    null

    Hi John,
    There is an issue with deploying SQLJ files in 8.1.5.
    The doc (help sytem ) gives more details on how to deploy them.
    Open Online Help system
    Double click on the Sample Applications book icon
    Double click on the "web Application for Oracle8i" book
    Open "Deploying the EJB's"
    On the right hand window you will find a topic
    "Deploying the SQLJ files used by the Rentals EJB"
    this should take you through the deployment of SQLJ files.
    regards
    raghu
    John K. Peterson (guest) wrote:
    : The SQLJ translator creates _SJProfilex.ser files by default
    that
    : contain the SQL statements the SQLJ file uses. When trying to
    : use a SQLJ file for an EJB, I can't get it to deploy right--in
    : fact I'm thrawted at every turn! (THIS SHOULD BE EASY!)
    : 1) .ser files aren't deployed by default. O.K., I added the
    .ser
    : rule in the deployment file. No dice, still doesn't show up in
    : the JAR file!
    : 2) Even if I force the .ser file to be in the JAR (by including
    : it in the project), still no dice! After deployment, the .ser
    : file doesn't make it to the server.
    : 3) O.K., there's a nice -ser2class option to SQLJ that turns it
    : into a class file instead of a .ser file. But where to add
    that
    : option? It's not in the SQLJ options of the project
    properties.
    : I also tried an SQLJ_OPTIONS environment variable, and putting
    an
    : sqlj.properties file in all the suggested places. Nothing
    works!
    : The only way I've been able to get it to work is to manually
    JAR
    : the .ser file, ftp it to the server, and run loadjava on it.
    : THERE HAS GOT TO BE AN EASIER WAY! ...so much for one-click
    : deployment.
    : Please help!
    null

Maybe you are looking for

  • Send button not working in imessages

    I'm trying to send a test message to myself in imessages.  I type the message but the 'send' button never gets enabled

  • Same Company STO

    Dear SAP Guru's, A little confusion over the STO from one plant to other plant (OF THE SAME COMPANY CODE) We create PO. Then Replinishment Delivery NLCC Then GRN of the STO. After which is there any necessity for billing of the Delivery(NLCC) for STO

  • Just installed Photoshop CC - Crashing on Startup

    Faulting application name: Photoshop.exe, version: 15.2.2.310, time stamp: 0x5480338c Faulting module name: msvcrt.dll, version: 7.0.7601.17744, time stamp: 0x4eeb033f Exception code: 0xc00000fd Fault offset: 0x00000000000015af Faulting process id: 0

  • Phantom Reboot with Java MIDI

    I have a Java Program that "Processes" MIDI data being input from an external music keyboard (connected to computer with MusicMan USB Midi cable) When I start up the program the 1st time -> Everything runs fine. BUT when I close the program and re-op

  • Setting CPU Frequency

    I have an Intel Core 2 Duo E6400 CPU (2.13Ghz, 1066mhz FSB) in a MSI P965 Neo motherboard but in the BIOS the CPU frequency is only showing 533mhz. Is this normal and actually is running higher or do I need to change a setting to boost it to the supp