10 Replies Latest reply: Jul 20, 2012 3:34 PM by rp0428 RSS

    Jpub Error

    894597
      Hello,

      I am passing the following command and i am getting the following error, please advise.

      C:\TestJPub>jpub -user=apps/XXX -url=jdbc:oracle:thin:@XXXX:1521:XXXX -sql=ZENBANKLOAD -methods=true
      java.sql.SQLException: J2T-132, Unable to register oracle.jdbc.OracleDriver as J
      DBC driver
      J2T-102, ERROR: Unable to connect to schema "apps"
      Thanks
        • 1. Re: Jpub Error
          rp0428
          Do you have the OJDBCxx jar file in your classpath?
          • 2. Re: Jpub Error
            894597
            Yes, i set the path as below.

            set PATH=C:\Program Files\Java\jdk1.7.0_05\bin;C:\jpub_102\sqlj\bin

            set CLASSPATH=.;C:\JDBC\Drivers\10.2.0.1;C:\DevSuiteHome_1\sqlj\lib\translator.jar;C:\DevSuiteHome_1\sqlj\lib\runtime12ee.jar
            • 3. Re: Jpub Error
              rp0428
              So the question was
              >
              Do you have the OJDBCxx jar file in your classpath?
              And your answer is
              >
              Yes, i set the path as below.
              >
              And then you post a CLASSPATH that doesn't have ANY OJDBC jar file at all.
              >
              set CLASSPATH=.;C:\JDBC\Drivers\10.2.0.1;C:\DevSuiteHome_1\sqlj\lib\translator.jar;C:\DevSuiteHome_1\sqlj\lib\runtime12ee.jar
              >
              How do you expect to connect to a database if you don't use the jar file that has the classes that connect to the database?

              This is a CLASSPATH that actually works
              set CLASSPATH=.;%ORACLE_HOME%\sqlj\lib\dbwsa.jar;%ORACLE_HOME%\jdbc\lib\ojdbc5.jar;%ORACLE_HOME%\jdbc\lib\orai18n.jar;%ORACLE_HOME%\sqlj\lib\translator.jar;%ORACLE_HOME%\sqlj\lib\runtime12.jar;%ORACLE_HOME%\oc4j\sqlj\lib\runtime12ee.jar
              >
              Do you see anything in it that is different than yours?
              • 4. Re: Jpub Error
                894597
                THanks it worked, Now i am getting the following error

                Exception in thread "main" java.lang.NoClassDefFoundError: oracle/jpub/Main

                Pleae advise.
                • 5. Re: Jpub Error
                  836548
                  891594 wrote:
                  THanks it worked, Now i am getting the following error

                  Exception in thread "main" java.lang.NoClassDefFoundError: oracle/jpub/Main

                  Pleae advise.
                  The error clearly says class not found. hence look for the jars you provided in the classpath.
                  • 6. Re: Jpub Error
                    rp0428
                    >
                    Pleae advise.
                    >
                    I advise you to post the classpath you are using.
                    • 7. Re: Jpub Error
                      894597
                      set CLASSPATH=.;%ORACLE_HOME%\sqlj\lib\dbwsa.jar;%ORACLE_HOME%\jdbc\lib\ojdbc5.jar;%ORACLE_HOME%\jdbc\lib\orai18n.jar;%ORACLE_HOME%\sqlj\lib\translator.jar;%ORACLE_HOME%\sqlj\lib\runtime12.jar;%ORACLE_HOME%\oc4j\sqlj\lib\runtime12ee.jar;%ORACLE_HOME%\jdbc\lib\ojdbc14.jar
                      • 8. Re: Jpub Error
                        rp0428
                        That looks like a copy of the classpath that I provided except that you put a second JDBC jar file for Java 1.4 at the end (which you should remove).

                        Are those jars actually in the correct folders? The translator jar is the one that contains the oracle.jpub.Main class.
                        • 9. Re: Jpub Error
                          894597
                          Yes, it does contain in the following Path --> C:\jpub_102\sqlj\lib

                          Please let me know how do i set it up.
                          • 10. Re: Jpub Error
                            rp0428
                            >
                            Yes, it does contain in the following Path --> C:\jpub_102\sqlj\lib
                            >
                            You mean NO IT ISN'T? There is no 'C:\jpub_102\sqlj\lib' mentioned in your CLASSPATH only
                            ;%ORACLE_HOME%\sqlj\lib\translator.jar
                            Are you saying that ORACLE_HOME is set to 'C:\jpub_102'?

                            The jars have to be in folders mentioned in the CLASSPATH; not the PATH. The PATH is for executables.