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

Similar Messages

  • Some times on Tomcat start up it creates SSL error while JDBC connection to SQL server

    We are using Apache Tomcat 6 and SQL server 2008 on production. In the application in ServletContextListner we make DB connection to read some property from DB. When we restart the Tomcat 6.0 in that case sometimes it does not gets DB connection till 5 to
    10 minutes. It does not happen every time. We are using JNDI for getting the Datasource objectand using SQL JDBC 3.0 driver. We get following error in log
    org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "Connection reset by peer: socket write error".)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
    at com.rightwave.util.RWDBConnectionManager.getConnection(RWDBConnectionManager.java:145)
    at com.rightwave.util.RWDataBaseDAO.executeQuery(RWDataBaseDAO.java:306)
    at com.rightwave.util.RWDataBaseDAO.executeQuery(RWDataBaseDAO.java:289)
    at com.rightwave.admin.RWApplicationContext.setMConfigurationProperties(RWApplicationContext.java:226)
    at com.rightwave.admin.RWAdminApplicationContext.initialize(RWAdminApplicationContext.java:85)
    at com.rightwave.admin.RWServletContextListener.contextInitialized(RWServletContextListener.java:186)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:627)
    at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(StandardService.java:516)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
    Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "Connection reset by peer: socket write error".
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1368)
    at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1412)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1058)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:833)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:716)
    at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:841)
    at org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
    at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221)
    ... 31 more
    Caused by: java.io.IOException: Connection reset by peer: socket write error
    at com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeInputStream.ensureSSLPayload(IOBuffer.java:500)
    at com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeInputStream.readInternal(IOBuffer.java:570)
    at com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeInputStream.read(IOBuffer.java:562)
    at com.microsoft.sqlserver.jdbc.TDSChannel$ProxyInputStream.readInternal(IOBuffer.java:757)
    at com.microsoft.sqlserver.jdbc.TDSChannel$ProxyInputStream.read(IOBuffer.java:745)
    at com.sun.net.ssl.internal.ssl.InputRecord.readFully(Unknown Source)
    at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
    at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1379)
    ... 39 more
    Urgent help will be appreciated. 

    So, you've got a network error.. Check your physical layer.

  • Ssl with Oracle jdbc thin driver on weblogic 9.2

    http://www.oracle.com/technology/products/weblogic/howto/jdbcssl/index.html
    http://www.oracle.com/technology/tech/java/sqlj_jdbc/pdf/wp-oracle-jdbc_thin_ssl_2007.pdf
    I had already created the ssl-jdbc connections for Weblogic 9.2 with Oracle 10.2.0.3.0 based on the documents above.
    My questions
    1. the connections are not using the desired ports. The TCP listener is using 1521, and TCPS listener is using 1522, and 2484. However the connections do not use the configured ports. Is it normal?
    2. If using the unassigned port is the normal case, where can I limit the port range?
    3. How to prove the connections are in SSL?

    1. the connections are not using the desired ports. The TCP listener is using 1521, and TCPS listener is using 1522, and 2484. However the connections do not use the configured ports. Is it normal? It is normal.
    2. If using the unassigned port is the normal case, where can I limit the port range? I still have no idea.
    3. How to prove the connections are in SSL? No idea, too.

  • Enabling SSL for Oracle Enterprise Manager 10.1.3.1 is Failing!!!

    Hi All,
    I have followed the steps described in
    http://download-uk.oracle.com/docs/cd/B31017_01//core.1013/b28940/em_app.htm#BABCEEAH.
    However when I am trying to start the application server using 'opmnctl startall' the server is not starting and some timeout is getting generated in the log file.
    Is it that enabling SSL will only make the EM console secured? Then how to enable SSL for other soa components like - BPEL,ESB,OWSM? Are there any documentations available?
    Also please let me know how can I enable SSL for Oracle Application server console?
    Please any advice will be appreciated. I am in the middle of a project delivery.
    Thanks

    Hi,
    Let me first highlight the installation that I have done. I have installed SOA components with 'basic installation' mode.
    The log file under <ORACLE_SOA_HOME>/opmn/config/ has generated the following stack:-
    08/07/25 11:03:34 Start process
    08/07/25 11:03:37 WARNING: XMLApplicationServerConfig.overwriteSiteConfigPort Port assignment is ignored: web-site not found in the server OC4JServiceInfo id: default-web-site protocol: http hostname: null port: 8890 description: null
    08/07/25 11:03:37 WARNING: XMLApplicationServerConfig.overwriteSiteConfigPort Port assignment is ignored: web-site not found in the server OC4JServiceInfo id: secure-web-site protocol: https hostname: null port: 1156 description: null
    08/07/25 11:03:47 log4j:WARN No appenders could be found for logger (wsif).
    08/07/25 11:03:47 log4j:WARN Please initialize the log4j system properly.
    08/07/25 11:03:53 WARNING: OC4J Service: ascontrol-web-site with protocol: https and port: 1156 was not declared in opmn.xml
    08/07/25 11:03:53 Oracle Containers for J2EE 10g (10.1.3.1.0) initialized
    08/07/25 11:03:53 WARNING: OC4J will not send ONS ProcReadyPort messages to opmn for service: OC4JServiceInfo id: default-web-site protocol: http hostname: null port: 8890 description: null
    08/07/25 11:03:53 default-web-site hostname was null
    08/07/25 11:03:53 WARNING: OC4J will not send ONS ProcReadyPort messages to opmn for service: OC4JServiceInfo id: secure-web-site protocol: https hostname: null port: 1156 description: null
    08/07/25 11:03:53 secure-web-site hostname was null
    On the command prompt I am getting the following error:-
    opmn id=CALTP8BB32:6203
    0 of 1 processes started.
    ias-instance id=home.CALTP8BB32.cts.com
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    ias-component/process-type/process-set:
    default_group/home/default_group/
    Error
    --> Process (index=1,uid=301928631,pid=2944)
    failed to start a managed process after the maximum retry limit
    Log:
    D:\product\SOASuite\opmn\logs\\default_group~home~default_group~1.log
    --------------------------------------------------------------+---------
    ias-component | process-type | pid | status
    --------------------------------------------------------------+---------
    OC4JGroup:default_group | OC4J:home | N/A | Down
    ASG | ASG | N/A | Down
    Please let me know where am I going wrong?
    Thanks,
    Mandrita.

  • Enabling SSL in oracle EBS 12.0.6

    Dear All,
    I want to enable SSL (secure socket layer). in oracle ebs R12,
    Application is 12.0.6
    Web/Apache server is 10.1.3
    Form and reports server 10.1.2
    Database server 10.2.0.4.0
    there is required any upgrade patch before enable ssl ?
    Thanks & Regards
    Ravi Kumar

    Hi Ravi,
    This is a duplicated thread, and you have raised a similar thread before..
    Enabling SSL in oracle EBS 12.0.6
    there is required any upgrade patch before enable ssl ?
    You environment will support configuring SSL.
    Please see note:
    Enabling SSL in Oracle E-Business Suite Release 12 (Doc ID 376700.1)
    Best Regards,

  • How to enable SSL in oracle 11i

    HI
    1)How to enable SSL in oracle 11i
    2)How do I make an oralce 11i instance available on the internet
    can some one suggest the procedure and the metalink doc or forums that can be referred to for better understanding and using the applcaitons
    Regrads

    Refer to the following notes:
    Note: 123718.1 - 11i: A Guide to Understanding and Implementing SSL for Oracle Applications
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=123718.1
    Note: 217368.1 - Advanced Configurations and Topologies for Enterprise Deployments of E-Business Suite 11i
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=217368.1
    Note: 229335.1 - Best Practices For Securing Oracle E-Business Suite 11i For Internet Access
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=229335.1

  • How to deploy Oracle Forms & Reports in Weblogic Server 11g (10.3)?

    Hi
    How to deploy Oracle Forms & Reports in Weblogic Server 11g (10.3)?
    Thanks

    Hi
    when i am going through your bleow link.
    I am not able understand the 3.3.1 step :2
    http://download.oracle.com/docs/cd/E15523_01/web.1111/e10240/basics.htm#i1010040
    edit this file in the Web Configuration,
    configuration of an application called "my_application" with a form module called "form=hrapp.fmx":
    can deploy only.fmx file ?
    if not how to find the realation between my_application and hrapp.fmx ?
    Thanks in Adavance
    Regards
    Ram

  • Can not deploy a report using JDBC connection on CR2008 Server

    Hi Group,
    I have a report created with JDBC connection. When I tried to add it to CR2008 server, it gives an error - "An unexpected error has occurred ". Basically I want to add a report to a public folder via CMC. I am using adminstrator account.
    Then I thought I need to add JDBC driver into CR2008 server. so I put oracle jdbc jar into CR2008 server classpath and add JDBC connection info into CRConfig.xml. but I still got the same error.
    I also tried:
    - Change the report to use native Oracle driver rather than JDBC. The deployment succeeded (but this is not what I want)
    - Add a data source connection via Business View Manager, but no luck.
    I know how to use/change jdbc connection with programtic way, but I just want to know if I want to use built-in components in CR2008 server without any coding the reports can be deployed and managed.
    Thanks in advance.
    Dennis

    Hello Will,
    Crystal Reports supports connections to JDBC/JNDI out of the box, and have done so for a while, whether stand-alone or published to Enterprise.
    To specify where the server would search for the JDBC driver jar files, you'd change the classpath tag found in the CRConfig.xml file found on the machine where the Crystal Reports Page or Job Server is running. 
    For early Crystal Enterprise 10 and before, it used Java Native Interface (JNI) to start the Java process to retrieve the data from the JDBC connection.
    For later Crystal Enterprise 10 and later, it starts off a "Java Server" process, and communicates to the Crystal Reports process via CORBA TCP/IP connection.
    Commonissues that may arise:  (1) CRConfig.xml not configured properly, (2) unable to start or communicate to the "Java Server" because of permissions or firewall.
    Note that this is a separate connectivity map from using ADO or ADO.NET.
    Sincerely,
    Ted Ueda

  • Oracle 11G fusion middleware weblogic server

    Can anyone help me to know all about oracle 11G fusion middleware weblogic server.
    Please provide me soft stdy material links.
    prompt reply really appriciated.
    Regards
    Piku

    http://download.oracle.com/docs/cd/E17904_01/index.htm

  • Connect to weblogic Server's JVM

    Hello everybody,
    I´m trying connect to weblogic server´s JVM to execute a class inside the jar.
    It works fine, but my jar has a class with static atributes that I want change its values calling the following command line:
    %JAVA_HOME%\bin\java -Djavax.naming.Context.INITIAL_CONTEXT_FACTORY=weblogic.jndi.WLInitialContextFactory -Djavax.naming.Context.PROVIDER_URL=t3://localhost:7001 -jar %_APP_HOME%\WEB-INF\lib\AdminServer.jar -1
    Afer it the values of my class atribute has changed but my web application does not see this news values.
    I thinking... Am I connected to weblogic server´s JVM ?
    Could Anyone help me?

    You need to take a step back and think about what you're trying to achieve, Denilson.
    Using static attributes in classes has all sorts of side-effects because of how classloaders work in J2EE - if you're referencing a class used inside the web application and poking a static property, what is most likely happening is that your local application is loading the class in its own classloader, modifying the property, and then exiting. A separate copy of the class has been loaded by the web application.
    You can see more information on classloaders here: http://edocs.bea.com/wls/docs81/programming/classloading.html#1089798
    If you want to run an application to change some value on the server, there are a number of options available:
    - getting, changing and replacing an object in the JNDI tree (this is still an ugly solution)
    - using a servlet or stateless session bean to get the job done (this is a better solution - simple, but still not as good as you could potentially get)
    I'd suggest using a servlet to modify an attribute scoped at the web application level as a lightweight way to do what you're trying to. <i>(if I'm understanding what your goal is correctly)</i>. That way you could test making changes with your browser, not just a Java application.
    Does any of that help?
    <br>
    Kevin Powe
    http://www.integral-techsolutions.com

  • Differnce Between Oracle 9i And MS SQL Server 2000

    Hi,
    What are the difference between Oracle 9i And MS SQL Server 2000.
    Thnaks

    Some links
    http://www.google.lv/search?hl=lv&q=oracle+sql+server+difference&meta=
    http://asktom.oracle.com/pls/asktom/f?p=100:1:487512552646613::NO:RP::
    http://www.mssqlcity.com/Articles/Compare/sql_server_vs_oracle.htm
    http://www.wisdomforce.com/dweb/resources/docs/MSSQL2005_ORACLE10g_compare.pdf
    But you have to remember one big thing - I've not seen yet one compare that was completely indifferent to any of the included DB's. So you can be sure that every doc that you get on MS website will say that SQL server is better, every doc on Oracle website will say that Oracle is better. Every doc on other websites will say that better DB either is:
    1) DB that has payed for the reserach paper
    2) DB that was mostly used by the researchers
    So of course you should be very cautious about each paper you get.
    Gints Plivna
    http://www.gplivna.eu

  • Compatibility issues between solaris 10 patches and Weblogic server 9.2

    Is there any documentation about possible incompatibility between certain solaris patches and Weblogic server?

    Hi,
    Can you post the output of below commands from your OS?
    uname -a
    getconf LONG_BIT
    Do you want to download and install 64-bit WLS 9.2 on your OS?
    - - Tarun

  • VB/Delphi connectivity to Weblogic server

    We have a application server currently running on BEA's Weblogic Server 6.0.
    In addition to my webclients built using JSP Servlet etc., I would like to
    build a intranet application using either Microsoft Visual Basic or Borland
    Delphi or any other front end tool. Is there a way to have my application
    build thus to connect to Weblogic server?
    Thanks and appreciate any help.
    Raj George

    Check out Jintegra from Linar.com.
    Michael Girdley
    BEA Systems
    Learning WebLogic? http://learnweblogic.com
    "Raj George" <[email protected]> wrote in message
    news:3b0da123$[email protected]..
    We have a application server currently running on BEA's Weblogic Server6.0.
    In addition to my webclients built using JSP Servlet etc., I would like to
    build a intranet application using either Microsoft Visual Basic orBorland
    Delphi or any other front end tool. Is there a way to have my application
    build thus to connect to Weblogic server?
    Thanks and appreciate any help.
    Raj George

  • Differences between Oracle JDBC Thin and Thick Drivers

    If any body is looking for this information...
    ============================================================
    I have a question concerning the Oracle JDBC thin vs. thick drivers
    and how they might affect operations from an application perspective.
    We're in a Solais 8/Oracle 8.1.7.2 environment. We have several
    applications on several servers connecting to the Oracle database.
    For redundancy, we're looking into setting up TAF (transparent
    application failover). Currently, some of our apps use the Oracle
    <B>JDBC thin</B> drivers to talk to the database, with a connection
    string that like this:
    <B> jdbc:oracle:thin:@host:port:ORACLE_SID </B>
    In a disaster recovery mode, where we would switch the database
    from one server to another, the host name in the above string
    would become invalid. That means we have to shut down our application
    servers and restart them with an updated string.
    Using the Oracle <B>OCI (thick)</B> driver though, allows us to connect
    to a Net8 service instead of a specific server:
    <B> jdbc:oracle:oci8:@NET8_SERVICE_NAME </B>
    Coupled with the FAILOVER=ON option configured in Net8, it is
    then possible to direct a connection from the first server to
    the failover database on another server. This is exactly what
    we would like to do.
    My question is, from an application perspective, how is the Oracle
    thick driver different from the thin driver? If everything
    else is "equal" (i.e. the thick driver is compatible with the
    app servers) would there be something within the the thick/OCI
    driver that could limit functionality vs. the thin driver?
    My understand, which obviously is sketchy, is that the thick
    driver is a superset of the thin driver. If this is the case,
    and for example if all database connections were handled through
    a configuration file with the above OCI connection string, then
    theoretically the thick driver should work.
    ============================================================
    <B>
    In the case with the Oracle, they provide a thin driver that is a 100% Java driver for client-side use without the need of an Oracle installation (maybe that's why we need to input server name and port number of the database server). This is platform indipendent, and has good performance and some features.
    The OCI driver on the other hand is not java, require Oracle installation, platform dependent, performance is faster, and has a complete list of all the features.
    </B>
    ========================================================
    I hope this is what you expect.
    JDBC OCI client-side driver: This is a JDBC Type 2 driver that uses Java native methods to call entrypoints in an underlying C library. That C library, called OCI (Oracle Call Interface), interacts with an Oracle database. <B>The JDBC OCI driver requires an Oracle (7.3.4 or above) client installation (including SQL*Net v2.3 or above) and all other dependent files.</B> The use of native methods makes the JDBC OCI driver platform specific. Oracle supports Solaris, Windows, and many other platforms. This means that the Oracle JDBC OCI driver is not appropriate for Java applets, because it depends on a C library to be preinstalled.
    JDBC Thin client-side driver: This is a JDBC Type 4 driver that uses Java to connect directly to Oracle. It emulates Oracle's SQL*Net Net8 and TTC adapters using its own TCP/IP based Java socket implementation. <B>The JDBC Thin driver does not require Oracle client software to be installed, but does require the server to be configured with a TCP/IP listener. Because it is written entirely in Java, this driver is platform-independent.</B> The JDBC Thin driver can be downloaded into any browser as part of a Java application. (Note that if running in a client browser, that browser must allow the applet to open a Java socket connection back to the server.
    JDBC Thin server-side driver: This is another JDBC Type 4 driver that uses Java to connect directly to Oracle. This driver is used internally by the JServer within the Oracle server. This driver offers the same functionality as the client-side JDBC Thin driver (above), but runs inside an Oracle database and is used to access remote databases. Because it is written entirely in Java, this driver is platform-independent. There is no difference in your code between using the Thin driver from a client application or from inside a server.
    ======================================================
    How does one connect with the JDBC Thin Driver?
    The the JDBC thin driver provides the only way to access Oracle from the Web (applets). It is smaller and faster than the OCI drivers, and doesn't require a pre-installed version of the JDBC drivers.
    import java.sql.*;
    class dbAccess {
    public static void main (String args []) throws SQLException
    DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection
    ("jdbc:oracle:thin:@qit-uq-cbiw:1526:orcl", "scott", "tiger");
    // @machineName:port:SID, userid, password
    Statement stmt = conn.createStatement();
    ResultSet rset = stmt.executeQuery("select BANNER from SYS.V_$VERSION");
    while (rset.next())
    System.out.println (rset.getString(1)); // Print col 1
    stmt.close();
    How does one connect with the JDBC OCI Driver?
    One must have Net8 (SQL*Net) installed and working before attempting to use one of the OCI drivers.
    import java.sql.*;
    class dbAccess {
    public static void main (String args []) throws SQLException
    try {
    Class.forName ("oracle.jdbc.driver.OracleDriver");
    } catch (ClassNotFoundException e) {
    e.printStackTrace();
    Connection conn = DriverManager.getConnection
    ("jdbc:oracle:oci8:@qit-uq-cbiw_orcl", "scott", "tiger");
    // or oci7 @TNSNames_Entry, userid, password
    Statement stmt = conn.createStatement();
    ResultSet rset = stmt.executeQuery("select BANNER from SYS.V_$VERSION");
    while (rset.next())
    System.out.println (rset.getString(1)); // Print col 1
    stmt.close();
    =================================================================

    Wow, not sure what your question was, but there sure was a lot of information there...
    There really is only one case where failover occurs, and it would not normally be in a disaster recovery situation, where you define disaster recovery as the obliteration of your current server farm, network and concievably the operational support staff. This would require a rebuild of your server, network etc and isn't something done with software.
    Fail over is normally used for high availablity that would take over in case of hardware server failure, or when your support staff wants to do maintenance on the primary server.
    Using the thin and thick driver should have ZERO affect on a failover. Transparent failover will make the secondary server the same IP as the primary, therefore the hostname will still point to the appropriate server. If you are doing this wrong, then you will have to point all your applications to a new IP address. This should be something that you tell your management is UNACCEPTABLE in a fail-over situation, since it is almost sure to fail to fail-over.
    You point out that you are providing the TNSNAME, rather than the HOSTNAME when using the thick driver. That's true within your application, but that name is resolved to either a HOSTNAME, or IP ADDRESS before it is sent to the appropriate Oracle server/instance. It is resolved using either a NAME server (same as DNS server but for Oracle), or by looking at a TNSNAMES file. Since the TNSNAMES files profilerate like rabbits within an organization you don't want a fail over that will make you find and switch all the entries, so you must come up with a fail over that does not require it.
    So, the application should not be concerned with either the hostname, or the IP address changing during fail over. That makes use of the thin or thick client acceptable for fail over.
    Don't know if this will help, but this shows the communication points.
    THIN DRIVER
    client --> dns --> server/port --> SID
    THICK DRIVER
    client --> names server --> dns --> server/port --> SID
    client --> tnsnames     --> dns --> server/port --> SID

  • 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

Maybe you are looking for

  • Use of Address() and Indirect()

    I'm having some trouble getting the usage of address() and indirect() to work. I have the following table (shown below) and I'm trying to compute sum of sales from January to a variable month. The row corresponding to the month is filled in the cell

  • FCP quit after capture in HDV

    Hello I want to capture in HDV1080i50 and I have all settings correct but the application Final Cut quits after the capture. Any advice ? Thank you !

  • Strut tags

    Any reasons why struts tags don't get processed? Here is the code placed in a JSP: <html:form action="/commitcancel"> <html:hidden property="billOrderMaterial" value="<%=request.getParameter("billOrderMaterial")%>"/>      <html:hidden property="useCu

  • NI Developer Suite 2009第1四半期について

    NI Developer Suite 2009第1四半期をインストールしたいのですが. インストールできるものが多すぎてよくわかりません. 研究室で使用するもので.物理量の測定とプログラムができれば 問題はないのですが.どれをインストールしたらいいか教えてください. あと.これはインストールしていた方が便利というものがあれば. それも教えてください.

  • How to get my videos from my Aiptek to iMovie.

    I am trying to import a video from my aiptek video camcorder into iMovie, but whenever i plug my camera into my mac with a usb port nothing shows up. When i go into the folder there is the files of my videos but they will only open in text edit, with