Jdbc oracle jdbc-thin driver subname

I am working on Windows 2000 environment, using oracle8i 8.1.7 JDBC-Thin driver for use with JDK 1.2.x. The oralce8i 8.1.7 database is on another linux box. I can access the linux box through its ip address, but not by its hostname since it's not accessiable by the dns server. In my code, in the JDBCUrl, I used ip address instead of the hostname, e.g. "jdbc:oracle:thin:@10.0.113.108:1521:ora1". But I got the error like: "java.sql.SQLException: Io exception: The Network Adapter could not establish the connection". If I add a entry in my working machine's hosts file to map the hostname, I can fix the problem. But I don't know if this is the solution, or there is other better solutions.
Thanks
null

Using a hosts file entry is a common solution for problem where the dns lookup does not contain an entry for a RDBMS server platform.
The real solution is to resolve this issue :
"where the dns lookup does not contain an entry for a RDBMS server platform."

Similar Messages

  • How to config the CLASSPATH in Win2000 server for JDBC(oracle.jdbc.driver,*)

    I am using the OS: Win2000 Server.I need to connect to some remote DataBase,but I
    don't know how to config the driver in the CLASSPATH environment variable, my Problem is: when I import the oracle.jdbc.driver.OracleDriver ,and run the program, it warns to me that it cannot find the class,and i know i didnot config the CLASSPATH in environment variables, so I want someone to tell me how to config it ,and where should the file "class12.zip" be placed !
    Thank you! maybe the problem is a piece of cake for you ,but now i do not know how to deal with it!

    Hi ,
    try this,
    http://myjdbc.tripod.com/basic/jdbcurl.html
    Regards
    Elango.

  • How to use a custom KeyManager for Oracles JCBD thin driver

    I am trying to create a java application that uses PKI for authentication. I need to be able to retrieve a certificate from the Microsoft Certificate Store MCS) and pass it along to an Oracle database (11.2). I am connecting using the jdbc:oracle:thin driver. After spending some time googlling it appears that I have to create a custom KeyManager and a custom TrustManager to accomplish this. I am not sure if this is even the correct way to approach the problem, but assuming it is; how do I force the jdbc:oracle:thin driver to use my KeyManager and TrustManager? Also, as stated above the client certificates will be stored in the MCS while the Oracle database will be using a wallet. The database could be running on just about any OS that supports Oracles database which is why I will not be setting up Oracle to use MCS.
    Thanks for the help!

    I am trying to create a java application that uses PKI for authentication. I need to be able to retrieve a certificate from the Microsoft Certificate Store MCS) and pass it along to an Oracle database (11.2). I am connecting using the jdbc:oracle:thin driver. After spending some time googlling it appears that I have to create a custom KeyManager and a custom TrustManager to accomplish this. I am not sure if this is even the correct way to approach the problem, but assuming it is; how do I force the jdbc:oracle:thin driver to use my KeyManager and TrustManager? Also, as stated above the client certificates will be stored in the MCS while the Oracle database will be using a wallet. The database could be running on just about any OS that supports Oracles database which is why I will not be setting up Oracle to use MCS.
    Thanks for the help!

  • Weblogic jDriver for oracle/xa thin driver configuration

              Hi,
              I try to configure an XA thin connection pool to oracle.
              Using the configuration from page 16-11 of adminguide.pdf,
              the start is with the error "No suitable driver".
              The driver is configured like that:
              DriverClassname=oracle.jdbc.xa.client.OracleXADataSource
              Also, with the classes12.zip for oracle 8.1.7 for jdk1.2 taken from oracle site,
              before weblogic.jar in classpath, same error:(.
              The error:
              <Jan 14, 2001 2:22:01 PM EET> <Error> <JDBC> <Cannot startup connection pool "OracleJDBCTxConnectionPool"
              weblogic.common.ResourceException: java.sql.SQLException: No suitable driver
                   at java.sql.DriverManager.getConnection(DriverManager.java:537)
                   at java.sql.DriverManager.getConnection(DriverManager.java:177)
                   at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:111)
                   at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPhysicalConnection(OracleConnectionPoolDataSource.java:88)
                   at oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.java:68)
                   at weblogic.jdbc.common.internal.XAConnectionEnvFactory.makeConnection(XAConnectionEnvFactory.java:194)
                   at weblogic.jdbc.common.internal.XAConnectionEnvFactory.createResource(XAConnectionEnvFactory.java:54)
                   at weblogic.common.internal.ResourceAllocator.makeResources(ResourceAllocator.java:707)
                   at weblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.java:306)
                   at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.java:679)
                   at weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:109)
                   at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
                   at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:279)
                   at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:233)
                   at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:193)
                   at java.lang.reflect.Method.invoke(Native Method)
                   at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:587)
                   at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:573)
                   at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:319)
                   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
                   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
                   at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:437)
                   at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:178)
                   at $Proxy41.updateDeployments(Unknown Source)
                   at weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(ServerMBean_CachingStub.java:2571)
                   at weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(ApplicationManager.java:333)
                   at weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManager.java:149)
                   at java.lang.reflect.Method.invoke(Native Method)
                   at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:587)
                   at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:573)
                   at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:319)
                   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
                   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
                   at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:437)
                   at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:178)
                   at $Proxy34.start(Unknown Source)
                   at weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(ApplicationManagerMBean_CachingStub.java:479)
                   at weblogic.management.Admin.startApplicationManager(Admin.java:1098)
                   at weblogic.management.Admin.finish(Admin.java:520)
                   at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:473)
                   at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:198)
                   at weblogic.Server.main(Server.java:35)
                   at weblogic.jdbc.common.internal.XAConnectionEnvFactory.makeConnection(XAConnectionEnvFactory.java:203)
                   at weblogic.jdbc.common.internal.XAConnectionEnvFactory.createResource(XAConnectionEnvFactory.java:54)
                   at weblogic.common.internal.ResourceAllocator.makeResources(ResourceAllocator.java:707)
                   at weblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.java:306)
                   at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.java:679)
                   at weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:109)
                   at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
                   at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:279)
                   at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:233)
                   at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:193)
                   at java.lang.reflect.Method.invoke(Native Method)
                   at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:587)
                   at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:573)
                   at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:319)
                   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
                   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
                   at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:437)
                   at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:178)
                   at $Proxy41.updateDeployments(Unknown Source)
                   at weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(ServerMBean_CachingStub.java:2571)
                   at weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(ApplicationManager.java:333)
                   at weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManager.java:149)
                   at java.lang.reflect.Method.invoke(Native Method)
                   at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:587)
                   at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:573)
                   at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:319)
                   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
                   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
                   at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:437)
                   at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:178)
                   at $Proxy34.start(Unknown Source)
                   at weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(ApplicationManagerMBean_CachingStub.java:479)
                   at weblogic.management.Admin.startApplicationManager(Admin.java:1098)
                   at weblogic.management.Admin.finish(Admin.java:520)
                   at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:473)
                   at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:198)
                   at weblogic.Server.main(Server.java:35)
              >
              Thank you in advance.
              kind regards, adrian
              

              Hi,
              it works :) !
              Thank you,
              Adrian
              "John Harby" <[email protected]> wrote:
              >
              >Mine seems to work ok but I have classes12.zip after weblogic.jar.
              >
              >set CLASSPATH=.;.\lib\weblogic_sp.jar;.\lib\weblogic.jar;.C:\oracle\ora81\jdbc\l
              >ib\classes12.zip;.\config\examples\serverclasses
              >
              >
              >"adrian balaban" <[email protected]> wrote:
              >>
              >>Hi,
              >>
              >>I try to configure an XA thin connection pool to oracle.
              >>
              >>Using the configuration from page 16-11 of adminguide.pdf,
              >>the start is with the error "No suitable driver".
              >>
              >>The driver is configured like that:
              >>DriverClassname=oracle.jdbc.xa.client.OracleXADataSource
              >>
              >>Also, with the classes12.zip for oracle 8.1.7 for jdk1.2 taken from
              >oracle
              >>site,
              >>before weblogic.jar in classpath, same error:(.
              >>
              >>The error:
              >>
              >><Jan 14, 2001 2:22:01 PM EET> <Error> <JDBC> <Cannot startup connection
              >>pool "OracleJDBCTxConnectionPool"
              >>weblogic.common.ResourceException: java.sql.SQLException: No suitable
              >>driver
              >>     at java.sql.DriverManager.getConnection(DriverManager.java:537)
              >>     at java.sql.DriverManager.getConnection(DriverManager.java:177)
              >>     at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:111)
              >>     at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPhysicalConnection(OracleConnectionPoolDataSource.java:88)
              >>     at oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.java:68)
              >>     at weblogic.jdbc.common.internal.XAConnectionEnvFactory.makeConnection(XAConnectionEnvFactory.java:194)
              >>     at weblogic.jdbc.common.internal.XAConnectionEnvFactory.createResource(XAConnectionEnvFactory.java:54)
              >>     at weblogic.common.internal.ResourceAllocator.makeResources(ResourceAllocator.java:707)
              >>     at weblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.java:306)
              >>     at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.java:679)
              >>     at weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:109)
              >>     at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
              >>     at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:279)
              >>     at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:233)
              >>     at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:193)
              >>     at java.lang.reflect.Method.invoke(Native Method)
              >>     at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:587)
              >>     at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:573)
              >>     at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:319)
              >>     at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
              >>     at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
              >>     at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:437)
              >>     at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:178)
              >>     at $Proxy41.updateDeployments(Unknown Source)
              >>     at weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(ServerMBean_CachingStub.java:2571)
              >>     at weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(ApplicationManager.java:333)
              >>     at weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManager.java:149)
              >>     at java.lang.reflect.Method.invoke(Native Method)
              >>     at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:587)
              >>     at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:573)
              >>     at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:319)
              >>     at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
              >>     at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
              >>     at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:437)
              >>     at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:178)
              >>     at $Proxy34.start(Unknown Source)
              >>     at weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(ApplicationManagerMBean_CachingStub.java:479)
              >>     at weblogic.management.Admin.startApplicationManager(Admin.java:1098)
              >>     at weblogic.management.Admin.finish(Admin.java:520)
              >>     at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:473)
              >>     at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:198)
              >>     at weblogic.Server.main(Server.java:35)
              >>
              >>     at weblogic.jdbc.common.internal.XAConnectionEnvFactory.makeConnection(XAConnectionEnvFactory.java:203)
              >>     at weblogic.jdbc.common.internal.XAConnectionEnvFactory.createResource(XAConnectionEnvFactory.java:54)
              >>     at weblogic.common.internal.ResourceAllocator.makeResources(ResourceAllocator.java:707)
              >>     at weblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.java:306)
              >>     at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.java:679)
              >>     at weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:109)
              >>     at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
              >>     at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:279)
              >>     at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:233)
              >>     at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:193)
              >>     at java.lang.reflect.Method.invoke(Native Method)
              >>     at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:587)
              >>     at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:573)
              >>     at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:319)
              >>     at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
              >>     at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
              >>     at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:437)
              >>     at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:178)
              >>     at $Proxy41.updateDeployments(Unknown Source)
              >>     at weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(ServerMBean_CachingStub.java:2571)
              >>     at weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(ApplicationManager.java:333)
              >>     at weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManager.java:149)
              >>     at java.lang.reflect.Method.invoke(Native Method)
              >>     at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:587)
              >>     at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:573)
              >>     at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:319)
              >>     at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
              >>     at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
              >>     at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:437)
              >>     at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:178)
              >>     at $Proxy34.start(Unknown Source)
              >>     at weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(ApplicationManagerMBean_CachingStub.java:479)
              >>     at weblogic.management.Admin.startApplicationManager(Admin.java:1098)
              >>     at weblogic.management.Admin.finish(Admin.java:520)
              >>     at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:473)
              >>     at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:198)
              >>     at weblogic.Server.main(Server.java:35)
              >>>
              >>
              >>Thank you in advance.
              >>
              >>kind regards, adrian
              >
              

  • I am unable to connect to oracle using thin driver

    Hi,
    I am writing a program to connecto database using thih driver,by using ipadress of server where oracle 8i is installed.I am getting an error
    Exception in thread "main" java.sql.SQLException: No suitable driver
    How to over come this.Any one please help me.

    I am getting error saying No suitable driver found
    this is my function:
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection cn=DriverManager.getConnection("jdbc:oracle:thin:@192.168.1.112:1521:orcle8i","scott","tiger");
    oracle 8i is my database name.I have created another database name with oracle in the server. will it cause any problem.

  • 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?

  • BLOB insert behavior with thin driver using standard JDBC2.0 and ORACLE-JDBC2.0API

    We have a problem with a BLOB insert to an oracle 8.1.7 DB using Oracle 8.1.7 JDBC thin driver.We get socket read/write error after inserting 32k of data using the standard JDBC2.0 API but using the Oracle JDBC2.0API (using OracleResultSet) it goes fine. We have a requirement to use the standard JDBC2.0 so that our code works with multiple database vendors. Is there another way to get in the blob data with standard JDBC API & using thin driver...?
    thanks,
    Madhu
    Here is my sample test program that does both standard & oracle specific JDBC Blob test insert.
    import java.sql.*;
    import java.io.*;
    import oracle.sql.BLOB;
    import oracle.jdbc.driver.OracleResultSet;
    public class testBLOB {
    //trying to insert a huge file to a BLOB
    static String fileName = "/kernel/genunix";
    public static void main(String[] args) {
    String driverName = "oracle.jdbc.driver.OracleDriver";
    String dbURL = "jdbc:oracle:thin:@localhost:1521:test"; //thin driver
    String user = "BlobTest";
    String passwd = "BlobTest";
    Connection con=null;
    try {
    Class.forName(driverName);
    con=DriverManager.getConnection(dbURL, user,passwd);
    catch (Exception e) {
    e.printStackTrace();
    close(con);
    int i = 0;
    while (i < args.length) {
    if (args.equals("-f"))
    fileName = args[++i];
    i++;
    System.out.println("The file being Stored is: "+fileName);
    createTable(con);
    insertUsingOracleAPI(con);
    insertUsingJDBC20API(con);
    //readDB(con);
    static String getFileName() {
    return fileName;
    public static void close(Connection con) {
    try {
    if (con != null) {
    con.close();
    catch (Exception e) {
    System.exit(-1);
    public static void createTable(Connection con) {
    Statement stmt ;
    try {
    stmt = con.createStatement();
    stmt.execute("DROP TABLE basic_blob_table");
    stmt.close();
    catch (SQLException sqlEx) {
    System.out.println("Dropped the Table");
    try {
    stmt = con.createStatement();
    stmt.execute("CREATE TABLE basic_blob_table ( x varchar2(30), b blob)");
    stmt.close();
    catch (SQLException sqlEx) {
    sqlEx.printStackTrace();
    close(con);
    System.out.println("Created the Table");
    public static void insertUsingOracleAPI(Connection con) {
    OutputStream os = null;
    Statement stmt = null;
    ResultSet rs = null;
    FileInputStream is = null;
    try {
    con.setAutoCommit(false);
    stmt = con.createStatement();
    stmt.execute("INSERT INTO basic_blob_table VALUES( 'OracleAPI', empty_blob())");
    System.out.println("Inserted the dummy Row");
    rs = stmt.executeQuery("Select * from basic_blob_table where x='OracleAPI'");
    if (rs != null && rs.next()) {
    BLOB blob = ((OracleResultSet)rs).getBLOB(2);
    File file = new File(getFileName());
    is = new FileInputStream(file);
    os = blob.getBinaryOutputStream();
    byte[] chunk = new byte[1024];
    int length = -1;
    while((length = is.read(chunk)) != -1)
    os.write(chunk, 0,length);
    System.out.println("Inserted the File " + getFileName() );
    catch (Exception e) {
    e.printStackTrace();
    finally {
    try {
    if (os != null) {
    os.flush();
    os.close();
    if (is != null)
    is.close();
    stmt.close();
    con.commit();
    con.setAutoCommit(true);
    catch (Exception e) {}
    public static void insertUsingJDBC20API(Connection con) {
    PreparedStatement stmt = null;
    FileInputStream is = null;
    try {
    stmt = con.prepareStatement("INSERT INTO basic_blob_table VALUES(?,?)");
    File file = new File(getFileName());
    is = new FileInputStream(file);
    stmt.setString(1,"JDBC20API");
    stmt.setBinaryStream(2,is,(int)file.length());
    stmt.executeUpdate();
    catch (Exception e) {
    e.printStackTrace();
    finally {
    try {
    if (is != null)
    is.close();
    stmt.close();
    catch (Exception e) {}
    null

    Thanks for the response.
    I understand what you are saying...
    that readers don't block writers in Oracle (the same is true in SQL Server 2000).
    However, I don't see how my test case is working correctly with Oracle (the exact same code acting as I'm thinking it should with SQL Server, but I still think it is acting incorrectly with Oracle).
    I have transaction A do this:
    update <table> set <column2>=<value> where <column1>='1'
    then I use Thread.sleep() to make that program hang around for a few minutes.
    Meanwhile I sneak off and start another program which begins transaction B. I have transaction B do this:
    select * from <table> where <column1>='1'
    and the read works immediately (no blocking... just as you have said) however, transaction A is still sleeping, it has not called commit() or rollback() yet.
    So what if transaction A were to call rollback(), the value read by transaction B would be incorrect wouldn't it ?
    Both A and B use setAutoCommit(false) to start their transactions, and then call setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED).
    Isn't that supposed to guarantee that a reader can only read what is committed ?
    And if a row is in "flux"... in the process of having one or more values changed, then the database cannot say what the value will be ?
    I can almost see what you are saying.
    In letting the reader have what it wants without making it wait, I suppose it could be said that Oracle is holding true to the "only let committed data be read"
    So if that's it, then what if I want the blocking ?
    I want an entire row to be locked until whoever it in the middle of updating, adding, or removing it has finished.
    Do you know if that can be done with Oracle ? And how ?
    Thanks again for helping me.

  • Connection Problem using oracle.jdbc.xa.client.OracleXADataSource

    Unable to get a connection from connection pool Realm1tx
    Actually there are 5 connection intialized but no connection is there in active pool.Sometimes when I
    go to weblogic console and refresh the connection comes alive temporarily.Can anyone help me out for
    fixing this problem
    Driver Used:
    oracle.jdbc.xa.client.OracleXADataSource
    Error Message
    Unknown error occurred: XA error: XAER_RMERR : A resource manager error has occured in the transaction
    branch start() failed on resource 'realm1tx' null sql=[SELECT Person$1.id,NULL,Person$1.id,NULL,NULL
    FROM Person Person$1 WHERE (Per
    son$1.securityId = 'admin')] throttle=[-1]
    java.sql.SQLException: XA error: XAER_RMERR : A resource manager error has occured in the transaction
    branch start() failed on resource 'realm1tx' null
    Thanks in advance.
    Ragavendra.

    Which version of oracle thin driver are you using? Oracle 920 thin driver has some issues.
    Thanks,
    Mitesh
    Ragavendra wrote:
    Unable to get a connection from connection pool Realm1tx
    Actually there are 5 connection intialized but no connection is there in active pool.Sometimes when I
    go to weblogic console and refresh the connection comes alive temporarily.Can anyone help me out for
    fixing this problem
    Driver Used:
    oracle.jdbc.xa.client.OracleXADataSource
    Error Message
    Unknown error occurred: XA error: XAER_RMERR : A resource manager error has occured in the transaction
    branch start() failed on resource 'realm1tx' null sql=[SELECT Person$1.id,NULL,Person$1.id,NULL,NULL
    FROM Person Person$1 WHERE (Per
    son$1.securityId = 'admin')] throttle=[-1]
    java.sql.SQLException: XA error: XAER_RMERR : A resource manager error has occured in the transaction
    branch start() failed on resource 'realm1tx' null
    Thanks in advance.
    Ragavendra.

  • Using oracle thin driver from Weblogic server 6.1

    Hi
    I need to know which driver is best for establishing JDBC Connection i.e.
    whether to use JDriver provided with Weblogic or to go using Oracle thin driver.
    Can some one tell the detailed procedure involved in configuring oracle thin driver
    in Weblogicserver 6.1.
    Thanks in advance,
    S Gopikrishna

    I would recommend using the thin driver where ever possible, their are
    certain problems with thin driver which are more in the area of XA support
    you can check weblogic documentation for pointers on this. Oracles latest
    thin driver is pretty stable as they have fixed a bunch of problems.
    heres how to use thin driver:
    create the connection pool using the following url
    jdbc:oracle:thin:@<mc-name or ip-address>:<port-no>:<oracle sid>
    and driver: oracle.jdbc.driver.OracleDriver
    You dont have to install the thin driver its bundled with the product.
    hth
    sree
    "S Gopikrishna" <[email protected]> wrote in message
    news:3c34a0e5$[email protected]..
    Hi
    I need to know which driver is best for establishing JDBC Connection
    i.e.
    whether to use JDriver provided with Weblogic or to go using Oracle thin
    driver.
    Can some one tell the detailed procedure involved in configuring oracle thin
    driver
    in Weblogicserver 6.1.
    Thanks in advance,
    S Gopikrishna

  • Oracle proxy authetication and thin driver

    Hello,
    I am using 10g, and bea 81 sp3, I am trying to setup proxy authetication. All the references I find for proxy authetication are using OCI driver. Is proxy authetication supported using oracle 10g thin driver (ojdbc14.jar)? Can anyone tell me, what drivers are support proxy authetication under oracle 10g?
    Also application servers like bea will not give you oracledata source if you use bea to setup oracle connection pool, is there a easy work around that?
    appreciate,
    Shailesh

    Replace this line:
    DriverManager.registerDriver(new racle.jdbc.OracleDriver());with this one:
    Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();

  • 500 Internal Server Error java.lang.NoSuchFieldError:  oracle.jdbc.oci8.OCI

    I am running small SQLJ in a JSP to get the hang of it.
    I am running on 920, and have downloaded the new runtime classes for 920 and tested per the instructions.
    Using JDev 903, here is the private method for running a query ( It is from an article I found by Julie Basu at Oracle; I have played around with the empno/emp_no variable to convert it to an int):
    <%! private String runQuery(String emp_no) throws java.sql.SQLException {
    DefaultContext dctx =null;
    String ename = null; double sal = 0.0; String hireDate=null;
    StringBuffer sb = new StringBuffer();
    //int emp_no = Integer.parseInt(emp_no);
    try {
    dctx =Oracle.getConnection("jdbc:oracle:oci8:@olap","scott","tiger");
    #sql [dctx] { SELECT ename, sal, TO_CHAR(hiredate,'DD-MON-YYYY')
    INTO :ename,:sal,:hireDate
    FROM scott.emp WHERE empno=:emp_no
    sb.append("<BLOCKQUOTE><BIG><B><PRE>\n");
    sb.append("Name :"+ename+ "\n");
    sb.append("Salary :"+sal+ "\n");
    sb.append("Date hired :"+hireDate);
    sb.append("</PRE></B>></BIG></BLOCKQUOTE>");
    } catch (java.sql.SQLException e){
    sb.append("<P> SQL Error: <pre> "+e+" </pre> </p>\n");
    } finally {
    if (dctx!=null) dctx.close();
    return sb.toString();
    %>
    I keep getting the following error:
    java.lang.NoSuchFieldError: oracle.jdbc.oci8.OCIEnv.envCharSetId
         int oracle.jdbc.oci8.OCIEnv.get_env_handle()
              native code
         long oracle.jdbc.oci8.OCIEnv.getEnvHandle()
              OCIEnv.java:70
         oracle.jdbc.dbaccess.DBConversion oracle.jdbc.oci8.OCIDBAccess.logon(java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
              OCIDBAccess.java:390
         void oracle.jdbc.driver.OracleConnection.<init>(oracle.jdbc.dbaccess.DBAccess, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
              OracleConnection.java:361
         java.sql.Connection oracle.jdbc.driver.OracleDriver.getConnectionInstance(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
              OracleDriver.java:485
         java.sql.Connection oracle.jdbc.driver.OracleDriver.connect(java.lang.String, java.util.Properties)
              OracleDriver.java:337
         java.sql.Connection java.sql.DriverManager.getConnection(java.lang.String, java.util.Properties, java.lang.ClassLoader)
              DriverManager.java:517
         java.sql.Connection java.sql.DriverManager.getConnection(java.lang.String, java.lang.String, java.lang.String)
              DriverManager.java:177
         void sqlj.runtime.ref.ConnectionContextImpl.<init>(sqlj.runtime.ref.ProfileGroup, java.lang.String, java.lang.String, java.lang.String, boolean)
              ConnectionContextImpl.java:346
         void sqlj.runtime.ref.DefaultContext.<init>(java.lang.String, java.lang.String, java.lang.String, boolean)
              DefaultContext.java:172
         sqlj.runtime.ref.DefaultContext oracle.sqlj.runtime.Oracle.getConnection(java.lang.String, java.lang.String, java.lang.String, boolean)
              Oracle.java:580
         sqlj.runtime.ref.DefaultContext oracle.sqlj.runtime.Oracle.getConnection(java.lang.String, java.lang.String, java.lang.String)
              Oracle.java:609
         java.lang.String _SQLJ.runQuery(java.lang.String)
         [SQLJ.jsp]
              SQLJ.jsp:42
         void SQLJ.jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         [SQLJ.jsp]
              SQLJ.jsp:20
         void com.orionserver[Oracle9iAS (9.0.3.0.0) Containers for J2EE].http.OrionHttpJspPage.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              OrionHttpJspPage.java:56
              [SRC:/SQLJ.jsp]
         void oracle.jsp.runtimev2.JspPageTable.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String)
              JspPageTable.java:317
         void oracle.jsp.runtimev2.JspServlet.internalService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
              JspServlet.java:465
         void oracle.jsp.runtimev2.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
              JspServlet.java:379
         void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              HttpServlet.java:853
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              ServletRequestDispatcher.java:721
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(javax.servlet.ServletRequest, javax.servlet.http.HttpServletResponse)
              ServletRequestDispatcher.java:306
         boolean com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.ApplicationServerThread, com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.EvermindHttpServletRequest, com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.EvermindHttpServletResponse, java.io.InputStream, java.io.OutputStream, boolean)
              HttpRequestHandler.java:767
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(java.lang.Thread)
              HttpRequestHandler.java:259
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run()
              HttpRequestHandler.java:106
         void EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run()
              PooledExecutor.java:803
         void java.lang.Thread.run()
              Thread.java:484
    When I run it using just JDBC with the thin Driver, I have no problems.
    What could be the issue?
    Thanks,
    Scott Rappoport

    Fail to make OCI connection Using JDeveloper

  • Oracle thin driver

    Hi,
    Are there any problems while using Oracle's jdbc thin driver with Weblogic 6.1
    sp1?
    Is there a 9i version for Oracle thin driver?
    Regards
    Perumal

    Hi Vaidy,
    You should download the latest Oracle 9i thin driver from Oracles website
    and place it in the beginning of the classpath when you start the server. It
    is use it at your own risk, AFAIK make sure you dont use any 8.1.7 or 8.1.6
    driver specific calls in your application and it should work just fine. If
    you dont use Oracle extensions everything should be ok.
    hth
    sree
    "vaidy" <[email protected]> wrote in message
    news:[email protected]..
    Hi,
    Are there any problems while using Oracle's jdbc thin driver with Weblogic
    6.1
    sp1?
    Is there a 9i version for Oracle thin driver?
    Regards
    Perumal

  • Proxy Connection with thin driver

    Hello,
    I am using 10g, and bea 81 sp3, I am trying to setup proxy authetication. All the references I find for proxy authetication are using OCI driver. Is proxy authetication supported using oracle 10g thin driver (ojdbc14.jar)? Can anyone provide me an example using thin driver?
    appreciate any help,
    Shailesh

    See the following link for documentation on proxy authentication. http://download-uk.oracle.com/docs/cd/B19306_01/java.102/b14355/proxya.htm
    Also, the release note for 10gR2 JDBC driver installation includes the following text:
    Proxy Authentication
    In Oracle 10g R1 we introduced proxy authentication for the
    OCI driver. In this release we introduce a common proxy
    authentication api that is supported by both the Thin and
    OCI drivers. We strongly recommend that you use the common
    api instead of the OCI specific api.

  • Performance problems using WLS6.1 with the thin driver for Ora9i from OTN

    Hello everyone,
    Has anyone been experimenting with the thin driver for Oracle 9i under WLS6.1. I got it running, but
    I get extremely bad performance when having multiple concurrent accesses. It works more or less in
    single user mode. Also it seems not to support XA transactions?
    When could we expect the driver from BEA to be out?
    Thanks in advance!
    Samuel Kounev
    TU-Darmstadt, Germany

    I had done this from the very beginning, but I was still getting very bad performance under
    concurrent accesses. I even followed Sree's instructions and removed the old thin driver from
    weblogic.jar, but this didn't help. I am now trying to get the OCI driver for 9i running and hope
    this will solve the problem.
    Samuel
    Tamilselvan Ramasamy wrote:
    You have to use Oracle's Oracle 9i thin driver .
    put this driver infront of the classpath i.e before weblogic_sp.jar and
    weblogic.jar
    /selvan
    "Sree Bodapati" <[email protected]> wrote in message
    news:[email protected]..
    The BEA driver is available in WLS6.1SP2 which is GA.
    hth
    sree
    "Samuel Kounev" <[email protected]> wrote in message
    news:[email protected]..
    Hello everyone,
    Has anyone been experimenting with the thin driver for Oracle 9i under
    WLS6.1. I got it running, but
    I get extremely bad performance when having multiple concurrent accesses.
    It
    works more or less in
    single user mode. Also it seems not to support XA transactions?
    When could we expect the driver from BEA to be out?
    Thanks in advance!
    Samuel Kounev
    TU-Darmstadt, Germany

  • Proxy authetication using 10g thin driver

    Hello,
    I am using 10g, and bea 81 sp3, I am trying to setup proxy authetication. All the references I find for proxy authetication are using OCI driver. Is proxy authetication supported using oracle 10g thin driver (ojdbc14.jar)? Can anyone provide me an example using thin driver?
    appreciate any help,
    Shailesh

    Thanks annie..I googled it but didn't find this one..:-(
    I actaully wanted to implement proxy authetication using thin driver (no oci) but i can't figure out ...and all examples i saw were using thin driver..I found many articles which says that thin driver does support proxy authetication and I am using all latest (10g)..so..:-(
    appreciate any help
    Shailesh

Maybe you are looking for

  • Table in Smartforms cannot use data type CURR

    Hello everyone, I have trouble with Smartform in Main window , I want to show data in table. in main area of table . I want to show data of amount in document (BSEG-DMBTR) in text of main area. I add work area W_LINE_ITEM-DMBTR.(declare W_LINE_ITEM T

  • BPM 11g Worklist Replace User Selector

    Does anyone know of a way to use the BPM 11g Worklist Application but replace the User/Group selector for the assignment actions? We are looking for more of a tree type selector based on Organizations/Roles rather than a flat search. Thoughts?

  • FLV not playing from in directory

    We placed all our FLVs in a "video" directory so users can find them on CD/DVD if needed. (Our immediate goal is a CD, will be online later this year.) When publishing a SWF/htm, Captivate makes copies of all the FLVs and places them at the root. Jus

  • Multiple Clicks to save a file

    Hi! I have to click multiple times on the save button whenever i need to save a file from internet on my new ToushSmart 600 PC. The mouse is working fine with all other clicks but when i click on the save button on any file that i need to download fr

  • BO6: complex filter with data aggregates

    Hi, In BO 6.1 I have a report like this "name", "year", "value" Then I have made a variable : "A" = if count(<Year>) = 5 then 1 else 0 Now I want to display only the record that that have the variable "A" = 1 I tried to do a filter on "A" variable bu