Connecting to OAS using Oracle JDBC Thin

Hi,
When I test connect to OAS residing on another host, using ORACLE JDBC THIN Driver and Named host method, I get the following error message :
"Got back minus one from a read call"
Any clues why such a message would come?
Thks
Sudha

If you are using the thin driver, sqlnet.ora does not come into play. None of Oracle networking does. That is one of the great things about using the thin driver, no need to have the client installed.
That error is due to incorrect connection info you are supplying or the machine you are connection from can't ping the machine it is trying to connect to.

Similar Messages

  • Problem in connecting to database using oracle jdbc thin driver

    hi
    i am trying to connect to a database using oracle thin driver.
    i am getting following error:
    java.sql.sqlexception:Io exception: the network adapter could not establish the connection
    Io exception: the network adapter could not establish the connection
    the connection string has the property of using a dedicated server
    for this reason i have put USE_DEDICATED_SERVER=ON in sqlnet.ora file...
    we did not face this problem while connecting to other databases which do not have the property of dedicated server in their connection string in tnsnames.ora file.
    please suggest a solution for this.
    thanks and regards,
    asif

    If you are using the thin driver, sqlnet.ora does not come into play. None of Oracle networking does. That is one of the great things about using the thin driver, no need to have the client installed.
    That error is due to incorrect connection info you are supplying or the machine you are connection from can't ping the machine it is trying to connect to.

  • Sql_trace does not work for Java app using Oracle JDBC thin driver

    Hi,
    I'm using Oracle 8.1.7. I enabled sql trace at instance level by setting sql_trace and timed_statistics to true in init.ora. I restarted the db instance. I wrote a stand-alone java application which used Oracle JDBC thin driver(classes12.zip) to make a connection to my db instance, do some select statements, and close the connection. There were no trace files generated in the folder specified by udump_dest variable. However, if I used sqlplus or dba studio, I saw trace files generated. Has anyone got Oracle sql trace work for JDBC calls from java apps.
    Thanks in advance!

    Hi,
    I'm using Oracle 8.1.7. I enabled sql trace at instance level by setting sql_trace and timed_statistics to true in init.ora. I restarted the db instance. I wrote a stand-alone java application which used Oracle JDBC thin driver(classes12.zip) to make a connection to my db instance, do some select statements, and close the connection. There were no trace files generated in the folder specified by udump_dest variable. However, if I used sqlplus or dba studio, I saw trace files generated. Has anyone got Oracle sql trace work for JDBC calls from java apps.
    Thanks in advance!

  • Change expired password using oracle jdbc thin driver

    Hello,
    I have a java program that uses the oracle jdbc thin driver (ojdbc6 - version 11.2.0.3) for database connection. My question is if I have any possibility to change an expired password (java.sql.SQLException: ORA-28001: the password has expired) using the thin driver - NOT OCI?

    No - the thin driver doesn't have any password management features.

  • 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

  • A question about creating a Connection pool that uses Oracle JDBC

    Dear all,
    I have an issue with creating a connection pool within a web application in order to be used by several servlets. I appreciate if you could kindly give me a hand.
    I'm using:
    Web server: Apache-tomcat: 6.0.18
    Oracle Database 11g Enterprise: 11.1.0.6.0 - Production
    Operating system: Linux (ubuntu 8.10)
    IDE: Sun Netbeans
    Oralce JDBC Drivers: 11.1.0.7.0-Production (ojdbc6.jar and orai18n.jar)
    JDK 1.6
    Usually, just for creating a connection to my database (without using a connection pool), I proceed in the following way:
    String dbURL = "jdbc:oracle:thin:@localhost:1521:database01";
    String username = "scott";
    String user_password = "tiger";
    String userSqlQuery = "SELECT * FROM mytable";
    Connection connection = DriverManager.getConnection (dbURL, username, user_password);
    Statement statement = connection.createStatement();
    statement.executeUpdate(query_text);This works pretty well allowing to communicate with my oracle database. By this method I have run several projects
    with different queries (SELECT, INSERT, UPDATE, DELETE ,etc.) and each time it worked without any problem and
    returned the result of the query. Therefore I think that there is no problem with JDBC drivers
    However, when I want to create a connection pool, it seems that the lookup method cannot locate Oracle JDBC drivers. That is,
    try
         InitialContext ic = new InitialContext();
         Context envContext  = (Context)ic.lookup("java:/comp/env");
         dataSource = (DataSource)envContext.lookup("jdbc/oracle11gEnterprise");
           Connection connection = dataSource.getConnection();
    catch (Exception e)
         e.printStackTrace();
    }Just after calling dataSource.getConnection() the java.lang.NullPointerException is thrown.
    Any idea?
    Thanks in advance,
    And for your information, here are context.xml and web.xml files for my project
    Here is my context.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <Context antiJARLocking="true" path="/WebApplication1">
        <Resource name="jdbc/oracle11gEnterprise"
              scope="Shareable"
              type="javax.sql.DataSource"
              auth="Container"
              description="Oracle Database 11g Enterprise"
              maxActive="100"
              maxIdle="30"
              maxWait="10000"
              removeAbandoned="true"
              removeAbandonedTimeout="60"
              logAbandoned="true"
              url="jdbc:oracle:thin:@localhost:1521:database01"
              username="scott"
              password="tiger" />
    </Context>my web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
        <ConsumeOutput>false</ConsumeOutput>
        <resource-ref>
            <res-ref-name>jdbc/oracle11gEnterprise</res-ref-name>
            <res-type>javax.sql.DataSource</res-type>
            <res-auth>Container</res-auth>
        </resource-ref>
        <!--
            .  And here as usual I write servlet definition and url mappings
        -->   

    nobody?

  • Issue in handling UTF8 characters using Oracle JDBC thin driver in Linux

    We have a standalone Java application which reads values from one table and inserts the same into another table. The value in the source table is "Türkiye Is Bankasi Gayrettepe Subesi" and the same value after inserting into the target table becomes "T�rkiye Is Bankasi Gayrettepe Subesi" (ü is getting converted to �).
    The same works fine if we run the application in Windows.

    Thanks again for looking into this. Please find the answers below
    1.What character set do you use in the database? (see NLS_CHARACTERSET and NLS_NCHAR_CHARACTERSET in the view NLS_DATABASE_PARAMETERS).
    - Both of them are UTF8
    2. What is the type of the column storing that string? (e.g. VARCHAR2, NVARCHAR2, an object type, ...)
    - Varchar2
    3. Source binary value (for "Türkiye Is Bankasi Gayrettepe Subesi")
    is
    Typ=1 Len=36:
    54,fc,72,6b,69,79,65,20,49,73,20,42,61,6e,6b,61,73,69,20,47,61,79,72,65,74,74,65,70,65,20,53,75,62,65,73,69
    Target binary value (for "T�rkiye Is Bankasi Gayrettepe Subesi")
    is
    Typ=1 Len=38: 54,ef,bf,bd,72,6b,69,79,65,20,49,73,20,42,61,6e,6b,61,73,69,20,47,61,79,72,65,74,74,65,70,65,20,53,75,62,65,73,69

  • I think Oracle JDBC Thin driver has many problems

    I developed application & applet using Oracle JDBC/Thin Drivers
    for use with JDK 1.2 and SUN JDK 1.2.2.
    In my computer, application runs correctly.
    On the other hand, applet isn't run and throws error "Cannot
    find class java/util/Map" on connecting to Oracle database.
    You know, java/util/Map class is only in SUN JDK 1.2.x and
    current web-browsers (for example, IE5.0, Netscape 4.7, ...)
    don't support Java Run time 1.2.x.
    I think this is very critial problem.
    So I tried with Oracle JDBC/Thin Drivers for use with JDK 1.1.x
    and SUN JDK 1.1.8. (Now SUN only supports JDK 1.1.8 in JDK 1.1.x
    series)
    But this time, applet throws error "Cannot find class javax/..."
    You know, JDK 1.1.8 doesn't have javax/... classes but early JDK
    1.1.x series had javax/.... classes.
    May be Oracle JDBC/Thin Drivers for use with JDK 1.1.x are made
    using these early JDK 1.1.x series, so I think Oracle JDBC/Thin
    Drivers for use with JDK 1.1.x can't be used with SUN JDK 1.1.8.
    Whatever is the matter!
    null

    You need to remote onto the server and go into start->control panel-Administration-> ODBC (or sometimes start->administration->ODBC) and set up ODBC connections . Make sure you set them up on the system tab, then you should see them in EAS. I don't remember, b ut don't think you need to restart the Essbase servise for them to take effect

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

  • 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

  • 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

  • Differences between Oracle JDBC Thin and Thick Drivers

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

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

  • Oracle JDBC 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.

  • How does Oracle JDBC thin driver handle numbers via getString?

    Hi,
    I have a query regarding how numbers are handled by the oracle jdbc thin driver. The issue I am facing is with regards to the decimal separator (. is en_US and , in pt_BR)
    e.g. Consider the below code,
    Connection conn = DriverManager.getConnection(...);
    Statement stmt = conn.createStatement();
    ResultSet rset = stmt.executeQuery("select value from test_table1");
    while (rset.next())
    System.out.println (rset.getString(1));
    test_table1 has a single column of sql type 'number' with a single row having value "123.45"
    NLS_NUMERIC_CHARACTERS = ".,"
    Database version = 10.2.0.2.0
    There is a (generic) method to which a ResultSet is passed and it returns a dictionary of key value pairs. All column values from the ResultSet are retrieved using getString method of ResultSet.
    My question is whether the jdbc driver formats numbers (based on the locale) before returning it as a string as part of the getString method?
    e.g.
    java -Duser.language=pt -Duser.region=BR TestJDBC
    prints "123.45" and not "124,45"
    Is there a reason why getString always retrieves a number column value with '.' as the decimal separator?
    To help make things a bit more clear, all the column values retrieved are then converted into an XML (and hence the conversion to string)
    At present, the only way I see out of this is to handle numbers differently.
    i.e. something similar to,
    if (resultsetmetadata.getcolumntype .. = double OR float OR int OR long.. )
    NumberFormat.getInstance().format(rset.getDouble(1));
    Is there a better way to resolve this issue?
    Thanks,
    Binoy

    user565580,
    As has been already stated, Oracle does not have data-types INTEGER or SMALLINT, only NUMBER.
    So even though Oracle lets you write INTEGER, it really creates a NUMBER.
    (As Joe mentioned.)
    Other databases don't have a NUMBER data-type, they have INTEGER, SMALLINT, etc.
    Originally, Oracle database only had three data-types:
    CHAR
    DATE
    NUMBER
    If you're going to be working with Oracle database, then you need to adapt yourself to its limitations.
    So you'll probably need to define NUMBER data-types using scale and precision.
    (As Kuassi mentioned.)
    Good Luck,
    Avi.

  • Applet which uses the JDBC Thin driver

    My applet is running from Internet Explorer(Windows NT 4.0) and uses the JDBC
    Thin Driver to connect to database. The code complies with J2SDK1.4.0-beta3 and
    JDBC 2.0. I am getting following error:java.lang.NoClassDefFoundError:
    oracle/jdbc/driver/oracleDriver at applet.button_actionPerformed...
    Can anybody help?
    help urgently needed...
    Best regards and thanks in advance

    AFAIK the Oracle drivers still don't work with JDK 1.4, switch to 1.31 and they should be fine.

Maybe you are looking for

  • Itunes 10.0 Crash/Freeze when beginning to importing CD

    All, I recently bought my father an iPod Nano 5th gen. We got about 5 CD's properly imported on iTunes 9 when I was showing him how to import and sync his device. However, soon after I 'cut him loose' he reported a problem with the iTunes freezing an

  • Commit happened in activity/function Exception When Launching CREATEPO WF

    <p> Hi all, </p> <p> Got a good one here. Client is receiving the error above in the standard eBusiness Suite Req Approval Workflow. The problem has been narrowed down to the responsibility level. When the final approver is logged is as one Responsib

  • Bootcamp and Media Center 2005

    I have a full version of media center intended for any pc and whenever i try to install it on my macbook pro via leopard, the entire install process will go through, but after install i boot to windows and i get a disk error. Any ideas. I was able to

  • Can I re-install only address book in Lion?

    When I type in a name in the search field it no longer responds. If I double click on a vcf card from an email it will not add the contact. I can still scroll through the contacts but if a contact is highlighted in the list it will not appear in the

  • No confirmation for shift-deleting messages in saved searches

    I have noticed that there is no confirmation for Shift-deleting messages in saved searches, only in regular mail folders. This is rather dangerous. I have checked my config editor, and I have have "mail.warn_on_shift_delete" = true, but this seems to