Jdbc thin classes111.zip and timeout

Is it possible that there is a timeout on a connection to a
database?
I use oracle 8, IBM Websphere app server on NT IIS4.0 Service
pack 5.0 and TOPLink 2.0
the database accessor get disconnected after a 2nd user access
the database.
thank you all
laurence
null

Laurence courdier (guest) wrote:
: Is it possible that there is a timeout on a connection to a
: database?
: I use oracle 8, IBM Websphere app server on NT IIS4.0 Service
: pack 5.0 and TOPLink 2.0
: the database accessor get disconnected after a 2nd user access
: the database.
It looks like there're subtle differences between how
connections from native OCI stuff and JDBC type 4 (native java)
driver appear to Oracle session manager. In our case, after
certain period of user (java app) inactivity, any subsequent
attempt to do smth. causes SQLException "Connection closes by
peer" to be thrown inside Oracle JDBC classes. So it looks like
you have to do some sort of "ping" against a database periodicly
(I guess every our or so) so that DB is sure your side is alive.
I suspect that native OCI library silently does smth. similar.
Hope that helps,
Ernest
null

Similar Messages

  • Difference between Classes111.zip and Classes12.zip?

    Hi!
    Earlier we used to use Classes111.zip now a days mostly we use classes12.zip.
    What is the comparison among the two?
    What are the special things that are achieved in Classes12.zip over Classes111.zip
    Can I have explanation about it?
    Thanks in Advance
    -Sagar

    classes111.zip is for JDK1.1 while classes12.zip id for JDK1.2 and above.
    Col

  • Regression between jdbc thin version 9 and 10.1.0.3

    Hi all,
    I tried to get a Date columns as a String with a specific format using the following technique:
    dStatement = connection.createStatement();
    dStatement.execute("alter session set NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'");
    ((OracleStatement)dStatement).defineColumnType(1, Types.VARCHAR);
    ResultSet rs = dStatement.executeQuery("select aDateColumn from...");
    rs.next();
    String aDate = rs.getString(1);
    it worked fine in 9.2.0.5, but it failed on 10.1.03. I gives me the standard oracle format, which has got a .0 after the seconds.
    Actually, in 10.1.0.3, I can do :
    ((OracleStatement)dStatement).defineColumnType(999, Types.VARCHAR);
    and then execute a query that return 1 columns without even an exception.
    Any workarounds not involving to_char() and getDate()?

    The application works in windows machines (mainly
    Windows 2003), running .Net and in Linux running
    JBoss.
    In Windows, we use the usual fat client (OCI) - MS
    drivers for Oracle. Which data access methods or APIs are you using?
    Microsoft's .Net provider for Oracle "requires Oracle Client software 8.1.7 or later". MS' other drivers from back in the days are designed for Oracle 7 and possibly 8.0.x, but no later.
    Why are you not using Oracle's drivers "for Oracle"?
    In Java, we use the thin client.>
    We have now a new customer that has 10.1.0.3.0, and
    due to other existing applications, he can't upgrade.Is that on the db side or app server?
    >
    We've made lots of tests in 10.2.0.3.0, and have now
    some clients using it in this version.
    I just need the RDBMS and client drivers changes (if any).Your app is closest to client drivers and if you have made a lot of tests, perhaps you should stick to this version of Client. The db side is slightly different. Oracle certifies interoperability between Net client and server. So I guess you need to map out which db specific features you are using and any install scripts, management procedures, etc. that may differ.
    I would assume that from a 10.1 to a 10.2, no
    change could break my code, but unfortunately my
    experience taught me not to be so confident.Obi One has taught you well...

  • JDBC Thin Driverr for Oracle 8.1.5 on NT

    I Installed the above said driver from Cd and followd the instructions givne the documentation and updated as CLASSPATH=[Oracle Home]/jdbc/lib/classes111.zip
    and when Im trying to make sure I can compile and run the java as said in the documentation.
    I am getting the following error..
    C:\Oracle\Ora81\jdbc\demo\samples>java
    Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion'
    has value '1.1', but '1.3' is required.
    Error: could not find java.dll
    Error: could not find Java 2 Runtime Environment.
    Can anyone please have any clue....
    null

    You must include "classes12.zip" instead of "classes111.zip".
    Since "classes111.zip" is required only for Java 1
    and "classes12.zip" is required for Java 2 which means from J2SE 1.2 on forward.
    In adition you might need to inlcude "nls_charset12.zip" as well. Try it first without and if it is not working include it as well.
    The required files can you get from the OTN.
    This should help
    Roger

  • Connection error to 9i database using JDBC thin driver

    When trying to connect to a new 9i database using the JDBC thin driver, I received the following error:
    java.sql.SQLException: ORA-00600: internal error code, arguments: [ttcgcshnd-1], [0], [], [], [], [], [], []
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java)
    at oracle.jdbc.ttc7.TTC7Protocol.fetch(TTC7Protocol.java)
    at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java)
    at oracle.jdbc.driver.OracleStatement.doExecute(OracleStatement.java)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java)
    at oracle.jdbc.driver.OracleDatabaseMetaData.getTables(OracleDatabaseMetaData.java)
    I have no problem with my code connecting to an Oracle 8 database, just 9i.
    I'm trying to debug in Visual Cafe (JDK 1.1.7) and have both the classes111.zip and the nls_charset11.zip in my CLASSPATH.
    Any suggestions would be appreciated. Thanks

    If you're using 8i 8.1.7.1 or 8i 8.1.7.0 thin JDBC drivers on NT, then you can get them to connect to 9i by applying the 8i 8.1.7.1 Patch available at:
    http://technet.oracle.com/software/tech/java/sqlj_jdbc/htdocs/solsoft.html
    You might have to register/login first.
    Basically, it's just a case of replacing a class already in your classes111.zip or classes12.zip with the class in the patch.
    Took me a while to find this, but it worked first time after patching. Hope this helps.

  • Error connection jdbc.thin in JavaApplet

    With oci8 driver I connected to my database
    but useing jdbc.thin in Applet and in other local program on JAVA - error:
    in Applet:
    Connecting....
    no suitable driver
    in local java program:
    java.sql.SQLException:The Network Adapter could not establish the connection
    What does it mean?
    What i must do to connestion?

    Are you running the Applet off a Webserver ?.
    If yes then have the $ORACLE_HOME/jdbc/lib/classes111.zip file
    included in the ARCHIVE list for the applet.
    The jdbc driver classes are present in the above zip file.
    When you run it locally, the zip file is present in the CLASSPATH, and hence it works.
    If you are invoking the applet locally without a webserver, using a appletviewer, then having the classes111.zip file in the CLASSPATH is sufficient.
    Hope this helps.

  • Classes111.zip for 9iFS

    I can only get connecton to 9iFS by using jdbc lib classes111.zip for my java program.
    Is there any way to use classes12.zip for both 9iFS programs and my entity ejbs running on OC4J?
    thanks for any advise.

    David,
    It depends on which version of the Thin-JDBC driver you want to
    use.
    For 8.1.4:
    aurora\lib\classes111.zip
    For 8.0.5:
    jdbc\lib\oci8\classes111.zip
    For 7.3.x:
    jdbc\lib\oci7\classes111.zip
    Even though the directories say 'oci', the classes111.zip files
    contain both OCI and thin drivers.
    I'm not sure what the translator.zip file is that you're trying
    to locate. This isn't mentioned in the JDBC doc.
    -L
    David DUPONT (guest) wrote:
    : In Jdeveloper 2.0,
    : Translator.zip
    : and classes111.zip for Thin-JDBC Doesn't exist.
    : Why?
    null

  • Reading CLOB data using jdbc thin driver

    Hi,
    When I try reading data for a CLOB column using thin jdbc driver, I get the following error message
    "Exception: ORA-06550: line 1, column 22:
    PLS-00302: component 'GETCHUNKSIZE' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored".
    This error message is displayed when the call is made to get the character stream from the Clob object.
    Do I need to any server side setup before I can access CLOB data from the database?
    thanks.
    Puru Balakrishnan

    I updated to the latest jdbc drivers, 816classes12b.zip, and the problem went away.
    null

  • 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

  • Translator.zip and Classes111.zip for Thin-JDBC

    In Jdeveloper 2.0,
    Translator.zip
    and classes111.zip for Thin-JDBC Doesn't exist.
    Why?
    null

    David,
    It depends on which version of the Thin-JDBC driver you want to
    use.
    For 8.1.4:
    aurora\lib\classes111.zip
    For 8.0.5:
    jdbc\lib\oci8\classes111.zip
    For 7.3.x:
    jdbc\lib\oci7\classes111.zip
    Even though the directories say 'oci', the classes111.zip files
    contain both OCI and thin drivers.
    I'm not sure what the translator.zip file is that you're trying
    to locate. This isn't mentioned in the JDBC doc.
    -L
    David DUPONT (guest) wrote:
    : In Jdeveloper 2.0,
    : Translator.zip
    : and classes111.zip for Thin-JDBC Doesn't exist.
    : Why?
    null

  • How to use thin drivers and classes111.zip?

    I'm using jdk1.2 and making connection with Oracle8 database using an applet. I resolved the issue
    of security by using the policytool. But now I want to know how can I use the Thin Driver to connect with the database?
    the code which I had written is :-
    import java.sql.*;
    try{
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:cbcpeter","scott","tiger");
    st=con.createStatement();     
    }catch(Exception e){System.out.println(e);}
    and it gives the following error "Class oracle.jdbc.driver.OracleDriver not found"
    So please tell me where to place the classes111.zip or classes12.zip and how to use them?
    I had tried with the jdbcodbc driver, but it gives me the error "Cannot load Resource File sqresus.dll"
    thanx in advance!

    well, i had the same problem some months ago, the READ ME OF HOW TO INSTALL IN THE ORACLE SITE IT IS INCORRECT!!! i cant remember it right, but the directory pertaining to the read me file is WRONG! im 100% sure because when i changed the directory to its correct path it WORKED!!! so u have to use common sense...
    also, if u r using tomcat 4.0.x try adding the location og the classes111.zip in the catalina.bat, coz when u run tomcat, it overrides the classpaths, etc that has been set in the autoexec.bat...
    also, dont unzip the file...
    i hope this helps... i had my code in another computer so i can post it here...

  • Jdbc thin driver 8.1.7 and views from older versions of oracle

    Config:
    Windows 2000 | jdk 1.3.1 | oracle's latest jdbc driver 8.1.7,
    also tried 9.0.1 (classes12.zip), using thin driver
    I try to select,using a PreparedStatment, from a view on Oracle
    8.1.7, the view is linked to a table on Oracle 7.2.2.3.
    I get different results when running the same query, I use an
    older version of the driver to connect to the older version of
    Oracle(classes111.zip), on the table directly and on the view.
    This seems to be predominantly present when dealing with
    integers.
    Any comments or help would be appreciated.

    I have found a workaround to this problem.
    The only way, that I have been able to determine, of resolving
    this issue is to use a Statement, not a PreparedStatement, which
    causes problems for some reason. I figure there's a bug in
    Oracle's JDBC layer.
    Maybe this will help someone...maybe not :)
    kamil

  • JDBC thin driver and Oracle 8.1.6

    Hi,
    I have installed Oracle 8.1.6 on Windows NT 4.0 with service pack 4 and using Oracle JDBC thin driver driver (classes111.zip). My application is multithreaded, but each thread maintains its own connection (and own set of Statements). Things are okay in single threaded mode, but in multi threaded mode, I get weird errors!
    1. My resultsets are SCROLL_SENTITIVE and UPDATABLE
    2. Sometimes, while updating a row, "No current row" SQLException is thrown, although a row exists that satisfies my select criteria
    3. I am also calling executeUpdate() for inserting new rows and such rows are not seen by successive resultsets!
    Appreciate any hints! Thanks!

    Try this isntead.
    java -classpath d:\jdbc\classes12.zip;. jdbccheckup
    an error occured:
    Exception in thread "main" java.lang.NoClassDefFoundError:jdbccheckup
    Why??????

  • Does oracle 8.1.6.0 jdbc thin driver support jdk1.3 and oracle 8.0.5 database ?

    I have downloaded oracle 8.1.6.0 jdbc thin driver(named classes12.zip) to run with jdk1.3 to access oracle 8.0.5, but when I compile and run the jdbccheckup.java downloaded from oracle website like this:
    javac -classpath d:\jdbc\classes12.zip jdbccheckup.java
    (compile succeed)
    java -classpath d:\jdbc\classes12.zip jdbccheckup
    an error occured:
    Exception in thread "main" java.lang.NoClassDefFoundError:jdbccheckup
    Why??????

    Try this isntead.
    java -classpath d:\jdbc\classes12.zip;. jdbccheckup
    an error occured:
    Exception in thread "main" java.lang.NoClassDefFoundError:jdbccheckup
    Why??????

  • 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

Maybe you are looking for