Oracle JDBC Connectivity

I am trying to connect to oracle8.0.5 database from JDK1.3 on
windows 2000 os
my program code is as follows
import java.sql.*;
class JEmpt{
public static void main (String args [])
     throws SQLException {
     try
          Class.forName("oracle.jdbc.driver.OracleDriver");
          Connection conn =
          DriverManager.getConnection
("jdbc:oracle:thin:@127.0.0.1:1521:ORCL","SYSTEM","MANAGER");
          Statement stmt = conn.createStatement ();
          ResultSet rset = stmt.executeQuery ("select
ENAME from EMP");
          while (rset.next ()) {
          System.out.println (rset.getString (1));
     catch(Exception e)
          System.out.println("Exception : "+e.getMessage
but i get the following error
Exception in thread "main" java.sql.SQLException: Connection
refused: no further information
at oracle.jdbc.dbaccess.DBError.check_error<DBError.java:228>
at
oracle.jdbc.driver.OracleConnection.<init><OracleConnection.java:
110>
at oracle.jdbc.driver.OracleDriver.connect<OracleDriver.java:148>
at java.sql.DriverManager.getConnection<Unknown Source>
at java.sql.DriverManager.getConnection<Unknown Source>
at Employee.main<Employee.java:23>
your help wii be highly appreciated
looking forward for yr reply
lekha

Hi lekha
try this:
import oracle.jdbc.driver.*;
DriverManager.registerDriver(new OracleDriver());
conn = DriverManager.getConnection(...)
and ensure that your CLASSPATH can see
classes111.zip/classes12.zip.
Tarik

Similar Messages

  • Enable SSL between oracle JDBC Connection in weblogic server.

    Hi ALL,
    I have an requirement to enable SSL Mechanism in weblogic JDBC Connection Pool.we are using Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production and Driver as "jdbc:oracle:thin@..." / oracle.jdbc.OracleDriver.
    weblogic server 8.1 SP4
    can anybody know what are the steps / configuration has to be done for enable Oracle Advanced Security encryption on the JDBC Oracle Thin driver with a WebLogic JDBC Connection Pool.
    Thanks,
    Karthik,

    Hi,
    I changed the code as given below. Still getting the same error. Can I migrate my question to jdbc section? I am new to this forum.
    import java.sql.*;
    public class jdbc {
    public static void main(String[] args) throws ClassNotFoundException, SQLException
    Class.forName("oracle.jdbc.driver.OracleDriver");
    String url = "jdbc:oracle:thin:@localhost:1521:xe";
    Connection conn =
    DriverManager.getConnection(url,"jestin","jj");
    conn.setAutoCommit(false);
    Statement stmt = conn.createStatement();
    ResultSet rset =
    stmt.executeQuery("select BANNER from SYS.V_$VERSION");
    while (rset.next()) {
    System.out.println (rset.getString(1));
    stmt.close();
    System.out.println ("Ok.");
    jestinjoy@debian:~/java$ javac -classpath /usr/lib/java/ jdbc.java
    jestinjoy@debian:~/java$ java jdbc
    Exception in thread "main" java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
         at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:169)
         at jdbc.main(jdbc.java:7)
    same error when I give the command without classpath

  • Oracle JDBC Connection Error code 12505 in J2EE

    Hi All,
    I'm in a great problem.Could not connect my J2EE server to my Oracle database server.
    My config/resource.properties file as follows
    ================================
    jdbcDataSource.5.name=jdbc/iisdb
    jdbcDataSource.5.url=jdbc:oracle:thin:@128.51.12.33:15 21:iisals.rsapps;create=true
    jdbcDriver.1.name=oracle.jdbc.driver.OracleDriver
    My config/default.properties file as follows
    ================================
    jdbcDatasources=jdbc/iisdb|jdbc:oracle:thin:@128.51.12.33:1521:iisals.rsapps
    Deployment is successful but while running the application through browser the error is as follows
    =======================================
    javax.ejb.CreateException: java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=135286784)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
    which is for either SID identification problem or TCP/IP
    port problem.
    But from my PC the same database can be connected through sql plus.
    So I am n't getting where is the problem ??????
    Whether any properties file has to be changed ???
    Can anyone help me in this regards,

    Hai everybody,
    I do have the same problem. I am trying to connet to the oracle8.1.7 database in linux machine from windows98. I am able to connect to the database thro' sqlplus, but when i try to connect using JDBC i am getting the follg error :
    java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNU
    M=135294976)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
    can any one rectify this problem. I checked even java.policy file. Everything seems to be ok.
    Thx & regards
    jagan

  • Oracle JDBC Connection Error ?

    Hi all .. i have JDeveloper9.0 and oracle database i have created the following page (which is the first !) to test the connection to oracle database,
    <%@ page contentType="text/html;charset=WINDOWS-1252"%>
    <%@ page import="java.sql.*"%>
    <%@ page import="oracle.jdbc.driver.*"%>
    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=WINDOWS-1252">
    <META NAME="GENERATOR" CONTENT="Oracle JDeveloper">
    <TITLE>
    Hello World
    </TITLE>
    </HEAD>
    <BODY>
    <%
    out.println("good things comes for the ones whos wait");
    // testing Database Connection
    Class.forName("oracle.jdbc.driver.OracleDriver");
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@10.0.24.23:1513:test","ap1s","ap1s");
    Statement st = conn.createStatement();
         ResultSet rs= st.executeQuery("select * from XX_CNSLTNT");
         while(rs.next())
    System.out.println(rs.getString(1));
    %>
    <form method="POST" action="untitled1.jsp">
    <p>
    <input type="text" name="T1" size="20">
    <input type="submit" value="Submit" name="B1">
    <input type="reset" value="Reset" name="B2">
    </p>
    </form>
    </BODY>
    </HTML>
    and its generating me this error, when i compile :
    Error: cannot access directory oracle\jdbc\driver; verify that directory is reachable from classpath and/or sourcepath
    so, does any one have a clue of the problem is ??
    thanx in advance

    Is ojdbc14.jar or classes12.jar in the Classpath?

  • Tomcat 5.5.20 / Oracle  JDBC connection error

    Hi All,
    I am using Eclipse 3.2/ Tomcat 5.5.20/ Oracle 8i
    Inside my java class; right after finding the context, it gives error on line:
    conn = dataSource.getConnection();
    my server.xml <Resource> settings are proper within one tag...
    I am loosing my hair faster... please someone help me..
    Error Stack:
    javax.servlet.ServletException
         org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:545)
         org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:486)
         org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    java.lang.NullPointerException
         com.nibtt.beans.ConnectionBean.getConnection(ConnectionBean.java:80)
         com.nibtt.actions.LoginAction.execute(LoginAction.java:44)
         org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    Regards
    Hepzi

    Hi Zadok,
    I am going insane. Thank God you replied. I am pasting my code here.
    I have setup Tomcat5.5.20 <resource> tag as follows: for connection pooling
    <Resource      name="jdbc/TestStrutsDB" auth="Container"
              type="javax.sql.DataSource" factory="org.apache.commons.dbcp.BasicDataSourceFactory"
              username="SCOTT" password="TIGER"
              driverClassName="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@111.1.1.1:1521:TEST"
              maxActive="8" maxIdle="4"/>
    my application web.xml code:
    <resource-ref>
    <description>Oracle DB Connection</description>
    <res-ref-name>jdbc/TestStrutsDB</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    my java code:
    public Connection getConnection() throws Exception{
              Context ctx = new InitialContext();
    Context envContext = (Context)ctx.lookup("java:/comp/env");
    javax.sql.DataSource dataSource = null;
         ResultSet rst = null;
         Statement stmt = null;
         try {
              if(envContext == null ) {
         System.out.println( "context is NULL");
              } else
         System.out.println( "context is NOT NULL");
    dataSource = (javax.sql.DataSource)envContext.lookup("jdbc/TestStrutsDB");
              if (dataSource != null) {
                   System.out.println( "before actual connection to database: "+dataSource.toString() );
                   try {
                        conn = dataSource.getConnection();
                   } catch (Exception connEx) {
                        System.out.println( connEx.getStackTrace());
              if(conn != null) {
         System.out.println( "Got Connection "+conn.toString());
         stmt=conn.createStatement();
         rst=stmt.executeQuery("select username from testTomcat");
         while(rst.next()){
              System.out.println("User Name is: " + rst.getString("username"));
         rst.close();
         rst = null;
         stmt.close();
    stmt = null;
    conn.close();
         conn = null;
         // do what you wish with Connection
         } catch (SQLException e) {
              while((e = e.getNextException()) != null) {
                        System.out.println("SQLException: " + e.getMessage());
                        System.out.println("SQLState: " + e.getSQLState());
                        System.out.println("VendorError: " + e.getErrorCode());
                        System.out.println(e.getStackTrace());
         } finally {
         try {
         conn.close();
         } catch (SQLException ex) {
              System.out.println(ex.getStackTrace());
              return conn;
         } //End of Connection function
    Please let me know if had gone wrong somewhere
    Thanks in advance
    Regards
    Hepzi

  • Inactive Oracle JDBC connections

    I wonder if someone from the JDBC development group can answer this question.
    From talking to the JDBC support person ,
    I could get the following bit of information
    which may or may not be completely correct.
    He mentioned that if a connection is idle
    for a long period of time ( By idle, I mean
    no transaction is active), the resources associated with the connection could be recycled by the JDBC driver. It is the
    application's responsibility to keep pinging the connection if the application desires to keep the connection alive.
    Is the above correct? There is no mention of
    such behaviour in the Oracle JDBC documentation.
    null

    No, this is not true. We don't recycle
    any resources if the connection is active
    (i.e. it's not closed).

  • Connection issues with Oracle-JDBC

    Using the Universe Design Tool in BOE 4.4 to create an Oracle-JDBC connection.
    Issue:  Test Connection fails for JDBC connection to production Oracle database.
    Getting error:
    “DBD: ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    IBM AIX RISC System/6000 Error: 2: No such file or directory”
    Things to note:
    There are three entries in the tnsnames.ora file (a prod entry, a dev entry and a test entry).  I can successfully create the JDBC connections for the test and dev entries, but not prod.
    I can go to Designer in another server (our BOE 3.5 server in a different environment) and create all three Oracle-JDBC connections.
    The Oracle middleware is the same between the two servers (11g) and the tnsnames.ora files are identical.
    The prod database is up (it would definitely be known if it were down).
    Very confused on this one.  Any help would be appreciated.

    It appears that the SAP tool “Universe Design Tool” wants to have a fully qualified (host.parent domain.org) Net Service name for this particular connection as I was able to successfully JDBC connect to our production Oracle database.  The other two databases didn't need it and the Oracle SQL Developer (which uses JDBC for connections) didn’t need a fully qualified name for our production server either.  In any case, it appears to be working now.

  • Oracle JDBC Drivers 8.1.6.0.1

    In the readme file of Oracle JDBC drivers 8.1.6.0.1 (http://technet.oracle.com/software/tech/java/sqlj_jdbc/files/Readme_01.txt)
    it mentioned that it supports "connection pooling" and "distributed transactions".
    Later on in the same file under "Oracle JDBC Connection Caching", it says it "facilitates" users in their own connection pooling. Does this mean there is not complete implementation of connection pooling in the driver and users has to do the work themselves?
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by JDBC_TX ():
    In the readme file of Oracle JDBC drivers 8.1.6.0.1 (http://technet.oracle.com/software/tech/java/sqlj_jdbc/files/Readme_01.txt)
    it mentioned that it supports "distributed transactions".
    As I understand, JDBC transaction is connection based and uses Oracle internal transaction manager. In order to do "distributed transactions", I must have at least two connections open at the same time each to its own database instance. How does the two connections coordinate the transactions? I thought in order to support "distributed transactions", one has to build a higher layer to encapsulate the two connections and therefore coordinate the distributed transactions. Any examples will be welcome.<HR></BLOCKQUOTE>
    The two branches of the transaction are coordinated using 2-phase commit.
    For samples look under
    $ORACLE_HOME/jdbc/demo/samples/oci8/jdbc20-samples/
    null

  • Configure JDBC connection ERROR: no ocijdbc9 in java.library.path

    ERROR: no ocijdbc9 in java.library.path
    step 6 is where I need help!? thanx.
    When configuring a database connection, I chose
    1. Oracle JDBC (connection type)
    2. Authentication (username/password of my D2K repository)
    3. Driver: oci8
    4. Hostname: pmurphy1 (my local machine where my db is)
    5. Port: 1521 default (odbc works on this)
    * 6. Enter custom JDBC url (? please help ?) left blank!!
    I really wanna get started with this cool toy!!!
    Cheers,
    Paully

    I am assuming you are using JDeveloper 3.2x
    Please see the online help for additional details.
    Search help for "JDBC Connection Properties" - With the
    quotations and you will find a page names "JDBC Connection
    Properties"
    This page contains the following info and additional links.
    -John
    ------------- COPIED FROM HELP ---------------
    Oracle JDBC-OCI8 Driver
    Use this type 2 driver when creating a Java application that
    runs against an Oracle8i server. This is a thick driver
    optimized for the Oracle8i database: it cannot be used with
    applets. This driver handles any database protocol (TCP, IPX,
    BEQ, and so on). It is required for applications which are run
    from the machine they are stored on. It can also be used against
    an Oracle7 database.
    This driver requires client software installation. The project
    must also include the correct version of the driver in a library
    and include no other Oracle JDBC library. This driver is
    included in the default Oracle JDBC library for all projects.
    The library is named Oracle 8.1.7 JDBC and it includes both the
    Thin JDBC and JDBC-OCI8 driver library components. For all OCI
    and type 2 JDBC drivers, see Connection Requirements for OCI and
    Type 2 JDBC Drivers.
    ------------- COPIED FROM HELP ---------------

  • Error while creating a JDBC connection to Oracle 11g using WLS 6.1

    Hi
    I am trying to connect to Oracle 11g database on Weblogic 6.1 server.
    First of all i would like to know if this is compatible?
    The environement that i have is this
    1. JDK 1.3
    2. Database 11g is on remote system
    3. Oracle client on my local system ( Connecting to the 11g DB through the client works fine)
    4. Weblogic server 6.1
    5. Currently the application is connected to Oracle 10g DB and working fine(We are attempting to move it to 11g)
    Below are the steps that i followed to create the connection:
    1. Made an entry for the datasource in config.xml under <WLS_DOMAIN>/config folder as below
    <JDBCConnectionPool DriverName="oracle.jdbc.driver.OracleDriver"
    MaxCapacity="4" Name="CADConnectionPool"
    Properties="user=abc_proxy;password=proxy_abc;dll=ocijdbc8;protocol=thin"
    RefreshMinutes="5" ShrinkPeriodMinutes="10" Targets="CAsvr"
    TestConnectionsOnRelease="true" TestConnectionsOnReserve="true"
    TestTableName="dual" URL="jdbc:oracle:thin:@gen11t-ora.db.lab.xyz.com:1530:GEN11T"/>
    2. Restarted the server.
    3. Ran the application and get the following error on the server console:
    <Aug 22, 2011 12:39:42 AM CDT> <Error> <JDBC> <Cannot startup connection pool "C
    ADConnectionPool" weblogic.common.ResourceException:
    Could not create pool connection. The DBMS driver exception was:
    java.lang.ArrayIndexOutOfBoundsException
    at oracle.security.o3logon.C0.r(C0)
    at oracle.security.o3logon.C0.l(C0)
    at oracle.security.o3logon.C1.c(C1)
    at oracle.security.o3logon.O3LoginClientHelper.getEPasswd(O3LoginClientH
    elper)
    at oracle.jdbc.ttc7.O3log.<init>(O3log.java:289)
    at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:251)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:246)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
    va:365)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Con
    nectionEnvFactory.java:193)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(Con
    nectionEnvFactory.java:134)
    at weblogic.common.internal.ResourceAllocator.makeResources(ResourceAllo
    cator.java:705)
    at weblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.j
    ava:282)
    at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.j
    ava:650)
    at weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:107)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
    oymentTarget.java:360)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Dep
    loymentTarget.java:285)
    at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeploy
    ments(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(DynamicMB
    eanImpl.java:636)
    at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
    .java:621)
    at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
    ionMBeanImpl.java:360)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    57)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    25)
    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.updateDeplo
    yments(ServerMBean_CachingStub.java:2977)
    at weblogic.management.mbeans.custom.ApplicationManager.startConfigManag
    er(ApplicationManager.java:372)
    at weblogic.management.mbeans.custom.ApplicationManager.start(Applicatio
    nManager.java:160)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
    eanImpl.java:636)
    at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
    .java:621)
    at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
    ionMBeanImpl.java:360)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    57)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    25)
    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)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Con
    nectionEnvFactory.java:209)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(Con
    nectionEnvFactory.java:134)
    at weblogic.common.internal.ResourceAllocator.makeResources(ResourceAllo
    cator.java:705)
    at weblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.j
    ava:282)
    at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.j
    ava:650)
    at weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:107)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
    oymentTarget.java:360)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Dep
    loymentTarget.java:285)
    at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeploy
    ments(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(DynamicMB
    eanImpl.java:636)
    at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
    .java:621)
    at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
    ionMBeanImpl.java:360)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    57)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    25)
    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.updateDeplo
    yments(ServerMBean_CachingStub.java:2977)
    at weblogic.management.mbeans.custom.ApplicationManager.startConfigManag
    er(ApplicationManager.java:372)
    at weblogic.management.mbeans.custom.ApplicationManager.start(Applicatio
    nManager.java:160)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
    eanImpl.java:636)
    at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
    .java:621)
    at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
    ionMBeanImpl.java:360)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    57)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    25)
    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)
    Can't load scjd12.dll, file not found java.library.path=C:\jdk1.3.1_11\bin;.;C:\WINDOWS\system32;C:\WINDOWS;.\bin;C:\P
    rogram Files\Lotus\Notes\Data;C:\Program Files\Lotus\Notes;C:\Program Files\Java
    \jre1.5.0_17\bin;C:\Program Files\Java\j2re1.4.2_06\bin;C:\Oracle\bin;C:\Program
    Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\WINDOWS\sys
    tem32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\system32\nls;C:\WINDOWS\sys
    tem32\nls\ENGLISH;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Rational
    \common;C:\Program Files\Rational\ClearCase\bin;C:\apache-ant-1.6.5\bin;C:\jdk1.
    3.1_11\bin;C:\Program Files\Citrix\ICAService\;C:\Program Files\Citrix\System32\
    ;Z:.
    <Aug 22, 2011 12:38:06 AM CDT> <Info> <JDBC> <Sleeping in createResource()>
    <Aug 22, 2011 12:38:07 AM CDT> <Error> <JDBC> <Cannot startup connection pool "c
    ispool" weblogic.common.ResourceException:
    Could not load 'com.neon.jdbc.Driver
    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(Con
    nectionEnvFactory.java:212)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(Con
    nectionEnvFactory.java:134)
    at weblogic.common.internal.ResourceAllocator.makeResources(ResourceAllo
    cator.java:705)
    at weblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.j
    ava:282)
    at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.j
    ava:650)
    at weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:107)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
    oymentTarget.java:360)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Dep
    loymentTarget.java:285)
    at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeploy
    ments(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(DynamicMB
    eanImpl.java:636)
    at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
    .java:621)
    at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
    ionMBeanImpl.java:360)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    57)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    25)
    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.updateDeplo
    yments(ServerMBean_CachingStub.java:2977)
    at weblogic.management.mbeans.custom.ApplicationManager.startConfigManag
    er(ApplicationManager.java:372)
    at weblogic.management.mbeans.custom.ApplicationManager.start(Applicatio
    nManager.java:160)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
    eanImpl.java:636)
    at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
    .java:621)
    at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
    ionMBeanImpl.java:360)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    57)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    25)
    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)
    Would like some help on this asap as the project is in critical stage.
    Thanks

    The driver being used by your weblogic is too old and incompatible with the DBMS. Upgrade the driver.

  • Error while creating a report that uses Oracle OCI JDBC connectivity

    Please let me know why my CR and LF characters are removed from my forum posting *****
    Hi,
    I was trying to create a report that uses Oracle OCI JDBC connectivity. I am using Eclipse3.4 download from "cr4e-all-in-one-win_2.0.2.zip".  I have successfully created a JDBC OCI connection.
    The connection parameters are given below:
    URL: jdbc:oracle:oci8:@xe
    Database: xe
    username: <userName>
    password: <password>
    I have tested the above connection in Data source Explorer and it works fine!!!
    But I am getting the following error when I drag-and-drop a table from the list of tables. Not sure what I am missing here?  Any help is highly appreciated.
    com.businessobjects.reports.jdbinterface.common.DBException: InvalidURLOrClassName
         at com.crystaldecisions.reports.queryengine.driverImpl.jdbc.JDBCConnection.Open(Unknown Source)
         at com.crystaldecisions.reports.queryengine.JDBConnectionWrapper.Open(SourceFile:123)
         at com.crystaldecisions.reports.queryengine.Connection.br(SourceFile:1771)
         at com.crystaldecisions.reports.queryengine.Connection.bs(SourceFile:491)
         at com.crystaldecisions.reports.queryengine.Connection.t1(SourceFile:2979)
         at com.crystaldecisions.reports.queryengine.Table.u7(SourceFile:2408)
         at com.crystaldecisions.reports.dataengine.datafoundation.AddDatabaseTableCommand.new(SourceFile:529)
         at com.crystaldecisions.reports.common.CommandManager.a(SourceFile:71)
         at com.crystaldecisions.reports.common.Document.a(SourceFile:203)
         at com.businessobjects.reports.sdk.requesthandler.f.a(SourceFile:175)
         at com.businessobjects.reports.sdk.requesthandler.DatabaseRequestHandler.byte(SourceFile:1079)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(SourceFile:1163)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:657)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:163)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(SourceFile:525)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(SourceFile:523)
         at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
         at java.util.concurrent.FutureTask.run(Unknown Source)
         at com.businessobjects.crystalreports.designer.core.util.thread.ExecutorWithIdleProcessing$3.doWork(ExecutorWithIdleProcessing.java:182)
         at com.businessobjects.crystalreports.designer.core.util.thread.AbstractCancellableRunnable.run(AbstractCancellableRunnable.java:69)
         at com.businessobjects.crystalreports.designer.core.util.thread.PriorityTask.run(PriorityTask.java:75)
         at com.businessobjects.crystalreports.designer.core.util.thread.PriorityCompoundCancellableRunnable.runSubtask(PriorityCompoundCancellableRunnable.java:187)
         at com.businessobjects.crystalreports.designer.core.util.thread.PriorityProgressAwareRunnable.runSubtask(PriorityProgressAwareRunnable.java:90)
         at com.businessobjects.crystalreports.designer.core.util.thread.PriorityCompoundCancellableRunnable.doWork(PriorityCompoundCancellableRunnable.java:144)
         at com.businessobjects.crystalreports.designer.core.util.thread.AbstractCancellableRunnable.run(AbstractCancellableRunnable.java:69)
         at com.businessobjects.crystalreports.designer.core.util.thread.ExecutorWithIdleProcessing$IdleTask.run(ExecutorWithIdleProcessing.java:320)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Thanks
    Karthik
    Edited by: KARTHIK1 on Oct 14, 2009 9:38 PM

    Hi Ted,
    Thanks for the feedback. I was able to create a report in Creystal Reports Designer 2008 using OCI.  It is not allowing only in the Eclipse plugin. In our environment we are not allowed to user Oracle thin connections and ONLY OCI is allowed.
    1) Can you please let me know if there is a way to do this? 
    2) Will it allow data sources using native database driver?
    3) If so, can I use JRC to create these reports from a desktop java program?
    Thanks & Regards
    Karthik
    Edited by: KARTHIK1 on Oct 15, 2009 4:38 PM

  • Issue JDBC connection pool with Glassfish 3.1.2.2 and Oracle XE 11gR2

    Hello,
    I am experiencing an issue with pinging a JDBC connection Pool.
    I installed the following without any warnings or errors:
    Operating System: Oracle Enterprise Linux 5
    Oracle XE 11gR2 (11.2.0.2.0) database
    Glassfish 3.1.2.2
    I will refer to the steps I did after the installations
    1) In the .profile file of the OS I add the following:
    JRE_HOME=/usr/java/jre1.6.0_31; export JRE_HOME
    JAVA_HOME=/usr/java/jdk1.6.0_31; export JAVA_HOME
    GLASSFISH_DIR=/u01/glassfish3
    GLASSFISH_HOME=/u01/glassfish3/glassfish
    DERBY_HOME=$GLASSFISH_DIR/javadb
    OPEN_MQ_HOME=$GLASSFISH_DIR/mq
    PATH=:$JAVA_HOME/bin:$JRE_HOME/bin:$PATH:$HOME/bin:$GLASSFISH_HOME/bin:$DERBY_HOME/bin:$OPEN_MQ_HOME/bin
    export GLASSFISH_HOME
    export DERBY_HOME
    export OPEN_MQ_HOME
    export PATH
    LD_LIBRARY_PATH=/u01/app/oracle/product/11.2.0/xe/lib; export LD_LIBRARY_PATH
    . /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh
    2) I copied the ojdbc6.jar to the $GLASSFISH_HOME/domains/domain1/lib
    3) I login to the Glassfish admin console and created a new JDBC Connection Pool.
    Pool Name: ds_orasys
    Resource Type: javax.sql.DataSource
    Datasource Classname: oracle.jdbc.pool.OracleDataSource
    User: [myschema]
    Password: [myschema password]
    URL: jdbc:oracle:thin:@localhost:1521:xe
    When I ping the connection pool I get the following message in the server log:
    [#|2012-10-23T12:14:37.069+0300|WARNING|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.service|_ThreadID=22;_ThreadName=Thread-2;|RAR8054: Exception while creating an unpooled [test] connection for pool [ ds_orasys ], Connection could not be allocated because: Invalid Oracle URL specified|#]
    [#|2012-10-23T12:14:37.071+0300|SEVERE|glassfish3.1.2|org.glassfish.admingui|_ThreadID=19;_ThreadName=Thread-2;|RestResponse.getResponse() gives FAILURE. endpoint = 'http://212.205.62.217:4848/management/domain/resources/ping-connection-pool.json'; attrs = '{id=ds_orasys}'|#]
    I tried to use different jar files. I used ojdbc6dms.jar and ojdbc14.jar.
    I also copied the jar files in the $GLASSFISH_HOME/domains/domain1/lib/ext directory as some people suggested. Still no luck. I keep getting the same error messages in the server.log
    Can anybody help me out or point me to the right direction.
    Thank you in advance

    The error is in the URL. It was in front of my eyes and I couldn't see the error. I skipped the ':' before the '@' when I created the pool. It is working fine now.

  • How to configure JDBC connection in oracle BI publisher with teradata datab

    Hi,
    I am going to use Oracle BI publisher to create report.
    Our database is Teradata.
    How to create database connection for Teradata in BI publisher.
    How to create JDBC connection.
    What should be the Database Driver Class?
    What should be the connection string format?
    Please provide me the suggetion.
    Thanks,
    Santanu Manna

    Hi;
    I suggest please refer below which could be helpful on your issue:
    How To Generate XML Output (Excel, HTML, PDF) for FSG Reports [ID 804913.1]
    E-XMLP: BI Publisher Report RTF Template to Excel output is not same as PDF,RTF or HTML format.[Article ID 1515711.1]
    BI Publisher Enterprise Excel Output File Size is Too Large [ID 1271544.1]
    Regard
    Helios

  • ADF 11g application on Weblogic 10.3 + JDBC connection to Oracle XE

    Hello! i'm using Jdev 11g (not tp4) and i have Adf applicarion which uses BC4J, thereofre in jdev exists connection to DB.
    When i start my application in Jdev, it starts Weblogic and deploys my application. And all works fine!
    When i want to execute my Weblogic as standalone server, using Weblogic domain Administration console, i deploy my application as WAR archive
    before deploy, i've been created JDBC DataSource in Weblogic server, using Weblogic webinterface (connection test was OK)
    and now, when i start my application, entering application Url in internet explorer, i see that exception has ariced, her is the stack trace
    {color:#0000ff}&lt;17-Oct-2008 18:30:49 o'clock EEST&gt; &lt;Error&gt; &lt;HTTP&gt; &lt;xc002600109&gt; &lt;AdminServer&gt; &lt;ACTIVE ExecuteThread: '21' for queue: 'weblogic.kernel.Default (self-tuning)'&gt; &lt;&lt;WLS Kernel&gt;&gt; &lt;1224257449182&gt; &lt;BEA-101017&gt; &lt;[weblogic.servlet.internal.WebAppServletContext@1410e0d - appName: 'nano', name: 'nano.war', context-path: '/nano', spec-version: '2.5', request: weblogic.servlet.internal.ServletRequestImpl@8f5e03[
    GET /nano/faces/untitled3.jsp?_adf.ctrl-state=1797442774_7 HTTP/1.1
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language: en-gb,en;q=0.5
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive
    Cookie: oracle.uix=0^^GMT+3:00; JSESSIONID=wShvL4vT9h40V7TSNH9D84p3v4h48S992vJyWK6p0hnWflfZVpc2!652912999; ADMINCONSOLESESSION=r440L4XpGDJhhX3G1slmFdSzV3xSH51xGzhy912nTnpP2Zv1yVrQ!652912999
    Pragma: no-cache
    Cache-Control: no-cache
    ]] Root cause of ServletException.
    java.lang.NullPointerException
    at oracle.adf.model.bc4j.DCJboDataControl.findVariable(DCJboDataControl.java:2934)
    at oracle.adf.model.binding.DCVariableImpl.resolveSourceVariable(DCVariableImpl.java:69)
    at oracle.adf.model.binding.DCVariableImpl.getVariableKind(DCVariableImpl.java:162)
    at oracle.jbo.common.VariableManagerImpl.doGetVariables(VariableManagerImpl.java:125)
    at oracle.jbo.common.VariableManagerImpl.getVariablesOfKind(VariableManagerImpl.java:259)
    at oracle.jbo.common.VariableManagerImpl.getVariables(VariableManagerImpl.java:253)
    at oracle.jbo.common.VariableValueManagerImpl.doPassivateVariables(VariableValueManagerImpl.java:499)
    at oracle.jbo.common.VariableValueManagerImpl.getPassivatableVariables(VariableValueManagerImpl.java:439)
    at oracle.adf.model.binding.DCBindingContainer.buildFormToken(DCBindingContainer.java:4523)
    at oracle.adf.model.binding.DCBindingContainerState.buildStringBuffer(DCBindingContainerState.java:56)
    at oracle.adf.model.binding.DCBindingContainerState.toString(DCBindingContainerState.java:590)
    at oracle.adf.model.binding.DCBindingContainer.getStateToken(DCBindingContainer.java:4293)
    at oracle.adfinternal.controller.application.model.SaveStateTokenListener.afterPhase(SaveStateTokenListener.java:54)
    at oracle.adfinternal.controller.lifecycle.ADFLifecycleImpl$PagePhaseListenerWrapper.afterPhase(ADFLifecycleImpl.java:529)
    at oracle.adfinternal.controller.lifecycle.LifecycleImpl.internalDispatchAfterEvent(LifecycleImpl.java:118)
    at oracle.adfinternal.controller.lifecycle.LifecycleImpl.dispatchAfterPagePhaseEvent(LifecycleImpl.java:166)
    at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener$PhaseInvokerImpl.dispatchAfterPagePhaseEvent(ADFPhaseListener.java:122)
    at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.afterPhase(ADFPhaseListener.java:68)
    at oracle.adfinternal.controller.faces.lifecycle.ADFLifecyclePhaseListener.afterPhase(ADFLifecyclePhaseListener.java:51)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:354)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:203)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
    {color:#000000}i have learned about deployment descriptors and i have made additional files and changed web.xml file:
    {color:#ff0000}web.xml:
    {color:#000000}....{color}
    {color} &lt;resource-ref&gt;
    &lt;description&gt;Nano Datasource&lt;/description&gt;
    &lt;res-ref-name&gt;Nano_DB_connection&lt;/res-ref-name&gt;
    &lt;res-type&gt;javax.sql.DataSource&lt;/res-type&gt;
    &lt;res-auth&gt;Container&lt;/res-auth&gt;
    &lt;/resource-ref&gt;
    {color:#ff0000}weblogic.xml:{color}
    &lt;?xml version = '1.0' encoding = 'windows-1252'?&gt;
    &lt;weblogic-web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-web-app.xsd" xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app"&gt;
    &lt;resource-description&gt;
    &lt;res-ref-name&gt;Nano_DB_connection&lt;/res-ref-name&gt;
    &lt;jndi-name&gt;Nano_DB_connection&lt;/jndi-name&gt;
    &lt;/resource-description&gt;
    &lt;/weblogic-web-app&gt;
    {color:#ff0000}weblogic-jdbc.xml:{color}
    &lt;?xml version = '1.0' encoding = 'windows-1252'?&gt;
    &lt;jdbc-data-source xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-jdbc.xsd" xmlns="http://www.bea.com/ns/weblogic/jdbc-data-source"&gt;
    &lt;name&gt;Nano_DB_connection&lt;/name&gt;
    &lt;jdbc-driver-params&gt;
    &lt;url&gt;10.5.25.169&lt;/url&gt;
    &lt;driver-name&gt;oracle.jdbc.OracleDriver&lt;/driver-name&gt;
    &lt;properties&gt;
    &lt;property&gt;
    &lt;name&gt;user&lt;/name&gt;
    &lt;value&gt;chaosdb&lt;/value&gt;
    &lt;/property&gt;
    &lt;property&gt;
    &lt;name&gt;servername&lt;/name&gt;
    &lt;value&gt;10.5.25.169&lt;/value&gt;
    &lt;/property&gt;
    &lt;property&gt;
    &lt;name&gt;portnumber&lt;/name&gt;
    &lt;value&gt;1521&lt;/value&gt;
    &lt;/property&gt;
    &lt;property&gt;
    &lt;name&gt;sid&lt;/name&gt;
    &lt;value&gt;XE&lt;/value&gt;
    &lt;/property&gt;
    &lt;/properties&gt;
    &lt;/jdbc-driver-params&gt;
    &lt;jdbc-data-source-params&gt;
    &lt;jndi-name&gt;Nano_DB_connection&lt;/jndi-name&gt;
    &lt;scope&gt;Application&lt;/scope&gt;
    &lt;/jdbc-data-source-params&gt;
    &lt;/jdbc-data-source&gt;
    in BC4J project Model.jpx tells that bc4j uses connection named Nano_DB_connection.
    in Weblogic datasource name is the same
    Question: how to bind my application in weblogic to existed connection/datasource in weblogic?
    how Jdev deploys and configures Weblogic server, that it works fine, but when i start THE SAME server manually, deploy application using JDEV the application execution failed (see above exception)
    maybe i should use EAR profile instead of WAR, to deploy all connections and other stuff to weblogic?
    {color:#ff0000}please help!!!{color}
    {color}{color}

    Hi,
    Did you configure your application module to use a JDBC data source? To do this, right-click the app module in the navigator, select Configurations and in the dialog that comes up change the connection type to JDBC Data Source and enter your data source name - which should be the same as the data source you created on the weblogic server.
    Also, I do suggest you create an EAR file - this is what we've tested and certified with. You can find more details in the deployment chapter of the fusion developer's guide: http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/deployment_topics.htm#CHDJJDDG.
    Hope this helps
    Blaise

  • HELP! Jdbc connection to oracle ClassNotFoundException classpath issues..

    Okay I am a newbie to this but all the other posts concerning this just say add the classes12.jar to my classpath.
    I am using websphere 5.0
    connecting to a 9i db.
    after trying to find out what my classpath is ( websphere 5.0 makes it difficult to see it) i found this:
    <?xml version="1.0" encoding="UTF-8"?>
    <classpath>
    <classpathentry kind="var"
    path="SERVERJDK_50_PLUGINDIR/jre/lib/rt.jar"
    rootpath="SERVERJDK_SRCROOT" sourcepath="SERVERJDK_50_PLUGINDIR/src.jar"/>
    <classpathentry kind="src" path="Java Source"/>
    <classpathentry kind="var" path="WAS_50_PLUGINDIR/lib/j2ee.jar"/>
    <classpathentry kind="var" path="WAS_50_PLUGINDIR/lib/servletevent.jar"/>
    <classpathentry kind="var" path="WAS_50_PLUGINDIR/lib/ivjejb35.jar"/>
    <classpathentry kind="var" path="WAS_50_PLUGINDIR/lib/runtime.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/string.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/jaxen-full.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/utility.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/jspsql.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/xercesImpl.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/xalan.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/datetime.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/mailer.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/dom.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/jstl.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/standard.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/jdbc2_0-stdext.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/saxpath.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/sax.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/dbbeans.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/jaxp-api.jar"/>
    <classpathentry kind="lib" path="C:/oracle/ora92/jdbc/lib/classes12.jar"/>
    <classpathentry kind="output" path="Web Content\WEB-INF\classes"/>
    </classpath>
    to me it looks like it is in my classpath.. (if thats what this is).
    I have imported the classes12.jar file several times through out my project to no avail.
    the error i get it here:
    Error: It Screwed up agian java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
    SystemOut O Connecting ... cisinv
    Error: java.sql.SQLException: No suitable driver
    SystemErr R Exception: null
    from this code:
    package Business;
    import java.sql.Connection;
    import java.sql.Driver;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    * @author jeffreak
    * To change this generated comment edit the template variable "typecomment":
    * Window>Preferences>Java>Templates.
    * To enable and disable the creation of type comments go to
    * Window>Preferences>Java>Code Generation.
    public class beanDbConnect {
         * Constructor for beanDbConnect.
         public beanDbConnect() {
              super();
         private Connection con = null;
         private Statement cmd = null;
         private ResultSet rs = null;
         public Connection connect()
              //Declare variable
              boolean blnSuccessfulOpen = false;
              Driver driver;
              String driverName;
              String serverAddress;
              //Begin try block
              try
                   //Load JdbcOdbcDriver
                   driverName = "oracle.jdbc.driver.OracleDriver";
                                  //oracle.jdbc.driver.OracleDriver     
                   System.out.println("Loading ..." + driverName);
                   //try{
                   Class.forName(driverName).newInstance();
                   //catch (Exception err)
    //                    System.err.println("Error: new instance: " + err.toString());
              System.out.println("Database loaded successfully");
              //catch (ClassNotFoundException e)
              catch (Exception e)
                   System.err.println("Error: It Screwed up agian " + e.toString());
                   blnSuccessfulOpen = false;
              try
                   //Instantiate connection to bean-defined DSN
                   //serverAddress = ("jdbc:oracle:thin:scott/tiger@localhost:1243:" + dbInstance);
                   System.out.println("Connecting ... " );
                   String serverName = "**********";//changed for post
                   String portNumber = "1521";
                   String url = "jdbc:oracle:thin:@" + serverName + ":" + portNumber + ":" + "cisinv";
                   con = DriverManager.getConnection(url, "scott", "tiger");
                   System.out.println("Ready.");
                   blnSuccessfulOpen = true;
              catch (SQLException e)
                   System.err.println("Error: " + e.toString());
              //End try block
              return con;
         }//end connect()
    Please help. ive been working on it for days =(.

    If you're running a Web app, put all JARs that your app needs in the WEB-INF/lib directory. That's always in the CLASSPATH.
    I don't know WebSphere. Do you really have to edit something to add all those CLASSPATH entries?
    In Tomcat, all I'd have to do is put a WAR file in the webapps directory.
    Your code needs some work. You're not following Sun's Java coding standards. Capitalize your class name, for starters.
    Is the username and password for your database still "scott" and "tiger"? Nice security there.
    Your connect method makes a database connection. Do you leave it to users to close it? (You do close your connections when you're done with them, don't you?)
    I'd make Connection a data member and create it in a constructor. I'd write a close method to close it up.
    Doesn't WebSphere do connection pooling? Do you really want to write your own class to handle this?
    MOD

Maybe you are looking for

  • Cannot connect my mic+headphones to the sound card.any he

    I can connect the mic wire to the sound card(creative sound blaster audigy 5.)?but i dont have another exit for my headphones wire, so i can talk but i cant hear anything in the headphones - the sound is coming only from the speakers.is there anyway

  • Calls in queue drop when first call is answered

     When all agents are busy and there are multiple calls in queue, at the point a call gets routed to an agent and answered from queue, the other calls in queue hear the disconnect prompt. This is CME 9.1 on  Version 15.0(1r)M16 application  service qu

  • XY Scatter Chart Trendline

    I am using Crystal Reports 2008 (version 12.2.0.290) and am trying to place a trendline on an XY Scatter Chart. Regardless of the type of trendline I select, nothing every displays onthe chart. A few posts I read suggest that it is not possible to do

  • How can I compress a numbers spreadsheet to email?

    I have a Mac OS X and I know it is old - but I need to complete some invoices that are a new format, and am unable to upload to email. Any help is greatly appreciated. Thank you.

  • [Solved] Intermittent Boot Failure

    I power down my PC and take a day off every week. Last week when I rebooted I had a problem of "unable to find root device" and I followed forum posts and also found this FAQ: After updating my system, I get a "unable to find root device" error after