Failed to Load Oracle.jdbc.PreparedStatement

Hi all,
My application says
"Failed to Load either oracle.jdbc.PreparedStatement or oracle.jdbc.driver.PreparedStatement .
I have oracle driver in <server-instance>/lib directory.
Anybody has an idea about this ?
Thanks

Hi,
Here is the server.log meassage at fine Level
11/Mar/2003:09:06:17] FINE (20766): Status to be set : 0
[11/Mar/2003:09:06:17] FINE (20766): Invoked receivedReply()
[11/Mar/2003:09:06:17] FINE (20766): ---SQLPersistenceManagerFactory: dbname = Oracle.[11/Mar/2003:09:06:17] FINE (20766): <-> DBVendorType(), vendorName = [ Oracle] propertyName: oracle short name: ORACLE.
[11/Mar/2003:09:06:17] FINE (20766): --> DBVendorType.initialize().
[11/Mar/2003:09:06:17] FINE (20766): --> DBVendorType.load() - resourceName: com/sun/jdo/spi/persistence/support/sqlstore/database/SQL92.properties , override: false.
[11/Mar/2003:09:06:17] FINE (20766): --> DBVendorType.load() - resourceName: com/sun/jdo/spi/persistence/support/sqlstore/database/ORACLE.properties , override: false.
[11/Mar/2003:09:06:17] FINE (20766): --> DBVendorType.load() - resourceName: .tpersistence.properties , override: true.
[11/Mar/2003:09:06:17] FINE (20766): <-> DBVendorType.overrideProperties() - NONE.
[11/Mar/2003:09:06:17] INFO (20766): Failed to load either oracle.jdbc.OraclePreparedStatement or oracle.jdbc.driver.OraclePreparedStatement. Oracle specific optimization will be disabled.
[11/Mar/2003:09:06:17] FINE (20766): <-- DBVendorType.initialize().
[11/Mar/2003:09:06:17] FINE (20766): ---SQLStoreManager: vendor type = ORACLE.
[11/Mar/2003:09:06:18] FINE (20766): initializeServerLogger: javax.enterprise.resource.jdo.transaction com.sun.jdo.spi.persistence.support.sqlstore.Bundle null
[11/Mar/2003:09:06:18] FINE (20766): initializeServerLogger: javax.enterprise.resource.jdo.transaction com.sun.jdo.spi.persistence.support.sqlstore.Bundle FINE

Similar Messages

  • Win2000+weblogic510+oracle8i,Could not load 'oracle.jdbc.driver.OracleDriver'

    &#26143;&#26399;&#22235; &#19977;&#26376; 23 20:30:17 GMT+08:00 2000:<E> <JDBC Pool>
    Failed to create connection pool "ejavaPool"
    weblogic.common.ResourceException: Could not load 'oracle.jdbc.driver.OracleDriver'
    because
    System.loadLibrary threw java.lang.UnsatisfiedLinkError
    with the message 'oracle.jdbc.driver.OracleDriver'.
    This could occur if the JDBC driver is not in the weblogic.class.path.
    If this is a type-2 JDBC driver, it may also indicate that
    the Driver native layers(DBMS client lib or driver DLL)
    have not been installed properly on your system or in your environment.
    This is most likely caused by one of the following:
    1. The native layer SO, SL, or DLL could not be found.
    2. The file permissions on the native layer SO, SL, or DLL
    have not been set properly.
    3. The native layer SO, SL, or DLL exists, but is either
    invalid or corrupted.
    For more information, read the installation documentation
    for your JDBC Driver, available from:
    http://www.weblogic.com/docs/install/install_jdbc.html
         at weblogic.jdbc.common.internal.ConnectionEnvFactory.loadDriver(ConnectionEnvFactory.java:82)
         at weblogic.jdbc.common.internal.ConnectionEnvFactory.<init>(ConnectionEnvFactory.java:97)
         at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.java:328)
         at weblogic.jdbc.common.internal.JdbcInfo.initPools(JdbcInfo.java, Compiled Code)
         at weblogic.jdbc.common.internal.JdbcInfo.startup(JdbcInfo.java:220)
         at weblogic.jdbc.common.internal.JdbcStartup.main(JdbcStartup.java:11)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.t3.srvr.StartupThread.runMain(StartupThread.java:219)
         at weblogic.t3.srvr.StartupThread.doWork(StartupThread.java, Compiled Code)
         at weblogic.t3.srvr.PropertyExecuteThread.run(PropertyExecuteThread.java:62)
    any idea?

    If you are trying to use the thin driver you need to make sure you have the
    classes12.zip file in the weblogic server classpath. You can download this
    driver from Oracle website.
    hth
    sree
    "meijunyong" <[email protected]> wrote in message
    news:[email protected]...
    >
    &#26143;&#26399;&#22235; &#19977;&#26376; 23 20:30:17 GMT+08:00 2000:<E><JDBC Pool>
    Failed to create connection pool "ejavaPool"
    weblogic.common.ResourceException: Could not load'oracle.jdbc.driver.OracleDriver'
    because
    System.loadLibrary threw java.lang.UnsatisfiedLinkError
    with the message 'oracle.jdbc.driver.OracleDriver'.
    This could occur if the JDBC driver is not in the weblogic.class.path.
    If this is a type-2 JDBC driver, it may also indicate that
    the Driver native layers(DBMS client lib or driver DLL)
    have not been installed properly on your system or in your environment.
    This is most likely caused by one of the following:
    1. The native layer SO, SL, or DLL could not be found.
    2. The file permissions on the native layer SO, SL, or DLL
    have not been set properly.
    3. The native layer SO, SL, or DLL exists, but is either
    invalid or corrupted.
    For more information, read the installation documentation
    for your JDBC Driver, available from:
    http://www.weblogic.com/docs/install/install_jdbc.html
    atweblogic.jdbc.common.internal.ConnectionEnvFactory.loadDriver(ConnectionEnvF
    actory.java:82)
    atweblogic.jdbc.common.internal.ConnectionEnvFactory.<init>(ConnectionEnvFacto
    ry.java:97)
    atweblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.java:328
    at weblogic.jdbc.common.internal.JdbcInfo.initPools(JdbcInfo.java,Compiled Code)
    at weblogic.jdbc.common.internal.JdbcInfo.startup(JdbcInfo.java:220)
    at weblogic.jdbc.common.internal.JdbcStartup.main(JdbcStartup.java:11)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.t3.srvr.StartupThread.runMain(StartupThread.java:219)
    at weblogic.t3.srvr.StartupThread.doWork(StartupThread.java, CompiledCode)
    atweblogic.t3.srvr.PropertyExecuteThread.run(PropertyExecuteThread.java:62)
    any idea?

  • A sign Applet unable to load "oracle.jdbc.OracleDriver" class

    hi,
    i am chiranjit , i am now working in a web based ERP. where i am using a signed applet which unable to load "oracle.jdbc.OracleDriver" class but it easily loading "sun.jdbc.odbc.JdbcOdbcDriver", i am also giving my code:
    import java.sql.*;
    import java.math.*;
    import java.io.*;
    import java.awt.*;
    class JdbcTest extends Applet{
    public static void main (String args[]) throws SQLException {
    // Load Oracle driver
    DriverManager.registerDriver (new oracle.jdbc.OracleDriver());
    // Connect to the local database
    Connection conn =
    DriverManager.getConnection
    ("jdbc:oracle:thin:@192.168.16.7:1521:kris",
    "plsql", "oracle");
    // Query the employee names
    Statement stmt = conn.createStatement ();
    ResultSet rset = stmt.executeQuery ("SELECT FIRST_NAME FROM
    AUTHORS");
    // Print the name out
    while (rset.next ())
    System.out.println (rset.getString (1));
    // Close the result set, statement, and the connection
    rset.close();
    stmt.close();
    conn.close();
    }

    Hint: The sun.jdbc.odbc.JdbcOdbcDriver is available in any JRE distribution. The Oracle driver is not.

  • Help - Could not load 'oracle.jdbc.driver.OracleDriver ...

    I'm using oci8 to connect to the Oracle database.
    URL: jdbc:oracle:oci8:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(PORT=1527)(HOST=testhost)))(CONNECT_DATA=(SID=fnoe2pa)))
    When I tried to start the weblogic server, I got the following errors:
    Can you suggest what I should do next (step-wise)??? Thanks, Bobby
    <Sleeping in createResource()>
    ####<15/08/2002 14:09:43> <Error> <JDBC> <qawebmethods> <myserver>
    <main> <system> <> <001060> <Cannot startup connection pool
    "pool/test_myapp" weblogic.common.ResourceException:
    Could not load 'oracle.jdbc.driver.OracleDriver
    If this is a type-4 JDBC driver, it could occur if the JDBC
    driver is not in the system CLASSPATH.
    If this is a type-2 JDBC driver, it may also indicate that
    the Driver native layers(DBMS client lib or driver DLL)
    have not been installed properly on your system
    or in your PATH environment variable.
    This is most likely caused by one of the following:
    1. The native layer SO, SL, or DLL could not be found.
    2. The file permissions on the native layer SO, SL, or DLL
    have not been set properly.
    3. The native layer SO, SL, or DLL exists, but is either
    invalid or corrupted.
    For more information, read the installation documentation
    for your JDBC Driver, available from:
    http://e-docs.bea.com
         at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(ConnectionEnvFactory.java:212)
         at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(ConnectionEnvFactory.java:134)
         at weblogic.common.internal.ResourceAllocator.makeResources(ResourceAllocator.java:705)
         at weblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.java:282)
         at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.java:650)
         at weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:107)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:360)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:285)
         at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:239)
         at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:199)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:636)
         at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:360)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
         at $Proxy31.updateDeployments(Unknown Source)
         at weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(ServerMBean_CachingStub.java:2977)
         at weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(ApplicationManager.java:372)
         at weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManager.java:160)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:636)
         at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:360)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
         at $Proxy42.start(Unknown Source)
         at weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(ApplicationManagerMBean_CachingStub.java:480)
         at weblogic.management.Admin.startApplicationManager(Admin.java:1234)
         at weblogic.management.Admin.finish(Admin.java:644)
         at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:524)
         at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:207)
         at weblogic.Server.main(Server.java:35)
    >
    ####<15/08/2002 14:09:43> <Info> <JDBC> <qawebmethods> <myserver>
    <main> <system> <> <001082> <Creating Data Source named
    jdbc/test_myapp for pool pool/test_myapp>
    ####<15/08/2002 14:09:43> <Info> <JDBC> <qawebmethods> <myserver>
    <main> <system> <> <001070> <Checking existence of connection pool
    pool/test_myapp requested by user system>
    ####<15/08/2002 14:09:43> <Error> <JDBC> <qawebmethods> <myserver>
    <main> <system> <> <001059> <Error during Data Source creation:
    weblogic.common.ResourceException: DataSource(jdbc/test_myapp) can't
    be created with non-existent Pool (connection or multi)
    (pool/test_myapp)>
    ####<15/08/2002 14:09:50> <Info> <EJB> <qawebmethods> <myserver>
    <main> <system> <> <010008> <EJB Deploying file: myapp-ejb.jar>
    ####<15/08/2002 14:09:50> <Warning> <J2EE> <qawebmethods> <myserver>
    <main> <system> <> <160007> <You are running WebLogic Server with J2EE
    1.3 features enabled. The implementation of specific J2EE 1.3 features
    (EJB 2.0, JSP 1.2, Servlet 2.3, and J2EE Connector Architecture 1.0)
    in BEA WebLogic Server 6.1 is of a non-final version of the
    appropriate specification. It is subject to change in future releases
    once the specification becomes finalized. This may cause application
    code developed for BEA WebLogic Server 6.1 that uses the new features
    of J2EE 1.3 to be incompatible with the J2EE 1.3 platform supported in
    future releases of BEA WebLogic Server.>
    ####<15/08/2002 14:09:59> <Error> <J2EE> <qawebmethods> <myserver>
    <main> <system> <> <160001> <Error deploying application myapp-ejb:
    Unable to deploy EJB: Counter from myapp-ejb.jar:
    The DataSource with the JNDI name: jdbc/test_myapp could not be
    located. Please ensure that the DataSource has been deployed
    successfully and that the JNDI name in your EJB Deployment descriptor
    is correct.
    >
    ####<15/08/2002 14:09:59> <Info> <HTTP> <qawebmethods> <myserver>
    <main> <system> <> <101053> <[HTTP myserver] Loading web app: myapp>
    ####<15/08/2002 14:09:59> <Info> <HTTP> <qawebmethods> <myserver>
    <main> <system> <> <101059> <[myserver] Loading myapp from WAR file:
    C:\bea\wlserver6.1\.\config\mydomain\applications\.wlnotdelete\wlap31483\myapp.war>
    ####<15/08/2002 14:09:59> <Warning> <J2EE> <qawebmethods> <myserver>
    <main> <system> <> <160007> <You are running WebLogic Server with J2EE
    1.3 features enabled. The implementation of specific J2EE 1.3 features
    (EJB 2.0, JSP 1.2, Servlet 2.3, and J2EE Connector Architecture 1.0)
    in BEA WebLogic Server 6.1 is of a non-final version of the
    appropriate specification. It is subject to change in future releases
    once the specification becomes finalized. This may cause application
    code developed for BEA WebLogic Server 6.1 that uses the new features
    of J2EE 1.3 to be incompatible with the J2EE 1.3 platform supported in
    future releases of BEA WebLogic Server.>
    ####<15/08/2002 14:09:59> <Info> <HTTP> <qawebmethods> <myserver>
    <main> <system> <> <101031>
    <[WebAppServletContext(1412030,myapp,/myapp)] extracting classfiles to
    C:\bea\wlserver6.1\config\mydomain\applications\.wlnotdelete\wlap31483\WEB-INF\_tmp_war_myapp:>
    ####<15/08/2002 14:10:04> <Info> <HTTP> <qawebmethods> <myserver>
    <main> <system> <> <101032>
    <[WebAppServletContext(1412030,myapp,/myapp)] extracted classfiles
    successfully...>
    ####<15/08/2002 14:10:04> <Info> <HTTP Session> <qawebmethods>
    <myserver> <main> <system> <> <100037> <Creating SessionContext of
    type: memory for webapp: /myapp>
    ####<15/08/2002 14:10:04> <Info> <HTTP> <qawebmethods> <myserver>
    <main> <system> <> <101047>
    <[WebAppServletContext(1412030,myapp,/myapp)] registering classpath
    servlet with initArgs 'null'>
    ####<15/08/2002 14:10:04> <Info> <HTTP> <qawebmethods> <myserver>
    <main> <system> <> <101047>
    <[WebAppServletContext(1412030,myapp,/myapp)] registering getior
    servlet with initArgs 'null'>
    ####<15/08/2002 14:10:04> <Info> <HTTP> <qawebmethods> <myserver>
    <main> <system> <> <101047>
    <[WebAppServletContext(1412030,myapp,/myapp)] registering tunneling
    servlets with initArgs 'wl-dispatch-policy=direct'>
    ####<15/08/2002 14:10:04> <Info> <HTTP> <qawebmethods> <myserver>
    <main> <system> <> <101047>
    <[WebAppServletContext(1412030,myapp,/myapp)] registering JSPServlet
    with initArgs '[JspConfig:
    verbose=true,packagePrefix=jsp_servlet,-compiler=javac,compileFlags=,workingDir=C:\bea\wlserver6.1\config\mydomain\applications\.wlnotdelete\wlap31483\WEB-INF\_tmp_war_myapp,pageCheckSeconds=1,superclass=null,keepgenerated=false,precompileContinue=false,compilerSupportsEncoding=true,encoding=null,defaultfilename=index.jsp,compilerclass=null,noTryBlocks=false]'>
    ####<15/08/2002 14:10:04> <Debug> <HTTP> <qawebmethods> <myserver>
    <main> <system> <> <101097> <Registering ServletContext:
    "myapp:/myapp">
    ####<15/08/2002 14:10:04> <Info> <J2EE> <qawebmethods> <myserver>
    <main> <system> <> <160003> <Deployed : myapp>
    ####<15/08/2002 14:10:04> <Info> <HTTP> <qawebmethods> <myserver>
    <main> <system> <> <101133> <Initializing WEB server myserver>
    ####<15/08/2002 14:10:04> <Notice> <Management> <qawebmethods>
    <myserver> <main> <system> <> <141052> <Application Poller started for
    development server.>
    ####<15/08/2002 14:10:04> <Notice> <WebLogicServer> <qawebmethods>
    <myserver> <ListenThread> <system> <> <000202> <ListenThread listening
    on port 7001>
    ####<15/08/2002 14:10:04> <Info> <NT Performance Pack> <qawebmethods>
    <myserver> <ListenThread> <system> <> <000000> <NATIVE: NTSocketMuxer
    was built on Nov 1 2001 16:39:28
    >
    ####<15/08/2002 14:10:04> <Notice> <WebLogicServer> <qawebmethods>
    <myserver> <SSLListenThread> <system> <> <000202> <SSLListenThread
    listening on port 7002>
    ####<15/08/2002 14:10:05> <Notice> <Management> <qawebmethods>
    <myserver> <main> <system> <> <141030> <Starting discovery of Managed
    Server... This feature is on by default, you may turn this off by
    passing -Dweblogic.management.discover=false>
    ####<15/08/2002 14:10:05> <Notice> <WebLogicServer> <qawebmethods>
    <myserver> <main> <system> <> <000331> <Started WebLogic Admin Server
    "myserver" for domain "mydomain" running in Development Mode>
    ####<15/08/2002 14:10:11> <Info> <NT Performance Pack> <qawebmethods>
    <myserver> <ExecuteThread: '14' for queue: 'default'> <> <> <000000>
    <Allocating: '2' NT reader threads>
    ####<15/08/2002 14:10:13> <Info> <HTTP> <qawebmethods> <myserver>
    <ExecuteThread: '1' for queue: '__weblogic_admin_html_queue'> <system>
    <> <101047> <[WebAppServletContext(5367844,console,/console)] actions:
    init>
    ####<15/08/2002 14:10:18> <Info> <HTTP> <qawebmethods> <myserver>
    <ExecuteThread: '1' for queue: '__weblogic_admin_html_queue'> <system>
    <> <101047> <[WebAppServletContext(5367844,console,/console)]
    FileServlet: init>
    ####<15/08/2002 14:10:18> <Info> <HTTP> <qawebmethods> <myserver>
    <ExecuteThread: '1' for queue: '__weblogic_admin_html_queue'> <system>
    <> <101047> <[WebAppServletContext(5367844,console,/console)]
    FileServlet: Using standard I/O>

    "thorick" <[email protected]> wrote in message news:<[email protected]>...
    Most likely, the OCI libraries could not be loaded.
    Before continuing down this path, is there any reason
    why you want to use an OCI based Driver as opposed to the
    all Java Oracle thin driver ?There is indeed a valid reason for my choice.
    I am currently connecting to the Oracle "Rdb" 7.0 database (located on
    VMS) - not Oracle Oracle.
    The SQL Service software we're currently using is version 7.1. This
    version works well with the OCI8 driver (when connecting to the
    database from Windows NT). This version of SQL Service however does
    NOT work for the THIN driver (unless we upgrade the SQL Service to
    version 7.1.5.5 - which we're not prepared to do so because it is not
    stable enough from our previous test/trials). SQLSRV Version 7.1.5.5
    works for THIN driver but it will result in uncommitted
    transactions/unresolved connection/stopping of listener issues and
    there is a need to restart the service from time to time. Oracle has
    since confirmed that this is a bug that they have yet to resolve...
    So we have to stick to OCI8 (THICK) for the time being. I would really
    appreciate it very much if you can tell me the various OCI libraries
    that I need to load (in terms of WebLogic Server config file settings
    etc..).
    By the way I have already installed the Oracle 8 client software on
    the NT server (where WebLogic Server is) and I have also set up the
    relevant SID (using the Net8 Assistant) that points to the Oracle Rdb
    database on the VMS. I have also tried using SQL*Plus to connect to
    the database and I can connect properly to the database. But WebLogic
    simply doesn't seem to load the software.
    Help...
    Regards,
    Bobby Brown, writing from Australia.

  • How to resolve "Failed to load TTSQLDB JDBC driver" problem

    Hi,
    I installed timesten112140.sparc64.tar on solaris m/c.
    Details of solaris m/c are
    SunOS pun-ldom-rds70 5.10 Generic_139555-08 sun4v sparc SUNW,T5240
    I am getting below mentioned error when trying connecting to the database through java process.
    ERROR: failed to load TTSQLDB JDBC driver.
    java.sql.SQLException: Problems with loading native library/missing methods: /op
    t/TimesTen/ttsolaris21/lib/libttJdbc.so: ld.so.1: java: fatal: /opt/TimesTen/tts
    olaris21/lib/libttJdbc.so: wrong ELF class: ELFCLASS64 (Possible cause: architec
    ture word width mismatch)
    at com.timesten.jdbc.JdbcOdbcConnection.connect(JdbcOdbcConnection.java:
    1753)
    at com.timesten.jdbc.TimesTenDriver.connect(TimesTenDriver.java:349)
    at com.timesten.jdbc.TimesTenDriver.connect(TimesTenDriver.java:205)
    at java.sql.DriverManager.getConnection(DriverManager.java:582)
    at java.sql.DriverManager.getConnection(DriverManager.java:207)
    at CreateConnectionDemo.createConnection(CreateConnectionDemo.java:43)
    at CreateConnectionDemo.<clinit>(CreateConnectionDemo.java:26)
    Exception in thread "main" java.lang.NullPointerException
    at CreateConnectionDemo.closeConnection(CreateConnectionDemo.java:69)
    at CreateConnectionDemo.main(CreateConnectionDemo.java:62)

    You are trying to open a direct mode connection to 64-bit TimesTen from a JVM running in 32-bit mode. This is not possible. Run the JVM in 64-bit mode instead and thsi issue will be resolved.
    Chris

  • Steps to load Oracle JDBC Thin driver onto Tomcat

    I have Oracle JDBC working with thin driver on my local Tomcat container and now need to put it on a server but forgot how I set it up and want to make sure I do it correctly when I put it on the server.
    Please advise if this is correct?
    1- Load the thin driver (ojdbc14.jar ) in Tomcat 4.1.27 Container into the common/lib directory
    2- Set the classpath on the Windows server to allow me to use the ojdbc14.jar driver?
    If so then I need to do this using Windows DOS where I add the thin driver to my Classpath?
    Set CLASSPATH=%CLASSPATH%;C:\TomcatHome\common\lib\servlet-api.jar;C:\TomcatHome\common\lib\ojdbc14.jar
    Or do I NOT need to set the classpath and just restart the Tomcat container??

    Thanks,
    I loaded the ojdbc14.jar file in common/lib and restarted the container and I can now connect to Oracle.
    What you mean by not needing ojdbc14 for compilation and it would be better to use a build tool[b] to do what?

  • Failed to call Oracle JDBC OCI driver

    Hi - there,
    I have just loaded JDBC classes for Oracle 8.0.5, which is running on Sun Solaris.
    The Path setup for this driver is
    CLASSPATH=$ORACLE_HOME/jdbc/lib/classes111.zip
    LIBRARY_PATH=$ORACLE_HOME/jdbc/lib:$ORACLE_HOME/lib.
    But I am not able to run any test programs and keep getting the error of
    "java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver
    Someone can help me to jump-start this driver?
    Thank a lot
    Charlie

    Try to use Backslashes in the classpath.
    It is a problem of your Classpath, because it don't find the class.
    Regards,
    Geri

  • Load Oracle JDBC Driver by reflection.

    Hi!
    I'm trying to load driver by reflection like this,
    try {
      URL ora8libURL = new URL("file:///C:/oracle/product/10.2.0/clientDev/jdbc/lib/classes12.jar");
      Class.forName("oracle.jdbc.OracleDriver", true, URLClassLoader.newInstance(new URL[]{ora8libURL}));
        Enumeration<Driver> drivers = DriverManager.getDrivers();
        while(drivers.hasMoreElements())
          Driver drv = drivers.nextElement();
          System.out.println(drv.getClass().getName());
      conn = DriverManager.getConnection("jdbc:oracle:thin:@//192.168.186.13:1521/rdb817","user","password");
    catch(ClassNotFoundException ex) {ex.printStackTrace();}
    catch(MalformedURLException ex) {ex.printStackTrace();}
    catch (SQLException ex) {ex.printStackTrace();}but i've got this error:
    sun.jdbc.odbc.JdbcOdbcDriver
    java.sql.SQLException: No suitable driver found for jdbc:oracle:thin:@//192.168.186.13:1521/rdb817
         at java.sql.DriverManager.getConnection(Unknown Source)
         at java.sql.DriverManager.getConnection(Unknown Source)
    ...However, when i specify driver explicit in classpath it works fine.
    Help.

    I had the same problem you have, until i read your post :-).
    Now, with your help, i found a solution.
    The problem with your code is that the DriverManager that you are using doesn't "see" the driver you are loading. But you can create the driver instance directly:
    * Testes.java
    * Created on 31 de Julho de 2007, 15:04
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    import java.sql.*;
    import java.net.*;
    import java.util.*;
    * @author paulo
    public class Testes {
        /** Creates a new instance of Testes */
        public Testes() {
         * @param args the command line arguments
        public static void main(String[] args) {
            // TODO code application logic here
            String dbUrl10_1 = "jdbc:oracle:thin:@(DESCRIPTION="
                            + "(ADDRESS_LIST="
                            + "     (ADDRESS="
                            + "          (PROTOCOL=TCP)"
                            + "          (HOST=ffcluster01-vip)"
                            + "          (PORT=1521)"
                            + "     )"
                            + "     (ADDRESS="
                            + "          (PROTOCOL=TCP)"
                            + "          (HOST=ffcluster02-vip)"
                            + "          (PORT=1521)"
                            + "     )"
                            + "     (LOAD_BALANCE=yes)"
                            + ")"
                            + "(CONNECT_DATA="
                            + "     (SERVICE_NAME=bh.hdff.pt)"
                            + "     (FAILOVER_MODE ="
                            + "          (TYPE = SELECT)"
                            + "          (METHOD = BASIC)"
                            + "          (RETRIES = 180)"
                            + "          (DELAY = 5)"
                            + "     )"
                            + ")"
                            + ")";
            String dbUrl10_2 = "jdbc:oracle:thin:@ffcluster01:1521:BH1";
            String dbUrl7 = "jdbc:oracle:thin:@7.30.5.1:1521:HFF";
            try {
                 //Class.forName("oracle.jdbc.OracleDriver");
                URL ora7libURL = new URL("file:///C:\\PAULO\\aplicacoes\\ojdbc14.jar");
                URL ora10libURL = new URL("file:///C:\\PAULO\\aplicacoes\\ojdbc14_10g.jar");
                Driver drv10 = (Driver)(Class.forName("oracle.jdbc.OracleDriver", true, URLClassLoader.newInstance(new URL[]{ora10libURL}))).newInstance();
                System.out.println("Versao 10: "+drv10.getMajorVersion()+"."+drv10.getMinorVersion()+"\n");
                Driver drv7 = (Driver)(Class.forName("oracle.jdbc.OracleDriver", true, URLClassLoader.newInstance(new URL[]{ora7libURL}))).newInstance();
                System.out.println("Versao 7: "+drv7.getMajorVersion()+"."+drv7.getMinorVersion()+"\n");
                Enumeration drivers = DriverManager.getDrivers();
                while(drivers.hasMoreElements()) {
                    Driver drv = (Driver)drivers.nextElement();
                    System.out.println(drv.getClass().getName());
                    System.out.println("Versao: "+drv.getMajorVersion()+"."+drv.getMinorVersion()+"\n");
                System.out.flush();
                Properties prt = new Properties();
                prt.setProperty("user", "****");
                prt.setProperty("password", "*****");
                Connection conn = drv10.connect(dbUrl10_1,prt);
                conn.close();
                prt = new Properties();
                prt.setProperty("user", "****");
                prt.setProperty("password", "****");
                conn = drv7.connect(dbUrl7,prt);
                conn.close();
            } catch(ClassNotFoundException ex) {
                ex.printStackTrace();
            } catch(MalformedURLException ex) {
                ex.printStackTrace();
            } catch(SQLException ex) {
                ex.printStackTrace();
            } catch(Exception ex) {
                ex.printStackTrace();
    }Has you can see, the DriverManager doesn't know about the divers loaded with the new ClassLoader.
    The only thing you have to pay attention is not to have the classes for "oracle.jdbc.OracleDriver" in your system classpath.

  • Unable to load oracle.jdbc.driver.OracleDriver class

    i want to connect my java application with oracle database but i m getting an error -"class not found exception oracle.jdbc.driver.OracleDriver " which is written in Class.forName() to register the driver for DriverManager.
    plz help me..

    This is an old class, not included with the JDK anymore. It was made obsolete by
    DataSource which is a connection pool and not a single connection.

  • Load oracle jdbc driver error when run applet via the web

    Hi All,
    I have built an applet which connect to database via jdbc thin driver. It works fine when I run it through the applet viewer, but got a problem when run it through the web.
    java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver
    I am using jdev9i 9.0.4 and jdk 1.4.2. The jdbc version is 9.0.1
    I have added both the classes12.zip and ojdbc14.zip in the class path and also pack them together with my applet class. Here is the code
    public class MyApplet extends Applet
    implements Runnable
    public void start()
    if(theThread == null)
    theThread = new Thread(this);
    theThread.start();
    Retrieve R = new Retrieve();
    this.MyMap = R.retrieveDesc();
    public class Retrieve
    public Retrieve()
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    conn=DriverManager.getConnection("jdbc:oracle:thin:@babyruth.wvu.edu:1703:devdw", User, Password);
    conn.setAutoCommit(true);
    connectStatus = true;
    public HashMap retrieveDesc()
    return map;
    I have also built one HTML page NewApplet like this
    <HTML>
    <HEAD>
    <TITLE> My New Applet</TITLE>
    </HEAD>
    <APPLET CODE="MyApplet.class" CODEBASE="menu" ARCHIVE="MyApplet.zip" WIDTH=300 HEIGHT=485>
    <!--General Settings-->
    <param name="bgcolor" value="255,255,255">
    </HTML>
    Any advice is highly appreciated
    Mei

    Sir,
    Well you haven't "packed" them correctly. Why don't you just add the driver bits to the soucebase tag? or something like that anyway...
    Sincerely,
    Slappy

  • Oralce 10G2 JDBC Driver - Error Loading oracle.jdbc.driver.OracleDriver

    When attemping to use the 10G2 jdbc driver the following NoClassDefFoundError is encountered:
    Exception in thread "main" java.lang.NoClassDefFoundError: while resolving class: oracle.jdbc.driver.OracleDriver
    <<No stacktrace available>>
    Caused by: java.lang.ClassNotFoundException: oracle.security.pki.OracleWallet not found in [file:./, file:ojdbc1410g2.jar, file:/usr/share/java/libgcj-3.4.4.jar, file:./, core:/]
    <<No stacktrace available>>
    The error does not occur when reverting back to the 9 jdbc driver. Does anyone know what is causing this behavior?
    Regards,
    Paul

    Paul,
    Actually, class "oracle.jdbc.OracleDriver" extends class "oracle.jdbc.driver.OracleDriver".
    So check the JAR files in the list displayed by your error message and see if any of them contain the [missing] class, for example:
    jar tvf ojdbc1410g2.jar oracle/jdbc/driver/OracleDriver.classGood Luck,
    Avi.

  • Informix JDBC: Failed to load Informix JDBC Driver

    hi:
    I use workbench to migration informix 7.3 to Oracle 8.1

    The informix file ifxjdbc.jar needs to be put in the Omeb\drivers
    directory.
    Turloch
    Oracle Migration Workbench Team

  • Linux - Oracle - Crystal Report Server XI : Error in File Report1: Failed to load database information.

    I am using Crystal Reports Server XI on Linux Server with Oracle Server 10g.
    I did install Oracle Client on Report Server and config Oracle SID in tnsnames.ora also. It works well with tnsping command. Then, I published a report which was created in Crystal Reports developer on this server.
    When I preview the report on Report Server. I got the following error message:
    Error in File Report1: Failed to load database information.
    Try to fix the problem I ran web Central Management Console -> Objects ->Report1->Process -> Database and set there the following parameters:
    Database driver: Oracle
    Server: servers_host_name
    Database: (tried both ORACLE_SID and tns_name)
    User: oracle_user_name
    Password: oracle_pw
    It still got the same problem.
    I will appreciate any help.
    Tham.

    I was having a similar problem in Crystal Reports Server 2008 v1, and had to install the full client to resolve it, which I didn't like.  I poked around some, and was able to get the Instant Client working with a few minor changes.  Note that I tried it only with the 32-bit Instant Client even though I was on a 64-bit system because that was what SAP recommended when I talked to them.
    The changes I had to do was initialize the Oracle environment variables (the instant client doesn't have a script to do this for you) and to create a soft-link which is included in the full client, but not in the instant client.
    To setup the environment variables I created a file called env.sh and put it in /opt/crystal/bobje/setup/oracle/, where /opt/crystal was my install path.  This ensured that it got called by the /opt/crystal/bobje/setup/env.sh script which runs as part of the System init scripts to initialize the environment.  The following is what I put in my file (again for the 32-bit 11g R2 instant client):
         export ORACLE_SID=summitdb
         export ORACLE_HOME='/usr/lib/oracle/11.2/client'
         export ORACLE_BASE='/usr/lib/oracle/'
         export TNS_ADMIN='/usr/lib/oracle/11.2/client/network/admin'
         export PATH="$:/usr/lib/oracle/11.2/client/bin"
         export LD_LIBRARY_PATH="$$/usr/lib/oracle/11.2/client/lib"
    After that, I created the missing soft link using this command:
         ln -s "$/lib/libclntsh.so.11.1" "$/lib/libclntsh.so.10.1"
    Once I had done those two things, and restarted the service using the /etc/init.d script, it worked fine.

  • Sun IDM Repositor Configuration Error: Failed to load JDBC Driver

    Hi Gurus,
    I am new to Java IDM and predictably failed in my first attempt to install Java IDM in a Windows machine with SQL Server 2000 SP3.
    I followed the Installation document step by step and I think I din' t miss any!!.. But still I got caught by an error, here it is:
    I successfully installed IDM but failed while configuring Repository. I have downloaded the JDBC driver from Microsoft for SQL Server 2000, SP3. Then after that I copied the Jar from JDBC driver folder to
    %WSHOME%/bin/lib folder. After this I launched the Repository configuration setup.
    I got the following error while trying to connect the waveset database with Repository type as SQL Server (JDBC Driver)
    com.waveset.util.ConfigurationError: Failed to load JDBC Driver 'com.microsoft.sqlserver.jdbc.SQLServerDriver':
    ==> java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
    The Parameters that I have given for connection are:
    URL: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=waveset
    JDBC Driver: com.microsoft.sqlserver.jdbc.SQLServerDriver
    Connect as User: waveset
    Connect Password: waveset
    I have created the database and granted all access to user waveset.
    Please help me come out of this. I tried dropping and recreating the database with a different name. Still it did not work, looks like it is a JDBC driver specific issue. Please guide me if I did anything wrong.
    Appreciate any help
    Thanks

    Open your driver jar using winzip or something and check if the class: com.microsoft.sqlserver.jdbc.SQLServerDriver is present in the jar. I think you need to use a different class name. or your jar file is wrong. I think there are separate jars for SQL server 2000 and for SQL Server 2005.

  • [Oracle JDBC Driver][Oracle]ORA-31011: XML parsing failed

    Hi,
    I have got the following error when i tired to upload an XML file in my application. My application will insert the XML file in to Oracle 10g data base table. (Our DB server is Oracle 10g).
    The error is as follows:-
    [BEA][Oracle JDBC Driver][Oracle]ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00004: internal error "MultiChar overflow"
    Error at line 20795
    ORA-06512: at "SYS.XMLTYPE", line 254
    ORA-06512: at line 1
    The XML file contains more than 90,000 lines in it. Please help.
    Thanks!
    Siva K.

    Is this a specific problem with 10G release? We are using 10.2.0.4.0.
    Using CLOB, We think that this may hit the performance of the application as we are using large XML files.

Maybe you are looking for