Oracle 7 - JDBC Thin driver - connect - compatibility

When logging on to an Oracle server v.7.2.3.0.0 with JDBC-thin
driver (classes111.zip), I get the message:
ORA-01017 invalid username/ password; logon denied
even if the password, username and connection string is correct.
The connection worked OK until some work was performed on the
database and some changes with SQL*Net was done.
I thought the driver worked OK with all versions of SQL*Net
listeners?
The database can be connected to with SQL*Plus.
null

I have the same problem trying to connect to database cache on iAS with iAS.

Similar Messages

  • Jdbc thin driver connect oracle as internal

    I need to connect to Oracle as Internal using jdbc driver, is there a way we can do this using jdbc thin driver. Actually I don't want to pass username and password as it will be harcoded in a properties file.
    Please let me know.

    Hi Minol,
    Have a look at this code example that shows how to Connect to Database as internal ( as sysdba ). In this code sample the properties are hard-coded, you can supply these Properties by loading them from a properties file.
    Connecting to Oracle Database with DBA privileges
    http://myjdbc.tripod.com/basic/codeindex.html
    The code snippet to load properties from a properties file
    //Import IO related classes
    import java.io.IOException;
    // Necessary support classes
    import java.util.Properties;
    import java.util.Enumeration;
    import java.util.ResourceBundle;
       * This method reads a properties file which is passed as
       * the parameter to it and load it into a java Properties
       * object and returns it.
       * @param file File path
       * @return Properties The properties object
       * @exception IOException if loading properties file fails
       * @since 1.0
      public static Properties loadParams(String file)
          throws IOException {
        // Loads a ResourceBundle and creates Properties from it
        Properties     prop   = new Properties();
        ResourceBundle bundle = ResourceBundle.getBundle(file);
        // Retrieve the keys and populate the properties object
        Enumeration enum = bundle.getKeys();
        String      key  = null;
        while (enum.hasMoreElements()) {
          key = (String) enum.nextElement();
          prop.put(key, bundle.getObject(key));
        return prop;
      }Regards
    Elango.

  • Oracle JDBC Thin-Driver: Connection still valid (db still open)?

    Hi,
    I've got a problem with my program. The app opens a connection to an Oracle Database usingt the Oracle JDBC Thin.Driver. Everything works just fine but I can't figure out a way how to find out wheter the connection is still valid, e.g. if the database is still open?
    connection.isClosed() return always false :(
    Any help is appreciated.
    Thanks,
    Spaulding

    Hi oracle_guru,
    unfortunately it's not that easy. :(
    You can't just check for
    if(conn == null)since the connection won't realize when the db shuts down.
    Therefore I created a connection-watcher-thread which uses a prepared statement to check every once in while if the connection is still valid.
    Nevertheless, thanks for you reply,
    Spaulding

  • JDBC thin driver connection problems using cybersafe authentication

    Hi
    i am trying to use jdbc thin driver to connect to oracle 8.1.7 DB using ASO and cybersafe authentication.
    Question:
    Does the oracle jdbc thin driver in 8.1.7.0.0 support third-party authentication features supported by Oracle Advanced Security--such
    as those provided by RADIUS, Kerberos, or SecurID
    i am getting the following error.
    Exception in thread "main" java.sql.SQLException: invalid arguments in call
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java)
    at oracle.jdbc.dbaccess.DBError.check_error(DBError.java)
    at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
    va)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
    at java.sql.DriverManager.getConnection(DriverManager.java:517)
    at java.sql.DriverManager.getConnection(DriverManager.java:146)
    at ASOJdbc.main(ASOJdbc.java:43)
    Following is the program i am trying.
    public class ASOJdbc {
         public static void main(String args[]) throws SQLException {
              String url = "jdbc:oracle:thin:@son1129:1521:sonias";
              Connection con;
              String query = "select EMPNO, ENAME from EMP";
              Statement stmt;
              // ASO Stuff
                   Properties props = new Properties();
                   try {
                   props.put("oracle.net.authentication_services", "CYBERSAFE");
                   props.put("oracle.net.authentication_gssapi_service", "oracle/[email protected]");                    
                   props.put("oracle.net.encryption_types_client", "DES");
                   props.put("oracle.net.encryption_types_server", "DES");               
                   props.put("oracle.net.crypto_seed", "4fhXXXX");               
                   } catch (Exception e) { e.printStackTrace();
                   DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
                   // ASO
                   con = DriverManager.getConnection(url, props);
                   stmt = con.createStatement();
                   ResultSet rs = stmt.executeQuery(query);
                   stmt.close();
                   con.close();          
    jdk version: jdk 1.3.1
    Oracle jdbc driver information, which i obtained as per Note 94091.1
    =============
    Database Product Name is Oracle
    Database Product Version is Oracle8i Enterprise Edition Release 8.1.7.1.1 - Production With the Partitioning option
    JServer Release 8.1.7.1.1 - Production
    JDBC Driver Name is Oracle JDBC driver
    JDBC Driver Version is 8.1.7.0.0
    JDBC Driver Major Version is 8
    JDBC Driver Minor Version is 1

    1. What JDBC Thin client Driver are you using? (version) If you don't know, open up the Manifest.
    2. the JDBC/OCI driver is a thick driver. It uses the oracle client, and therefore should read the tnsnames.ora
    3. You have yet to give us any ORA- errors, which would help immensely in troubleshooting.

  • Oracle 8 JDBC thin driver for tomcat

    Hi all,
    I have tomcat3.3 installed on HP UNIX with java version "HP-UX Java C.01.18.05"
    I need to connect to an oracle 8 database using a Oracle JDBC thin driver. Where can I obtain this driver? How to install and configure it for the tomcat application?
    Thanks for your help.
    Regards
    Shriram

    If you go to the link which the last person posted, http://technet.oracle.com/software/tech/java/sqlj_jdbc/content.html, there is no indication for HP-UX. The only OS it lists are NT and Solaris. Does anyone know if these versions will work on HP-UX?
    Please help.
    Thanks,
    Sam

  • JDBC Thin driver connection

    Hi,
    I am trying to open a connection from Java using JDK 1.1.6 and the Oracle JDBC Thin drivers. My Oracle drivers register just fine. However, I get an exception which I catch saying "Security.couldn't connect to HOST with origin from." HOST is my local server name where I'm running Oracle 8.0.4.0.0 and OAS 4.0.8. My connection statement in my .java code is:
    Connecttion conn =
    DriverManager.getConnection("jdbc:oracle:thin@HOST:1521:orcl,"scott","tiger")
    I can connect just fine using sqlplus with the scott/tiger@orcl descriptor.
    How can I resolve this?

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by JDBC Development Team:
    Not sure whether this is the cause of the problem. There should be a ":" before the "@" sign in the connect string. That is,
    "jdbc:oracle:thin:@host"
    Please do let us know if this doesn't fix the problem
    <HR></BLOCKQUOTE>
    Thank you for pointing out the missing : before the @ symbol. I made that change. Still, I get the same message when the applet loads in my browser page. If I load the applet in appletviewer then I get the error message "checkconnect.networkhost1".

  • Using Oracle JDBC Thin Driver

    We are trying to use the Oracle supplied JDBC thin driver directly from within a jar file we add for our application.
    The classes in the jar file directly connect to an oracle database via the thin driver.
    The problem we've encountered is that if the JDBC Connection object is held in memory, after some time, the connection times out for no reason.
    Is there some restriction with weblogic in connecting directly to database from a class file and then caching the connection reference? It almost seems as if weblogic is severing the connections.
    thank you,
    BJ

    Stefan,
    You are right, although I would recommend just having the
    TestConnectionOnReserve= true and the testTableName set. Refresh Minutes
    becomes kind of redundent when you set these values.
    TestConnsOnReserve allows the server to verify if a connection that the
    client/application has requested is good , otherwise it recreates this
    connection and gives it to the client/application.
    hth
    sree
    "Stefan" <[email protected]> wrote in message
    news:[email protected]...
    Hi Sree,
    If instead a WL connection pool would be used this issue could be solved
    using
    "Refresh Period" and TestTableName right? In this case the connection would
    be
    alive as long as WL server is up. As a bonus we would have an automatic
    reconnection
    after an Oracle server reboot?
    thanks, stefan
    "Sree Bodapati" <[email protected]> wrote:
    Hi BJ,
    When you get connection directly using the Oracle thin driver, this is
    for
    sure your database timing out the connection when no activity is detected
    for sometime. You should consult with your DBA to ensure this timeout
    is set
    to a higher value at the server or ensure you dont hold on to theconnection
    for long durations or ensure you handle this situation by triggering
    a
    generic oracle process so that you periodically keep the connection busy
    to
    ensure that the database does not close it.
    This shouldnt be anything to do with WebLogic as you dont seem to be
    using
    WebLogic connection pool.
    hth
    sree
    "BJ Choi" <bongjin.choi@neoforma> wrote in message
    news:[email protected]...
    We are trying to use the Oracle supplied JDBC thin driver directly from
    within a jar file we add for our application.
    The classes in the jar file directly connect to an oracle database via
    the
    thin driver.
    The problem we've encountered is that if the JDBC Connection object is
    held
    in memory, after some time, the connection times out for no reason.
    Is there some restriction with weblogic in connecting directly to database
    from a class file and then caching the connection reference? It almost
    seems
    as if weblogic is severing the connections.
    thank you,
    BJ

  • Hanging problem with Oracle JDBC thin driver

    Hi. We have an application running on top of WLS 6.1 accessing Oracle 8I with oracle's
    JDBC thin driver. Under stress testing, it appears to hang sometimes. Thread dump
    shows that many threads seem to be stuck at the same line of code in JDBC driver
    (at oracle.sql.NUMBER._isPositive(NUMBER.java:2882)). Has anyone run into similar
    issue? Any help is much appreciated.
    "ExecuteThread: '1' for queue: 'default'" daemon prio=5 tid=0xe18960 nid=0xf wai
    ting on monitor [0xb3680000..0xb36819d8]
    at oracle.sql.NUMBER._isPositive(NUMBER.java:2882)
    at oracle.sql.NUMBER._fromLnxFmt(NUMBER.java:2953)
    at oracle.sql.NUMBER.toBigDecimal(NUMBER.java:557)
    at oracle.sql.NUMBER.bigDecimalValue(NUMBER.java:1872)
    at oracle.jdbc.dbaccess.DBConversion.NumberBytesToBigDecimal(DBConversion.ja
    va:1771)
    at oracle.jdbc.driver.OracleStatement.getBigDecimalValue(OracleStatement.jav
    a:3357)
    at oracle.jdbc.driver.OracleStatement.getObjectValue(OracleStatement.java:41
    66)
    at oracle.jdbc.driver.OracleStatement.getObjectValue(OracleStatement.java:41
    23)
    at oracle.jdbc.driver.OracleResultSetImpl.getObject(OracleResultSetImpl.java
    :401)
    at weblogic.jdbc.jts.ResultSet.getObject(ResultSet.java:268)
    at weblogic.jdbc.rmi.internal.ResultSetImpl.getObject(ResultSetImpl.java:592
    at weblogic.jdbc.rmi.internal.ResultSetStraightReader.getObject(ResultSetStr
    aightReader.java:198)
    at weblogic.jdbc.rmi.SerialResultSet.getObject(SerialResultSet.java:682)
    "ExecuteThread: '6' for queue: 'default'" daemon prio=5 tid=0x6d93a8 nid=0x14
    wa
    iting on monitor [0xb3180000..0xb31819d8]
    at oracle.sql.NUMBER._isPositive(NUMBER.java:2882)
    at oracle.sql.NUMBER._fromLnxFmt(NUMBER.java:2953)
    at oracle.sql.NUMBER.toBigDecimal(NUMBER.java:557)
    at oracle.sql.NUMBER.bigDecimalValue(NUMBER.java:1872)
    at oracle.jdbc.dbaccess.DBConversion.NumberBytesToBigDecimal(DBConversion.ja
    va:1771)
    at oracle.jdbc.driver.OracleStatement.getBigDecimalValue(OracleStatement.jav
    a:3357)
    at oracle.jdbc.driver.OracleStatement.getObjectValue(OracleStatement.java:41
    66)
    at oracle.jdbc.driver.OracleStatement.getObjectValue(OracleStatement.java:41
    23)
    at oracle.jdbc.driver.OracleResultSetImpl.getObject(OracleResultSetImpl.java
    :401)
    at weblogic.jdbc.jts.ResultSet.getObject(ResultSet.java:268)
    at weblogic.jdbc.rmi.internal.ResultSetImpl.getObject(ResultSetImpl.java:592
    at weblogic.jdbc.rmi.internal.ResultSetStraightReader.getObject(ResultSetStr
    aightReader.java:198)
    at weblogic.jdbc.rmi.SerialResultSet.getObject(SerialResultSet.java:682)

    Try get the latest thin driver from oracle and place it in the beginning of
    the classpath in the server startup script to use it. This seems like a
    oracle thin driver bug, the newer driver might help.
    sree
    "Andrew Dong" <[email protected]> wrote in message
    news:[email protected]...
    >
    Hi. We have an application running on top of WLS 6.1 accessing Oracle 8Iwith oracle's
    JDBC thin driver. Under stress testing, it appears to hang sometimes.Thread dump
    shows that many threads seem to be stuck at the same line of code in JDBCdriver
    (at oracle.sql.NUMBER._isPositive(NUMBER.java:2882)). Has anyone run intosimilar
    issue? Any help is much appreciated.
    "ExecuteThread: '1' for queue: 'default'" daemon prio=5 tid=0xe18960nid=0xf wai
    ting on monitor [0xb3680000..0xb36819d8]
    at oracle.sql.NUMBER._isPositive(NUMBER.java:2882)
    at oracle.sql.NUMBER._fromLnxFmt(NUMBER.java:2953)
    at oracle.sql.NUMBER.toBigDecimal(NUMBER.java:557)
    at oracle.sql.NUMBER.bigDecimalValue(NUMBER.java:1872)
    atoracle.jdbc.dbaccess.DBConversion.NumberBytesToBigDecimal(DBConversion.ja
    va:1771)
    atoracle.jdbc.driver.OracleStatement.getBigDecimalValue(OracleStatement.jav
    a:3357)
    atoracle.jdbc.driver.OracleStatement.getObjectValue(OracleStatement.java:41
    66)
    atoracle.jdbc.driver.OracleStatement.getObjectValue(OracleStatement.java:41
    23)
    atoracle.jdbc.driver.OracleResultSetImpl.getObject(OracleResultSetImpl.java
    :401)
    at weblogic.jdbc.jts.ResultSet.getObject(ResultSet.java:268)
    atweblogic.jdbc.rmi.internal.ResultSetImpl.getObject(ResultSetImpl.java:592
    atweblogic.jdbc.rmi.internal.ResultSetStraightReader.getObject(ResultSetStr
    aightReader.java:198)
    atweblogic.jdbc.rmi.SerialResultSet.getObject(SerialResultSet.java:682)
    >
    "ExecuteThread: '6' for queue: 'default'" daemon prio=5 tid=0x6d93a8nid=0x14
    wa
    iting on monitor [0xb3180000..0xb31819d8]
    at oracle.sql.NUMBER._isPositive(NUMBER.java:2882)
    at oracle.sql.NUMBER._fromLnxFmt(NUMBER.java:2953)
    at oracle.sql.NUMBER.toBigDecimal(NUMBER.java:557)
    at oracle.sql.NUMBER.bigDecimalValue(NUMBER.java:1872)
    atoracle.jdbc.dbaccess.DBConversion.NumberBytesToBigDecimal(DBConversion.ja
    va:1771)
    atoracle.jdbc.driver.OracleStatement.getBigDecimalValue(OracleStatement.jav
    a:3357)
    atoracle.jdbc.driver.OracleStatement.getObjectValue(OracleStatement.java:41
    66)
    atoracle.jdbc.driver.OracleStatement.getObjectValue(OracleStatement.java:41
    23)
    atoracle.jdbc.driver.OracleResultSetImpl.getObject(OracleResultSetImpl.java
    :401)
    at weblogic.jdbc.jts.ResultSet.getObject(ResultSet.java:268)
    atweblogic.jdbc.rmi.internal.ResultSetImpl.getObject(ResultSetImpl.java:592
    atweblogic.jdbc.rmi.internal.ResultSetStraightReader.getObject(ResultSetStr
    aightReader.java:198)
    atweblogic.jdbc.rmi.SerialResultSet.getObject(SerialResultSet.java:682)
    >
    >

  • XI adapter polling issue & JDBC  / DB2 driver connection timeout properties

    Hello Group,
    We have a long running issue with our XI 7.0 system running on iseries. (V5R3) The issue occuring is that our XI adapters stop polling and the only resolution is to restart the J2EE engine or to resart the adapter framework services.
    We have had several OSS messages open on this subject for over a year and are going round in circles with the a number of different SAP consultants.
    The one topic that we keep coming back to is that we are being asked to set DB2 driver connection timeout properties. We are using the toolbox driver and have upated to the latest JTopen driver, but have not managed to find any inofrmation on how to set the timeout parameter. Does anyone know where the timeout parameter set?
    Has anyone experienced polling issue like this before and how did you resolve?
    SAP referred to the SAP note 1078420 - XI/PI JDBC Adapter: Setting JDBC driver properties for DB which is for Oracle, but this will give an idea of what timeout parameters SAP are asking about.
    Extract of the note is below:-
    Symptom
    This note gives an option to set JDBC driver properties while acquiring a DB connection. When connecting to DB using JDBC adapter there are instances
    where DB connection take a long time to establish connection. Some times call made to Driver will hang permanently. Setting driver properties would resolve this problem.
    More Terms
    Connection timeout, time out, query timeout
    Cause and Prerequisites
    Solution
    In the advanced mode table section of sender channel and receiver channel configurations, we can set driver properties for each DB connection. Any
    such property would have to contain prefix 'driver:'(with out quotes) For example, for Oracle Database JDBC thin driver 10.2.0.3 version, the
    property oracle.jdbc.ReadTimeout helps to set read timeout while reading from the socket. Also for setting login time out in Oracle, we use
    oracle.net.CONNECT_TIMEOUT. To set these two properties use as follows:
    driver:oracle.jdbc.ReadTimeout 1000
    driver:oracle.net.CONNECT_TIMEOUT 1000
    (The TimeOut Driver properties like ReadTimeout and CONNECT_TIMEOUT are in milliseconds)
    Refer to your DB documentation/ JDBC driver documentation on this. Please note that properties can vary from each driver version. For instance, some
    of properties of Oracle JDBC thin Driver 10.2.0.3 properties may not be present in older version drivers. Please contact DB vendor for the complete
    list of driver properties. In addition to above, we also provide another parameter for query time out.
    sqlquerytimeout (prefix 'driver:' is not required) is the parameter that is to be used for SQL query time out. This is case-sensitive and should be
    configured as positive integer value in seconds(greater than 0).
    Any help on this would be much appreciated.
    With regards,
    Steven

    Hello,
    I am not talking about the XI timeouts. But the timeouts which can be used to get the connection timeouts for DB2/AS400 databases.
    So please provide that information.
    THanks,
    soorya

  • JDBC Thin Driver Won't Honor Autocommit=FALSE

    I have the following code, which intializes a JDBC thin driver connection, and sets the autocommit to false. However, as soon as the statement is executed, it commits on its own. What's going wrong here? I can tell that it is committing, because the calendar events all disappear, even if the code is terminated before committing, or in an endless loop.
    odsSecondary = new OracleDataSource();
    odsSecondary.setDatabaseName("####");
    odsSecondary.setDriverType("thin");
    odsSecondary.setUser("####");
    odsSecondary.setPassword("####");
    odsSecondary.setPortNumber(1521);
    odsSecondary.setServerName("####");
    connectionSecondary = odsSecondary.getConnection();
    connectionSecondary.setAutoCommit(false);
    Statement stmtSecondary = connectionSecondary.createStatement();
    stmtSecondary.executeUpdate("truncate table cal_events");

    The truncate command always issues a commit. refer to the oracle SQL documentation

  • Jdbc thin driver to connect oracle as internal

    I need to connect to Oracle as Internal using jdbc driver, is there a way we can do this using jdbc thin driver. Actually I don't want to pass username and password as it will be harcoded in a properties file.
    Please let me know.

    Hi Minol,
    Have a look at this code example that shows how to Connect to Database as internal ( as sysdba ). In this code sample the properties are hard-coded, you can supply these Properties by loading them from a properties file.
    Connecting to Oracle Database with DBA privileges
    http://myjdbc.tripod.com/basic/codeindex.html
    The code snippet to load properties from a properties file
    //Import IO related classes
    import java.io.IOException;
    // Necessary support classes
    import java.util.Properties;
    import java.util.Enumeration;
    import java.util.ResourceBundle;
       * This method reads a properties file which is passed as
       * the parameter to it and load it into a java Properties
       * object and returns it.
       * @param file File path
       * @return Properties The properties object
       * @exception IOException if loading properties file fails
       * @since 1.0
      public static Properties loadParams(String file)
          throws IOException {
        // Loads a ResourceBundle and creates Properties from it
        Properties     prop   = new Properties();
        ResourceBundle bundle = ResourceBundle.getBundle(file);
        // Retrieve the keys and populate the properties object
        Enumeration enum = bundle.getKeys();
        String      key  = null;
        while (enum.hasMoreElements()) {
          key = (String) enum.nextElement();
          prop.put(key, bundle.getObject(key));
        return prop;
      }Regards
    Elango.

  • Bug in Oracle JDBC thin driver (parameter order)

    [ I'd preferably send this to some Oracle support email but I
    can't find any on both www.oracle.com and www.technet.com. ]
    The following program illustrates bug I found in JDBC Oracle thin
    driver.
    * Synopsis:
    The parameters of prepared statement (I tested SELECT's and
    UPDATE's) are bound in the reverse order.
    If one do:
    PreparedStatement p = connection.prepareStatement(
    "SELECT field FROM table WHERE first = ? and second = ?");
    and then bind parameter 1 to "a" and parameter to "b":
    p.setString(1, "a");
    p.setString(2, "b");
    then executing p yields the same results as executing
    SELECT field FROM table WHERE first = "b" and second = "a"
    although it should be equivalent to
    SELECT field FROM table WHERE first = "a" and second = "b"
    The bug is present only in "thin" Oracle JDBC driver. Changing
    driver to "oci8" solves the problem.
    * Version and platform info:
    I detected the bug using Oracle 8.0.5 server for Linux.
    According to $ORACLE_HOME/jdbc/README.doc that is
    Oracle JDBC Drivers release 8.0.5.0.0 (Production Release)
    * The program below:
    The program below illustrates the bug by creating dummy two
    column table, inserting the row into it and then selecting
    the contents using prepared statement. Those operations
    are performed on both good (oci8) and bad (thin) connections,
    the results can be compared.
    You may need to change SID, listener port and account data
    in getConnecton calls.
    Sample program output:
    $ javac ShowBug.java; java ShowBug
    Output for both connections should be the same
    --------------- thin Driver ---------------
    [ Non parametrized query: ]
    aaa
    [ The same - parametrized (should give one row): ]
    [ The same - with buggy reversed order (should give no answers):
    aaa
    --------------- oci8 driver ---------------
    [ Non parametrized query: ]
    aaa
    [ The same - parametrized (should give one row): ]
    aaa
    [ The same - with buggy reversed order (should give no answers):
    --------------- The end ---------------
    * The program itself
    import java.sql.*;
    class ShowBug
    public static void main (String args [])
    throws SQLException
    // Load the Oracle JDBC driver
    DriverManager.registerDriver(new
    oracle.jdbc.driver.OracleDriver());
    System.out.println("Output for both connections should be the
    same");
    Connection buggyConnection
    = DriverManager.getConnection
    ("jdbc:oracle:thin:@localhost:1521:ORACLE",
    "scott", "tiger");
    process("thin Driver", buggyConnection);
    Connection goodConnection
    = DriverManager.getConnection ("jdbc:oracle:oci8:",
    "scott", "tiger");
    process("oci8 driver", goodConnection);
    System.out.println("--------------- The end ---------------");
    public static void process(String title, Connection conn)
    throws SQLException
    System.out.println("--------------- " + title + "
    Statement stmt = conn.createStatement ();
    stmt.execute(
    "CREATE TABLE bug (id VARCHAR(10), val VARCHAR(10))");
    stmt.executeUpdate(
    "INSERT INTO bug VALUES('aaa', 'bbb')");
    System.out.println("[ Non parametrized query: ]");
    ResultSet rset = stmt.executeQuery(
    "select id from bug where id = 'aaa' and val = 'bbb'");
    while (rset.next ())
    System.out.println (rset.getString (1));
    System.out.println("[ The same - parametrized (should give one
    row): ]");
    PreparedStatement prep = conn.prepareStatement(
    "select id from bug where id = ? and val = ?");
    prep.setString(1, "aaa");
    prep.setString(2, "bbb");
    rset = prep.executeQuery();
    while (rset.next ())
    System.out.println (rset.getString (1));
    System.out.println("[ The same - with buggy reversed order
    (should give no answers): ]");
    prep = conn.prepareStatement(
    "select id from bug where id = ? and val = ?");
    prep.setString(1, "bbb");
    prep.setString(2, "aaa");
    rset = prep.executeQuery();
    while (rset.next ())
    System.out.println (rset.getString (1));
    stmt.execute("DROP TABLE bug");
    null

    Horea
    In the ejb-jar.xml, in the method a cursor is closed, set <trans-attribute>
    to "Never".
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name></ejb-name>
    <method-name></method-name>
    </method>
    <trans-attribute>Never</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    Deepak
    Horea Raducan wrote:
    Is there a known bug in Oracle JDBC thin driver version 8.1.6 that would
    prevent it from closing the open cursors ?
    Thank you,
    Horea

  • 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."

  • Oracle JDBC thin driver question

    Does anyone know if there is a JDBC thin driver available for Oracle that supports "HTTP tunneling" of the SQLNET wire protocol?
    Such a driver would package the SQL*NET data stream into HTTP or HTTPS packets and connects to a Servlet proxy on the Web host that unpacks the data and forwards the SQL*NET stream to the Oracle RDBMS and returns the response the same way.
    This would help me overcome some firewall issues I'm seeing since HTTP/HTTPS ports are usually opened through a firewall. I know Sybase has a JDBC dirver that does this for their TNS protocol and was hoping some company has developed this for Oracle.
    Thanks in advance...

    The easiest thing to do is download it as an archive with your applet.
    Otherwise, you have to have the files on every client machine.
    For netscape, put the classes111.jar in the java classes folder typically:
    c:\ProgramFiles\Netscape\Communicator\Program\java\classes.
    I'd expect that IE would be setup in a similar way.

  • Oracle JDBC Thin Driver and Firewall Problem

    Hi!
    We have Oracle 8.1.5 and Websphere App Server. There is a
    firewall between the two. A servlet creates a connection pool
    (not that of Wesphere's). The frontend is JSP/HTML (no applets).
    The servlet uses the Oracle JDBC Thin Driver for DB Connections.
    The problem is - Once the connection is freed, the connection
    pool is not being able to retrieve it and hence it created
    another one, thus reaching the max. # of connections and the
    system hangs. Restarting the DB service flushes the connection
    and the application starts running again...
    There was a similar problem discussed in this forums long ago. I
    have not yet tried mentioning the firwall port and IP in the
    connection string. But apart from that, is there any other
    setting I need to do (on firewall or for the connectionstring)
    to deal with this problem?
    Someone had suggested to punch a hole in the firewall for the DB
    port - but we can not really do that in the current scenario...
    I would appreciate if anyone could share their experience
    regarding how they resolved this issue.
    Thanks in advance,
    Vijaya.

    One more question -
    Can we use Oracle JDBC OCI driver? We do not have any appletes...
    Does it have firewall issues too? Is there any other driver that
    we can use?
    Thanks,
    Vijaya.

Maybe you are looking for