This discussion is archived
13 Replies Latest reply: Mar 23, 2010 12:30 AM by 761906 RSS

Installing JDBC driver to connect to Oracle 8i Database from Weblogic 10.3

695776 Newbie
Currently Being Moderated
I want to connect to Oracle 8i database from weblogic 10.3 application server. I found a classes12. zip file on Oracle.com to use as driver for the same.

I am also connecting Oracle 9i database from the app server. Now if i replace the classes12. jar from the lib folder won't it disallow me to connect to the Oracle 9i database.

2ndly the claases12.zip file i found from the site is for jdk 1.2 will it create any problems. Please let me know


Kindly let me know what is the standard procedure to install a new driver in Weblogic 10.3.
  • 1. Re: Installing JDBC driver to connect to Oracle 8i Database from Weblogic 10.3
    dvohra21 Oracle ACE
    Currently Being Moderated
    Oracle Database 10g Release 2 (10.2.0.4) JDBC Drivers may be used with Oracle database 8i and 9i. Download classes12.jar from
    http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc_10201.html
    JDK 1.2 or JDK 1.3 may be used. Preferable use JDK 1.3.

    To configure Oracle JDBC driver with WebLogic server add the classes12.jar to the classpath of the server. Add classese12.jar in the setWLSEnv batch script.
    set CLASSPATH=classes12.jar;%WEBLOGIC_CLASSPATH%;%CLASSPATH%
  • 2. Re: Installing JDBC driver to connect to Oracle 8i Database from Weblogic 10.3
    695776 Newbie
    Currently Being Moderated
    What is the use of jdk 1.3 here.

    Where to place this classes12.jar.


    Where can i find setWLSEnv batch script.
  • 3. Re: Installing JDBC driver to connect to Oracle 8i Database from Weblogic 10.3
    dvohra21 Oracle ACE
    Currently Being Moderated
    JDK is required for JDBC.
    The classes12.jar may be placed in \wlserver_10.3\server\lib or any other directory would be fine.
    The setWLSEnv script is in the \wlserver_10.3\server\bin directory.
  • 4. Re: Installing JDBC driver to connect to Oracle 8i Database from Weblogic 10.3
    695776 Newbie
    Currently Being Moderated
    But the weblogic 10.3 is running on jdk 1.6 . if we want to use another jdk e.g. jdk 1.3 then where to place it and should we add it to the class path and if we add it also wudn't it conflict with the current jdk that is 1.6

    thanks for replying my previous query.
  • 5. Re: Installing JDBC driver to connect to Oracle 8i Database from Weblogic 10.3
    dvohra21 Oracle ACE
    Currently Being Moderated
    If JDK 6 is used only the Oracle Database 11g JDBC drivers may be used.

    ojdbc6.jar (1,988,051 bytes) - Classes for use with JDK 1.6. It contains the JDBC driver classes except classes for NLS support in Oracle Object and Collection types.

    http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc_111060.html
  • 6. Re: Installing JDBC driver to connect to Oracle 8i Database from Weblogic 10.3
    695776 Newbie
    Currently Being Moderated
    Does that mean i can not connect to Oracle 8i or 7i from Weblogic 10.3
  • 7. Re: Installing JDBC driver to connect to Oracle 8i Database from Weblogic 10.3
    dvohra21 Oracle ACE
    Currently Being Moderated
    JDK 5 may be used with WebLogic server 10.3. The Oracle JDBC 10.2.0 drivers, ojdbc14.jar, may be used with Oracle database 8.1.7 and WebLogic server 10.1.3/JDK 5.

    http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc_10201.html
  • 8. Re: Installing JDBC driver to connect to Oracle 8i Database from Weblogic 10.3
    695776 Newbie
    Currently Being Moderated
    The jdk 1.5 is not compatible with weblogic 10.3. when i try to install weblogic 10.3 with jdk 1.5. It gives me error like it needs 1.6 version of jdk. Can i use jdk 1.6 and along with that can i use the suggested ojdbc14.jar file to connect to the Oracle 8i database

    Edited by: user10376677 on Apr 19, 2009 4:48 AM
  • 9. Re: Installing JDBC driver to connect to Oracle 8i Database from Weblogic 10.3
    dvohra21 Oracle ACE
    Currently Being Moderated
    WebLogic server 10.3 supports JDK 5.0 and JDK 6.0.
    What is the error generated?

    "The 10g Release 3 (10.3) version of the EJBGen utility recognizes only JDK 5.0 metadata annotation-style EJBGen tags and not the old Javadoc-style tags."
    http://edocs.bea.com/wls/docs103/compatibility/compatibility.html
  • 10. Re: Installing JDBC driver to connect to Oracle 8i Database from Weblogic 10.3
    dvohra21 Oracle ACE
    Currently Being Moderated
    "JDK 1.6 Support:
    A performance boost of about 10% can be expected compared to *JDK 1.5 (which is still supported with this release* but not recommended as primary choice)"

    http://ctpjava.blogspot.com/2008/08/oracle-weblogic-server-10g-r3-summary.html
  • 11. Re: Installing JDBC driver to connect to Oracle 8i Database from Weblogic 10.3
    695776 Newbie
    Currently Being Moderated
    I tried to install weblogic 10.3 using jdk 1.5.07 but. it is not supported. Moreover from the sites also i found that it's only the application wars and ears compiled in jdk 1.5 need not be recompiled in 1.6. But no reference of jdk 1.5 is there.


    I tried to use thin client from the code and connect to Oracle 7i

    i got the following exception.

    java.lang.ArrayIndexOutOfBoundsException: 4
    at oracle.jdbc.driver.T4C8TTIdty.marshal(T4C8TTIdty.java:465)
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:329)
    at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:
    490)
    at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:202)
    at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtensio
    n.java:33)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:474)
    at java.sql.DriverManager.getConnection(DriverManager.java:582)
    at java.sql.DriverManager.getConnection(DriverManager.java:185)
    at com.omantel.finacc.DAO.DatabaseConnection.getUBCCConnection(DatabaseC
    onnection.java:372)
    at com.omantel.finacc.java.DMADAO.getUBCLAmount(DMADAO.java:411)
    at jsp_servlet.__receiptentry._jspService(__receiptentry.java:1198)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run
    (StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri
    tyHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
    a:292)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
    a:175)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    n.run(WebAppServletContext.java:3498)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppS
    ervletContext.java:2180)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletC
    ontext.java:2086)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.j
    ava:1406)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    <Apr 22, 2009 3:36:47 PM GMT+04:00> <Error> <HTTP> <BEA-101017> <[weblogic.servl
    et.internal.WebAppServletContext@553afb - appName: 'DMA', name: '/DMA', context-
    path: '/DMA', spec-version: 'null'] Root cause of ServletException.
    com.omantel.finacc.exception.AppException: 4
    at com.omantel.finacc.exception.ExceptionHandler.handleException(Excepti
    onHandler.java:43)
    at com.omantel.finacc.java.DMADAO.getUBCLAmount(DMADAO.java:428)
    at jsp_servlet.__receiptentry._jspService(__receiptentry.java:1198)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run
    (StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri
    tyHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
    a:292)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
    a:175)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    n.run(WebAppServletContext.java:3498)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppS
    ervletContext.java:2180)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletC
    ontext.java:2086)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.j
    ava:1406)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    java.lang.ArrayIndexOutOfBoundsException: 4
    at oracle.jdbc.driver.T4C8TTIdty.marshal(T4C8TTIdty.java:465)
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:329)
    at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:
    490)
    at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:202)
    at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtensio
    n.java:33)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:474)
    at java.sql.DriverManager.getConnection(DriverManager.java:582)
    at java.sql.DriverManager.getConnection(DriverManager.java:185)
    at com.omantel.finacc.DAO.DatabaseConnection.getUBCCConnection(DatabaseC
    onnection.java:372)
    at com.omantel.finacc.java.DMADAO.getUBCLAmount(DMADAO.java:411)
    at jsp_servlet.__receiptentry._jspService(__receiptentry.java:1198)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run
    (StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri
    tyHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
    a:292)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
    a:175)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    n.run(WebAppServletContext.java:3498)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppS
    ervletContext.java:2180)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletC
    ontext.java:2086)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.j
    ava:1406)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    >
  • 12. Re: Installing JDBC driver to connect to Oracle 8i Database from Weblogic 10.3
    695776 Newbie
    Currently Being Moderated
    Any answers to the above question
  • 13. Re: Installing JDBC driver to connect to Oracle 8i Database from Weblogic 10.3
    761906 Newbie
    Currently Being Moderated
    I was able to connect to oracle 8.1.7 by adding ojdbc14.jar to the weblogic classpath.

    If the weblogic classpath cannot be changed then simple add the above jar to web-inf/lib of your war and also change you weblogic.xml to add :

    <container-descriptor>
    <prefer-web-inf-classes>true</prefer-web-inf-classes>
    </container-descriptor>

    This will ensure that the ojdbc14.jar is used to return an instance of Oracle driver from the class loader.

    For detailed information please visit:

    http://dumpingbrain.blogspot.com/2010/03/connecting-to-oracle-817-from.html

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points