6 Replies Latest reply on Jun 14, 1999 9:36 PM by 3004

    loadjava error

    3004
      --
      Bear with me: I am a DBA evaluating O8i and have zero JAVA
      experience! I downloaded the Hotel Reservation Sample and am
      trying to use loadjava on the hotel.java file. I get the
      following message:

      internal error: unanticipated exception:
      java.lang.NoClassDefFoundError: oracle/aurora/sqljdecl/SqljDecl
      java.lang.NoClassDefFoundError: oracle/aurora/sqljdecl/SqljDecl
      at
      oracle.aurora.server.tools.SourceFileReader.getScanner(SourceFile
      Reader.java:52)
      at
      oracle.aurora.server.tools.SourceFileReader.getFirstName(SourceFi
      leReader.java:61)
      at
      oracle.aurora.server.tools.LoadJava.processLoadAndCreate(LoadJava
      .java:1094)
      at
      oracle.aurora.server.tools.LoadJava.process(LoadJava.java:1021)
      at
      oracle.aurora.server.tools.LoadJavaMain.run(LoadJavaMain.java:193
      )
      at
      oracle.aurora.server.tools.LoadJavaMain.main(LoadJavaMain.java:49
      )
      resolver :
      loadjava: 1 errors

      I also tried using JDeveloper v1.1 and when I try to make
      hotel.java, and I get errors: "can not access directory
      oracle/sql" and "method defaultConnection() not found in class
      oracle.jdbc.driver.OracleDriver"

      Obviously, I am missing something very basic. Any hints would be
      appreciated.
      null
        • 1. loadjava error
          3004
          --
          Robert,

          It looks like your classpath is incorrect. Unfortunately, I am
          not familiar with the Hotel Reservation Sample but if post a
          pointer to the sample then I can try to load it into the db and
          hopefully give you some useful info.

          Regards,



          Robert Mills (guest) wrote:
          : Bear with me: I am a DBA evaluating O8i and have zero JAVA
          : experience! I downloaded the Hotel Reservation Sample and am
          : trying to use loadjava on the hotel.java file. I get the
          : following message:
          : internal error: unanticipated exception:
          : java.lang.NoClassDefFoundError: oracle/aurora/sqljdecl/SqljDecl
          : java.lang.NoClassDefFoundError: oracle/aurora/sqljdecl/SqljDecl
          : at
          :
          oracle.aurora.server.tools.SourceFileReader.getScanner(SourceFile
          : Reader.java:52)
          : at
          :
          oracle.aurora.server.tools.SourceFileReader.getFirstName(SourceFi
          : leReader.java:61)
          : at
          :
          oracle.aurora.server.tools.LoadJava.processLoadAndCreate(LoadJava
          : .java:1094)
          : at
          : oracle.aurora.server.tools.LoadJava.process(LoadJava.java:1021)
          : at
          :
          oracle.aurora.server.tools.LoadJavaMain.run(LoadJavaMain.java:193
          : )
          : at
          :
          oracle.aurora.server.tools.LoadJavaMain.main(LoadJavaMain.java:49
          : )
          : resolver :
          : loadjava: 1 errors
          : I also tried using JDeveloper v1.1 and when I try to make
          : hotel.java, and I get errors: "can not access directory
          : oracle/sql" and "method defaultConnection() not found in class
          : oracle.jdbc.driver.OracleDriver"
          : Obviously, I am missing something very basic. Any hints would
          be
          : appreciated.
          null
          • 2. loadjava error
            3004
            --
            The download for the hotel sample is at:
            http://technet.oracle.com/tech/java/javasp/info/otnsamples/JAPIns
            tall/JSPInstall.jar

            It is on your site under the link to "Technology Network:
            Software" and then the link: "New Java Stored Procedure Samples"

            JDeveloper Team (guest) wrote:
            : Robert,
            : It looks like your classpath is incorrect. Unfortunately, I am
            : not familiar with the Hotel Reservation Sample but if post a
            : pointer to the sample then I can try to load it into the db and
            : hopefully give you some useful info.
            : Regards,
            : Robert Mills (guest) wrote:
            : : Bear with me: I am a DBA evaluating O8i and have zero JAVA
            : : experience! I downloaded the Hotel Reservation Sample and am
            : : trying to use loadjava on the hotel.java file. I get the
            : : following message:
            : : internal error: unanticipated exception:
            : : java.lang.NoClassDefFoundError:
            oracle/aurora/sqljdecl/SqljDecl
            : : java.lang.NoClassDefFoundError:
            oracle/aurora/sqljdecl/SqljDecl
            : : at
            : :
            :
            oracle.aurora.server.tools.SourceFileReader.getScanner(SourceFile
            : : Reader.java:52)
            : : at
            : :
            :
            oracle.aurora.server.tools.SourceFileReader.getFirstName(SourceFi
            : : leReader.java:61)
            : : at
            : :
            :
            oracle.aurora.server.tools.LoadJava.processLoadAndCreate(LoadJava
            : : .java:1094)
            : : at
            : :
            oracle.aurora.server.tools.LoadJava.process(LoadJava.java:1021)
            : : at
            : :
            :
            oracle.aurora.server.tools.LoadJavaMain.run(LoadJavaMain.java:193
            : : )
            : : at
            : :
            :
            oracle.aurora.server.tools.LoadJavaMain.main(LoadJavaMain.java:49
            : : )
            : : resolver :
            : : loadjava: 1 errors
            : : I also tried using JDeveloper v1.1 and when I try to make
            : : hotel.java, and I get errors: "can not access directory
            : : oracle/sql" and "method defaultConnection() not found in
            class
            : : oracle.jdbc.driver.OracleDriver"
            : : Obviously, I am missing something very basic. Any hints
            would
            : be
            : : appreciated.
            null
            • 3. loadjava error
              3004
              --
              Have you discovered anything that might help me out yet? Thanks.

              Robert Mills (guest) wrote:
              : The download for the hotel sample is at:
              :
              http://technet.oracle.com/tech/java/javasp/info/otnsamples/JAPIns
              : tall/JSPInstall.jar
              : It is on your site under the link to "Technology Network:
              : Software" and then the link: "New Java Stored Procedure
              Samples"
              : JDeveloper Team (guest) wrote:
              : : Robert,
              : : It looks like your classpath is incorrect. Unfortunately, I
              am
              : : not familiar with the Hotel Reservation Sample but if post a
              : : pointer to the sample then I can try to load it into the db
              and
              : : hopefully give you some useful info.
              : : Regards,
              : : Robert Mills (guest) wrote:
              : : : Bear with me: I am a DBA evaluating O8i and have zero JAVA
              : : : experience! I downloaded the Hotel Reservation Sample and
              am
              : : : trying to use loadjava on the hotel.java file. I get the
              : : : following message:
              : : : internal error: unanticipated exception:
              : : : java.lang.NoClassDefFoundError:
              : oracle/aurora/sqljdecl/SqljDecl
              : : : java.lang.NoClassDefFoundError:
              : oracle/aurora/sqljdecl/SqljDecl
              : : : at
              : : :
              : :
              :
              oracle.aurora.server.tools.SourceFileReader.getScanner(SourceFile
              : : : Reader.java:52)
              : : : at
              : : :
              : :
              :
              oracle.aurora.server.tools.SourceFileReader.getFirstName(SourceFi
              : : : leReader.java:61)
              : : : at
              : : :
              : :
              :
              oracle.aurora.server.tools.LoadJava.processLoadAndCreate(LoadJava
              : : : .java:1094)
              : : : at
              : : :
              : oracle.aurora.server.tools.LoadJava.process(LoadJava.java:1021)
              : : : at
              : : :
              : :
              :
              oracle.aurora.server.tools.LoadJavaMain.run(LoadJavaMain.java:193
              : : : )
              : : : at
              : : :
              : :
              :
              oracle.aurora.server.tools.LoadJavaMain.main(LoadJavaMain.java:49
              : : : )
              : : : resolver :
              : : : loadjava: 1 errors
              : : : I also tried using JDeveloper v1.1 and when I try to make
              : : : hotel.java, and I get errors: "can not access directory
              : : : oracle/sql" and "method defaultConnection() not found in
              : class
              : : : oracle.jdbc.driver.OracleDriver"
              : : : Obviously, I am missing something very basic. Any hints
              : would
              : : be
              : : : appreciated.
              null
              • 4. loadjava error
                3004
                --
                Robert,
                We are looking into this and will get back to you soon.

                Regards,
                Robert Mills (guest) wrote:
                : Have you discovered anything that might help me out yet?
                Thanks.
                : Robert Mills (guest) wrote:
                : : The download for the hotel sample is at:
                : :
                :
                http://technet.oracle.com/tech/java/javasp/info/otnsamples/JAPIns
                : : tall/JSPInstall.jar
                : : It is on your site under the link to "Technology Network:
                : : Software" and then the link: "New Java Stored Procedure
                : Samples"
                : : JDeveloper Team (guest) wrote:
                : : : Robert,
                : : : It looks like your classpath is incorrect. Unfortunately,
                I
                : am
                : : : not familiar with the Hotel Reservation Sample but if post
                a
                : : : pointer to the sample then I can try to load it into the
                db
                : and
                : : : hopefully give you some useful info.
                : : : Regards,
                : : : Robert Mills (guest) wrote:
                : : : : Bear with me: I am a DBA evaluating O8i and have zero
                JAVA
                : : : : experience! I downloaded the Hotel Reservation Sample
                and
                : am
                : : : : trying to use loadjava on the hotel.java file. I get
                the
                : : : : following message:
                : : : : internal error: unanticipated exception:
                : : : : java.lang.NoClassDefFoundError:
                : : oracle/aurora/sqljdecl/SqljDecl
                : : : : java.lang.NoClassDefFoundError:
                : : oracle/aurora/sqljdecl/SqljDecl
                : : : : at
                : : : :
                : : :
                : :
                : oracle.aurora.server.tools.SourceFileReader.getScanner
                (SourceFile
                : : : : Reader.java:52)
                : : : : at
                : : : :
                : : :
                : :
                : oracle.aurora.server.tools.SourceFileReader.getFirstName
                (SourceFi
                : : : : leReader.java:61)
                : : : : at
                : : : :
                : : :
                : :
                : oracle.aurora.server.tools.LoadJava.processLoadAndCreate
                (LoadJava
                : : : : .java:1094)
                : : : : at
                : : : :
                : : oracle.aurora.server.tools.LoadJava.process
                (LoadJava.java:1021)
                : : : : at
                : : : :
                : : :
                : :
                : oracle.aurora.server.tools.LoadJavaMain.run
                (LoadJavaMain.java:193
                : : : : )
                : : : : at
                : : : :
                : : :
                : :
                : oracle.aurora.server.tools.LoadJavaMain.main
                (LoadJavaMain.java:49
                : : : : )
                : : : : resolver :
                : : : : loadjava: 1 errors
                : : : : I also tried using JDeveloper v1.1 and when I try to
                make
                : : : : hotel.java, and I get errors: "can not access directory
                : : : : oracle/sql" and "method defaultConnection() not found in
                : : class
                : : : : oracle.jdbc.driver.OracleDriver"
                : : : : Obviously, I am missing something very basic. Any hints
                : : would
                : : : be
                : : : : appreciated.
                null
                • 5. loadjava error
                  3004
                  --
                  Hi Robert,

                  : java.lang.NoClassDefFoundError: oracle/aurora/sqljdecl/SqljDecl
                  : java.lang.NoClassDefFoundError: oracle/aurora/sqljdecl/SqljDecl

                  it seems to me, that you have not included the translator.zip
                  file to your classpath. As I remember it has to be stored in the
                  directory <ORACLE_HOME>ora81/sqlj/lib. If you cannot find such a
                  directory, confirm whether SQLJ-Support is installed.

                  Matthias
                  null
                  • 6. loadjava error
                    3004
                    --
                    Robert,

                    Please find included the response from the developer who wrote
                    the sample. Unfortunately, he could not reproduce the error...
                    '
                    I tried to analyze the problem but wasnot able to reproduce the
                    same error.

                    I think the error is raised when the class 'hotel.java' is being
                    resolved in the database.

                    Loadjava utility is not able to find out the class
                    oracle.aurora.sqljdecl.SqljDecl() while
                    resolving the 'hotel.java' file.

                    Possible reasons could be :

                    1) Java Option in Oracle 8i is not installed properly.
                    2) User Travel is not given all the privileges. (Note Travel
                    user is the user based on which all
                    these samples are written.)
                    3) If Travel user is created in default tablespace SYSTEM then
                    there is no need to grant any
                    extra privileges to it.

                    '

                    Regards,



                    JDeveloper Team (guest) wrote:
                    : Robert,
                    : We are looking into this and will get back to you soon.
                    : Regards,
                    : Robert Mills (guest) wrote:
                    : : Have you discovered anything that might help me out yet?
                    : Thanks.
                    : : Robert Mills (guest) wrote:
                    : : : The download for the hotel sample is at:
                    : : :
                    : :
                    :
                    http://technet.oracle.com/tech/java/javasp/info/otnsamples/JAPIns
                    : : : tall/JSPInstall.jar
                    : : : It is on your site under the link to "Technology Network:
                    : : : Software" and then the link: "New Java Stored Procedure
                    : : Samples"
                    : : : JDeveloper Team (guest) wrote:
                    : : : : Robert,
                    : : : : It looks like your classpath is incorrect.
                    Unfortunately,
                    : I
                    : : am
                    : : : : not familiar with the Hotel Reservation Sample but if
                    post
                    : a
                    : : : : pointer to the sample then I can try to load it into the
                    : db
                    : : and
                    : : : : hopefully give you some useful info.
                    : : : : Regards,
                    : : : : Robert Mills (guest) wrote:
                    : : : : : Bear with me: I am a DBA evaluating O8i and have zero
                    : JAVA
                    : : : : : experience! I downloaded the Hotel Reservation Sample
                    : and
                    : : am
                    : : : : : trying to use loadjava on the hotel.java file. I get
                    : the
                    : : : : : following message:
                    : : : : : internal error: unanticipated exception:
                    : : : : : java.lang.NoClassDefFoundError:
                    : : : oracle/aurora/sqljdecl/SqljDecl
                    : : : : : java.lang.NoClassDefFoundError:
                    : : : oracle/aurora/sqljdecl/SqljDecl
                    : : : : : at
                    : : : : :
                    : : : :
                    : : :
                    : : oracle.aurora.server.tools.SourceFileReader.getScanner
                    : (SourceFile
                    : : : : : Reader.java:52)
                    : : : : : at
                    : : : : :
                    : : : :
                    : : :
                    : : oracle.aurora.server.tools.SourceFileReader.getFirstName
                    : (SourceFi
                    : : : : : leReader.java:61)
                    : : : : : at
                    : : : : :
                    : : : :
                    : : :
                    : : oracle.aurora.server.tools.LoadJava.processLoadAndCreate
                    : (LoadJava
                    : : : : : .java:1094)
                    : : : : : at
                    : : : : :
                    : : : oracle.aurora.server.tools.LoadJava.process
                    : (LoadJava.java:1021)
                    : : : : : at
                    : : : : :
                    : : : :
                    : : :
                    : : oracle.aurora.server.tools.LoadJavaMain.run
                    : (LoadJavaMain.java:193
                    : : : : : )
                    : : : : : at
                    : : : : :
                    : : : :
                    : : :
                    : : oracle.aurora.server.tools.LoadJavaMain.main
                    : (LoadJavaMain.java:49
                    : : : : : )
                    : : : : : resolver :
                    : : : : : loadjava: 1 errors
                    : : : : : I also tried using JDeveloper v1.1 and when I try to
                    : make
                    : : : : : hotel.java, and I get errors: "can not access
                    directory
                    : : : : : oracle/sql" and "method defaultConnection() not found
                    in
                    : : : class
                    : : : : : oracle.jdbc.driver.OracleDriver"
                    : : : : : Obviously, I am missing something very basic. Any
                    hints
                    : : : would
                    : : : : be
                    : : : : : appreciated.
                    null