Connection pooling unable to close connection on Oracle 9i 64bit

Hi there,
We have a Oracle 9i 64 bit server housed on a Solaris 64bit box. Earlier we had a 8i on a solaris 32 bit and things were fine. But after having migrated to 9i, we have been facing a peculiar issue where in the connections being opened by the application do not close/expire. We never had this problem on the 8i box.
System spec:
Solaris 64bit ver 8
JDK 1.4 JDBC thin drivers(ojdbc14.jar)
JDBC 2.0
Oracle 9.2.0.8 (64bit)
The application is housed on a 32 bit Solarix box and runs on Tomcat4.1.
Has anyone seen such probs before?? ...any ideas(quick ones) will be appreciated!
Anybody

Hi,
I did a oracle trace of the issue and this is what i get from the trace
DRVR OPER OracleConnection.setAutoCommit(autoCommit): return
DRVR OPER OracleConnection.setReadOnly(readOnly=false)
DRVR SQLS SQL: "SET TRANSACTION READ WRITE"
DRVR OPER OracleConnection.getDefaultFixedString() returning false
DRVR OPER ResultSetUtil.needIdentifier(typeCode=1): return: false
DRVR OPER OraclePreparedStatement.execute()
DRVR OPER OraclePreparedStatement.executeUpdate()
DRVR SQLS Input SQL: "SET TRANSACTION READ WRITE"
DRVR OPER OracleConnection.getAutoCommit() returned true
DRVR OPER OracleStatement.cleanupForBatching()
DRVR OPER OraclePreparedStatement.sendBatch()
DRVR SQLS SQL: "{call PKG_REASSIGN.I01_REASSIGN(?,?,?,?,?,?)}"
DRVR OPER OracleConnection.getDefaultFixedString() returning false
DRVR OPER ResultSetUtil.needIdentifier(typeCode=1): return: false
DRVR SQLS sql=<{call PKG_REASSIGN.I01_REASSIGN(?,?,?,?,?,?)}>
DRVR SQLS Input SQL: "{call PKG_REASSIGN.I01_REASSIGN(?,?,?,?,?,?)}"
DRVR SQLS sql=<{call PKG_REASSIGN.I01_REASSIGN(?,?,?,?,?,?)}>
DRVR OPER OraclePreparedStatement.setBigDecimal(paramIndex=1, x=790846)
DRVR OPER OraclePreparedStatement.setString(paramIndex=2, x=FBGJ)
DRVR OPER OraclePreparedStatement.setString(paramIndex=3, x=BALMKR01)
DRVR OPER OraclePreparedStatement.setString(paramIndex=4, x=IMRVER71)
DRVR OPER OraclePreparedStatement.setString(paramIndex=5, x=10.128.28.245)
DRVR OPER OracleCallableStatement.registerOutParameter(paramIndex=6, sqlType=2, scale=0, maxLength=-1)
DRVR OPER OracleCallableStatement.registerOutParameterBytes(paramIndex=6, sqlType=2, scale=0, maxLength=-1)
DRVR OPER OracleConnection.setAutoCommit(autoCommit=false)
DRVR OPER OracleConnection.setAutoCommit(autoCommit): return
DRVR OPER OraclePreparedStatement.execute()
DRVR OPER OraclePreparedStatement.executeUpdate()
DRVR OPER OracleConnection.getAutoCommit() returned false
DRVR OPER OracleStatement.cleanupForBatching()
DRVR OPER OracleCallableStatement.sendBatch()
Performing a pooledConnection.notifyListener() in ConnectionImpl.class
Doing a getConnection() in Jdbc2PoolDataSource
DRVR OPER OracleConnection.setAutoCommit(autoCommit=true)
DRVR OPER OracleConnection.setAutoCommit(autoCommit): return
DRVR OPER OracleConnection.setReadOnly(readOnly=false)
DRVR SQLS SQL: "SET TRANSACTION READ WRITE"
DRVR OPER OracleConnection.getDefaultFixedString() returning false
DRVR OPER ResultSetUtil.needIdentifier(typeCode=1): return: false
DRVR OPER OraclePreparedStatement.execute()
DRVR OPER OraclePreparedStatement.executeUpdate()
DRVR SQLS Input SQL: "SET TRANSACTION READ WRITE"
DRVR OPER OracleConnection.getAutoCommit() returned true
DRVR OPER OracleStatement.cleanupForBatching()
DRVR OPER OraclePreparedStatement.sendBatch()
com.*********.common.serviceexecutor.ServiceExecutorException: com.*********.common.exception.SCBBaseException: SQL Exception occured while getting connection from ConnectionPool in SQLMassRetrieveExecutor
at com.*********.common.serviceexecutor.Service.executeMethodsInOrder(Unknown Source)
at com.*********.common.serviceexecutor.Service.execute(Unknown Source)
at com.*********.common.serviceexecutor.ServiceDefinition.executeServices(Unknown Source)
at com.*********.common.serviceexecutor.StatelessServiceExecutorImpl.executeServiceDefinition(Unknown Source)
at com.*********.common.sessionutil.PageManager.executeServiceExecutor(Unknown Source)
at com.*********.common.sessionutil.PageManager.executeMethod(Unknown Source)
at com.*********.common.sessionutil.PageManager.getFirstPage(Unknown Source)
at com.*********.common.sessionutil.PageManager.getPages(Unknown Source)
at com.*********.sci.view.action.VerifyQueueListAction.perform(VerifyQueueListAction.java:124)
at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1787)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
at org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.java:1759)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1596)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at com.*********.sci.appservice.commonservices.FilterNew.doFilter(FilterNew.java:23)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:457)
at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:576)
at java.lang.Thread.run(Thread.java:536)
Caused by: com.*********.common.exception.SCBBaseException: SQL Exception occured while getting connection from ConnectionPool in SQLMassRetrieveExecutor
at com.*********.common.dbexecutor.SQLMassRetrieveExecutor.<init>(Unknown Source)
at com.*********.common.dbexecutor.ConnectionRetriever.getInstance(Unknown Source)
at com.*********.sci.appservice.queue.VerifyQueueListService.getDatabaseRowSetConnection(VerifyQueueListService.java:96)
at com.*********.sci.appservice.queue.VerifyQueueListService.getVerifyQueueList(VerifyQueueListService.java:157)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
... 51 more
Caused by: java.sql.SQLException: ORA-01453: SET TRANSACTION must be first statement of transaction
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:590)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1973)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1119)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2191)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2064)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2989)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:658)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:736)
at oracle.jdbc.driver.OracleConnection.setReadOnly(OracleConnection.java:1631)
at com.*********.common.connectionpool.adapter.ConnectionImpl.setReadOnly(ConnectionImpl.java:203)
at com.*********.common.connectionpool.newp.Jdbc2PoolDataSource.getConnection(Jdbc2PoolDataSource.java:645)
at com.*********.common.connectionpool.newp.Jdbc2PoolDataSource.getConnection(Jdbc2PoolDataSource.java:534)
... 59 more
Is oracle missing a COMMIT before it is passing the SET TRANSACTION statement??. and is there any relation between the AutoCommit and the Isolation level?

Similar Messages

  • Connection Pool - unable to establish connection for one or more OC4J inst.

    Hi.
    I'm using Oracle JDeveloper 10.1.3.1 to develop some app. Database is Oracle XE 10.2.0. Application server is Oracle Aplication Server 10.1.3.1
    After create a needed code, I' v tried establish Connection Pool. When I' v tested connection, next errors was occurred:
    Unable to establish connection for one or more OC4J instances<<
    Home on admin.FRIEND-6843859F - Failed due to error: "Exception occurred testing connection. Exception: java.sql.SQLException: invalid arguments in call."<<"FRIEND-6843859F " is Computer name where Application server is installed.
    --Database is started.
    --App.server processes are started.
    How can I solve this problem?
    Thanx

    If you are using ADF "BC" Jdev will not support more than one connection
    I've tryied and always gives a errors.

  • Oc4j connection pool: too much INACTIVE connections

    I am publishing an application - developed using Eclipse and previously published in Tomcat (where it works perfectly for a long time) - within corporate servers using Oc4j version 10.1.3. The database server is Oracle 9g.
    After the deployment operation, the application seems to work, but that happens during the work by users, there are still many connections whith status "INACTIVE", until to complete all the available connections.
    The datasource is set as follows:
    <connection-pool name="ConnectionPoolRichiestaPubblicazione">
    <connection-factory factory-class="oracle.jdbc.pool.OracleDataSource"
    user="REDAZIONE"
    password="password"
    url="jdbc:oracle:thin:@(DESCRIPTION=(FAILOVER=ON)
         (ADDRESS_LIST=(LOAD_BALANCE=ON)
         (ADDRESS=(PROTOCOL=TCP)
         (HOST=10.146.2.86)(PORT=1521))
         (ADDRESS=(PROTOCOL=TCP)(HOST=10.146.2.86)(PORT=1521)))
         (CONNECT_DATA=
    (SERVER=DEDICATED)
    (SERVICE_NAME=XE)
    (FAILOVER_MODE=(TYPE=SELECT)(METHOD=BASIC)(RETRIES=180)(DELAY=5))))">
    </connection-factory>
    </connection-pool>
    <managed-data-source
    jndi-name="jdbc/RichiestaPubblicazioneDS"
    name="RichiestaPubblicazioneDS"
    connection-pool-name="ConnectionPoolRichiestaPubblicazione" />
    The java code to establish a connection is as follows:
    private Connection creaConnessioneDataSource(String nomedatasource) throws ConnessioneException{
              LOGGER.debug("START");
              try {
                   InitialContext context = new InitialContext();
                   DataSource ds = (DataSource)context.lookup(nomedatasource);
                   LOGGER.debug("URL DATASOURCE : " + ds.getConnection().getMetaData().getURL());
                   LOGGER.debug("USERNAME : " + ds.getConnection().getMetaData().getUserName());
                   this.conn = ds.getConnection();
              catch( Exception e ) {
                   LOGGER.error("Errore nella connessione tramite datasource : " + StringUtils.getCustomStackTrace(e));
              LOGGER.debug("END");
              return this.conn;
    Connections and statements are closed using the following methods:
         public boolean chiudi(Connection conn){
              LOGGER.debug("START");
              boolean esito = false;
              if (conn != null){
                   try {
                        conn.close();
                        esito = true;
                        LOGGER.debug("Connessione chiusa");
                   catch (SQLException e) {
                        LOGGER.error("Eccezione nella chiusura della connessione : " + e);
              LOGGER.debug("END");
              return esito;
         public boolean chiudi(Statement stmt){
              LOGGER.debug("START");
              boolean esito = false;
              if (stmt != null){
                   try {
                        stmt.close();
                        esito = true;
                        LOGGER.debug("Statement chiuso");
                   } catch (SQLException e) {
                        LOGGER.error("Eccezione nella chiusura dello statement : " + e);
                        e.printStackTrace();
              LOGGER.debug("END");
              return esito;
    Here are a couple of examples of code that interact with the database:
         public List<StatoRichiestaSintesi> getElencoStatiRichieste() throws ConnessioneException{
              LOGGER.debug("START");
              List<StatoRichiestaSintesi> listaStati=new LinkedList<StatoRichiestaSintesi>();
              LOGGER.debug("Apriamo connessione e statement");
              Connection conn = databaseManager.creaConnessioneDataSource(datasource);
              Statement stmt = databaseManager.creaStatement(conn, false);
              String sql="SELECT * FROM STATORICHIESTA";
              try {
                   ResultSet rs = stmt.executeQuery(sql);
                   while(rs.next()){
                        StatoRichiestaSintesi temp=new StatoRichiestaSintesi();
                        temp.setIdStato(rs.getString(1));
                        temp.setDescrizioneStato(rs.getString(2));
                        listaStati.add(temp);
                   LOGGER.debug("Numero record trovati : " + listaStati.size());
              } catch (SQLException e) {
                   LOGGER.error("Eccezione di tipo SQL : " + StringUtils.getCustomStackTrace(e));
              finally{
                   LOGGER.debug("Chiusura di statement e connessione");
                   databaseManager.chiudi(stmt);
                   databaseManager.chiudi(conn);
              LOGGER.debug("END");
              return listaStati;
    Below is another example using PreparedStatement:
         private synchronized void aggiungiIndicazioneProgetto(String idprogetto, String idrichiesta) {
              LOGGER.debug("START");
              LOGGER.debug("Creo un oggetto di tipo connessione");
              Connection conn = databaseManager.creaConnessioneDataSource(datasource);
              LOGGER.debug("Definisco una query sql");
              String sql = "INSERT INTO RICHIESTAPROGETTO (IDRICHIESTA,IDPROGETTO) VALUES (?,?)";
              LOGGER.debug("Dichiaro un oggetto di tipo preparedstatement");
              PreparedStatement stmt = null;
              try {
                   LOGGER.debug("Istanzio l'oggetto statement");
                   stmt = conn.prepareStatement(sql);
                   LOGGER.debug("Imposto i segnalibri della query");
                   stmt.setString(1, idrichiesta);
                   stmt.setString(2, idprogetto);
                   LOGGER.debug("Eseguo la query di inserimento del progetto");
                   stmt.executeUpdate();
              } catch (SQLException e) {
                   LOGGER.error("Eccezione di tipo SQL : " + StringUtils.getCustomStackTrace(e));
              finally {
                   LOGGER.debug("Chiusura di statement e connessione");
                   databaseManager.chiudi(stmt);
                   databaseManager.chiudi(conn);
              LOGGER.debug("END");
         Which may be the cause for the described behavior?
         I hope someone help me..

    My problem is the following.
    If I deploy my application with the illustred datasource in my local OC4J (10.1.3 in a Standalone Environment) all work fine.
    The application creates a reasonable number of connections (in ORACLE - 10g Enterprise Edition Release 10.2.0.4.0 - db I run the query verification "select count(*) from v$session where username='MYAPPLICATION'"), and overall performance is very good.
    If, however, to deploy on the production machine of corporate (always 10.1.3, but obviously in Oracle Application Server Environment) the
    number of connections (status 'INACTIVE') grows massively, and this is saturated in a short time.
    The exception that at the end from the application is that:
    java.sql.SQLException: ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux Error: 2: No such file or directory
    oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
    oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
    oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:277)
    oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
    oracle.jdbc.driver.T4CTTIoauthenticate.receiveOsesskey(T4CTTIoauthenticate.java:243)
    oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:304)
    oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:430)
    oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:151)
    oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
    oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:608)
    oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:218)
    oracle.jdbc.pool.OracleConnectionPoolDataSource.getPhysicalConnection(OracleConnectionPoolDataSource.java:114)
    oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:77)
    oracle.jdbc.pool.OracleImplicitConnectionCache.makeCacheConnection(OracleImplicitConnectionCache.java:1361)
    oracle.jdbc.pool.OracleImplicitConnectionCache.getCacheConnection(OracleImplicitConnectionCache.java:441)
    oracle.jdbc.pool.OracleImplicitConnectionCache.getConnection(OracleImplicitConnectionCache.java:336)
    oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:286)
    oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:179)
    oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:159)
    oracle.oc4j.sql.DataSourceConnectionPoolDataSource.getPooledConnection(DataSourceConnectionPoolDataSource.java:57)
    oracle.oc4j.sql.xa.EmulatedXADataSource.getXAConnection(EmulatedXADataSource.java:92)
    oracle.oc4j.sql.spi.ManagedConnectionFactoryImpl.createXAConnection(ManagedConnectionFactoryImpl.java:211)
    oracle.oc4j.sql.spi.ManagedConnectionFactoryImpl.createManagedConnection(ManagedConnectionFactoryImpl.java:170)
    com.evermind.server.connector.ApplicationConnectionManager.createManagedConnection(ApplicationConnectionManager.java:1377)
    oracle.j2ee.connector.ConnectionPoolImpl.createManagedConnectionFromFactory(ConnectionPoolImpl.java:327)
    oracle.j2ee.connector.ConnectionPoolImpl.access$800(ConnectionPoolImpl.java:98)
    also I add the other attributes of Connection Pool of the Datasource:
    Connections:
    Initial size of Connection Cache = 0     
    Minimum Number of Connections = 0
    Maximum Number of Connections = -1
    Connection Retry Interval (seconds) = 1
    Maximum Connection Attempts = 3
    Maximum Number of Statements Cached = 0     
    Lower Threshold Limit On Pool (%)= 20     
    Validate Connection = False
    What I can do?
    many thanks..

  • Connection Pooling - how to close properly?? PLEASE HELP!

    I am very confused about something and cannot find a clear answer within the Oracle docs or Sun's Java docs. When using connection pooling, you create an OracleConnectionPoolDataSource, obtain a PooledConnection, then a JDBC Connection (this is fine). But when finished, you close the JDBC Connection, but what about the PooledConnection? Do you close this too? Or do you just leave it and let it get garbage collected? Is the implementation smart enough to release/reuse PooledConnections when the underlying JDBC Connection is closed? It seems to me that if you close the PooledConnection too, then how/when does the pooling come into place? How/where are the pool parameters (max num of connections) controlled? Please Help! Thank you!

    I have implemented a pooled JDBC connection & driver in a large project. So I know something about this topic.
    java.sql.* is only interface, that means this package needs implementation. Under an ordinary circumstance, a Connection is an Client/Server communication, when you call close() method, the communication is really closed, so next time, you should reinstantiate the client/server connection, passing authentication and authorization testing, this is a lot of load to the system; connection pool uses a different mechanism to try to save this load, that is, when you call close() method of Connection, the connection is not really closed, but just set a flag to tell the system this connection is available to others, so next time when you call DriverManager.getConnection(...), the available connection will be returned to the caller, and because this connection has already passed authentication and aothorization, the socker between is available, so the extra load could be saved, in other words, the application could use it immediately.
    Check java.sql.Driver interface, you will see boolean acceptsURL(String url) and java.sql.Connection connect(String url, java.util.Properties info) methods, first method is used by DriverManager to judge which JDBC driver should be used according to your connection's url format, then that driver's connect(...) method will be called to return an connection. For pooled connection, when you call connection.close() method, the Connection object is not garbage collected but return a pooled connection manager or repository, so it could be reused by other application.
    Hope this helps.
    //jdev

  • Can't create connection pool using weblogic 6.1 with Oracle thin driver

    Hi !
    I have tried to create a connection pool from adminconsole. My CLASSPATH setting
    is as follows :
    F:\SOAP\soap-2_2\lib;F:\SOAP\soap-2_2;
    D:\Oracle\Ora81\jdbc\lib\classes12.zip;
    D:\Oracle\Ora81\jdbc\lib\nls_charset12.zip;
    D:\Oracle\Ora81\jdbc\lib\classes111.zip;
    F:\SOAP\soap-2_2\lib\jaf-1.0.1\activation.jar;
    D:\Oracle\Ora8\Apache\Jsdk\src\javax\servlet\http;
    D:\Oracle\Ora81\Apache\Jsdk\src\javax\servlet;
    D:\Oracle\Ora81\lib;
    F:\ant\jakarta-ant1.\bin;
    E:\weblogic\oci\classes;
    E:\weblogic\oci\classes\weblogic\xml\license;
    E:\weblogic\oci\license;
    E:\bea\wlserver6.1\lib;
    E:\PetStoreHome\petstore1.3;
    Following is the configuration.
    #Oracle thin driver Method #2
    weblogic.jdbc.connectionPool.thin=\      
    url=jdbc:oracle:thin:@test:1521:PROJECT,\      
    driver=oracle.jdbc.driver.OracleDriver,\
         initialCapacity=4,\
         maxCapacity=10,\
         capacityIncrement=1,\
         props=user=xxx;password=xxx;server=test
    #Add a TXDataSource for the connection pool:
    weblogic.jdbc.TXDataSource.weblogic.jdbc.jts.thin=thin
    # Add an ACL for the connection pool:
    weblogic.allow.reserve.weblogic.jdbc.connectionPool.thin=everyone
    I did append the file weblogic.properties with the above config. Now when I start
    the Weblogic server I get the following error :
    Starting WebLogic Server ....
    <Nov 29, 2001 2:24:16 PM EST> <Notice> <Management> <Loading configuration file
    .\config\petstore\config.xml ...>
    <Nov 29, 2001 2:24:22 PM EST> <Notice> <WebLogicServer> <Starting WebLogic Admin
    Server "petstoreServer" for domain "petstore">
    <Nov 29, 2001 2:24:26 PM EST> <Notice> <Management> <Starting discovery of Manag
    ed Server... This feature is on by default, you may turn this off by passing -Dw
    eblogic.management.discover=false>
    <Nov 29, 2001 2:24:35 PM EST> <Error> <JDBC> <Error during Data Source creation:
    weblogic.common.ResourceException: DataSource(jdbcthin.SignOnDB) can't be creat
    ed with non-existent Pool (connection or multi) (thin)>
    <Nov 29, 2001 2:24:35 PM EST> <Error> <JDBC> <Error during Data Source creation:
    weblogic.common.ResourceException: DataSource(jdbcthin.EstoreDB) can't be creat
    ed with non-existent Pool (connection or multi) (thin)>
    <Nov 29, 2001 2:24:35 PM EST> <Error> <JDBC> <Error during Data Source creation:
    weblogic.common.ResourceException: DataSource(jdbcthin.InventoryDB) can't be
    cr
    eated with non-existent Pool (connection or multi) (thin)>
    <Nov 29, 2001 2:24:35 PM EST> <Error> <JDBC> <Error during Data Source creation:
    weblogic.common.ResourceException: DataSource(weblogic.jdbc.jts.thin) can't be
    created with non-existent Pool (connection or multi) (thin)>
    <Nov 29, 2001 2:24:41 PM EST> <Notice> <Management> <Application Poller not star
    ted for production server.>
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    After the server has booted, your browser should
    automatically launch and point to the WebLogic Server
    Tour running on this server. If your browser fails to
    launch, point your browser to the URL
    "http://burtsun:7001"
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    <Nov 29, 2001 2:24:41 PM EST> <Notice> <WebLogicServer> <ListenThread listening
    on port 7001>
    <Nov 29, 2001 2:24:41 PM EST> <Notice> <WebLogicServer> <SSLListenThread listeni
    ng on port 7002>
    <Nov 29, 2001 2:24:42 PM EST> <Notice> <WebLogicServer> <Started WebLogic Admin
    Server "petstoreServer" for domain "petstore" running in Production Mode>
    Could anyone please help me ?
    Thanks
    ..Madhuri

    Madhuri wrote:
    >
    Hi Joe !
    I didn't get what you would like to point out. Actully, I am using same config.,
    but not to disclose the info. I gave you @test and username/password xxx/xxx.Ok. Now, assuming your pool looks like what I showed, the issue is probably
    that there are multiple Oracle driver zips around, and your standlaone program
    is using a different, newer, better one than the server. Our weblogic jar files
    include a classes12.zip Oracle thin driver, but there are multiple versions of
    classes12.zip, and the latest from oracle is better than the one we sealed into
    our packaging. Please use jave -verbose to identify exactly which Oracle sip file
    you are using in the successful case, then make sure this zip file comes before
    any weblogic stuff in your weblogic server's classpath, so we'll use the same
    driver. This should work. Edit the script you sue to start weblogic to verify
    the classpath does end up with the oracle driver ahead of all weblogic stuff.
    Joe
    >
    Please let me know.
    Thanks
    .Madhuri
    Joseph Weinstein <[email protected]> wrote:
    Madhuri wrote:
    Hi Joe !
    Here is the sample java code. Please let me know how I can test thisin weblogic
    6.1.
    Thanks
    .MadhuriWell fine! That was easy. Your pool definition didn't have the same URL
    or
    user or password as this code. Try this for your pool definition:
    weblogic.jdbc.connectionPool.thin=\
    url=jdbc:oracle:thin:@adl-gbsdevel:1521:PROJECT,\
    driver=oracle.jdbc.driver.OracleDriver,\
    initialCapacity=10,\
    maxCapacity=10,\
    capacityIncrement=1,\
    testConnsOnReserve=true,\
    testTable=dual,\
    props=user=mkelkar;password=mkelkar
    Let me know,,,
    Joe
    Joseph Weinstein <[email protected]> wrote:
    The key is in the log:
    Could not create pool connection.
    The DBMS driver exception was:
    java.sql.SQLException: invalid arguments in call
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    Now we need to simplify the problem. Please make a simple 15-line
    standalone
    Java program like you'd find with the Oracle driver's examples, with
    no
    weblogic code in the picture. Just make a JDBC connection using Oracle's
    driver, and show me that code. Then I can translate that into a pool
    definition.
    Joe
    Madhuri wrote:
    Hi Joe !
    Thanks for your prompt reply. I tried the way you suggested but
    it
    still it gives
    me the same error. I am attching here the weblogic.log file.
    Thanks again
    ..Madhuri
    Joseph Weinstein <[email protected]> wrote:
    We'd want to see the log during booting, where the pool
    is being created to see why that failed. Try a pool
    definition with no blank lines, no whitespace at the
    end of lines, and no server property. The thin driver
    doesn't like that:
    weblogic.jdbc.connectionPool.thin=\
    url=jdbc:oracle:thin:@test:1521:PROJECT,\
    driver=oracle.jdbc.driver.OracleDriver,\
    initialCapacity=4,\
    maxCapacity=10,\
    capacityIncrement=1,\
    props=user=xxx;password=xxx
    Joe
    Madhuri wrote:
    Hi !
    I have tried to create a connection pool from adminconsole. My
    CLASSPATH
    setting
    is as follows :
    F:\SOAP\soap-2_2\lib;F:\SOAP\soap-2_2;
    D:\Oracle\Ora81\jdbc\lib\classes12.zip;
    D:\Oracle\Ora81\jdbc\lib\nls_charset12.zip;
    D:\Oracle\Ora81\jdbc\lib\classes111.zip;
    F:\SOAP\soap-2_2\lib\jaf-1.0.1\activation.jar;
    D:\Oracle\Ora8\Apache\Jsdk\src\javax\servlet\http;
    D:\Oracle\Ora81\Apache\Jsdk\src\javax\servlet;
    D:\Oracle\Ora81\lib;
    F:\ant\jakarta-ant1.\bin;
    E:\weblogic\oci\classes;
    E:\weblogic\oci\classes\weblogic\xml\license;
    E:\weblogic\oci\license;
    E:\bea\wlserver6.1\lib;
    E:\PetStoreHome\petstore1.3;
    Following is the configuration.
    #Oracle thin driver Method #2
    weblogic.jdbc.connectionPool.thin=\
    url=jdbc:oracle:thin:@test:1521:PROJECT,\
    driver=oracle.jdbc.driver.OracleDriver,\
    initialCapacity=4,\
    maxCapacity=10,\
    capacityIncrement=1,\
    props=user=xxx;password=xxx;server=test
    #Add a TXDataSource for the connection pool:
    weblogic.jdbc.TXDataSource.weblogic.jdbc.jts.thin=thin
    # Add an ACL for the connection pool:
    weblogic.allow.reserve.weblogic.jdbc.connectionPool.thin=everyone
    I did append the file weblogic.properties with the above config.
    Now
    when I start
    the Weblogic server I get the following error :
    Starting WebLogic Server ....
    <Nov 29, 2001 2:24:16 PM EST> <Notice> <Management> <Loading
    configuration
    file
    \config\petstore\config.xml ...>
    <Nov 29, 2001 2:24:22 PM EST> <Notice> <WebLogicServer> <Starting
    WebLogic
    Admin
    Server "petstoreServer" for domain "petstore">
    <Nov 29, 2001 2:24:26 PM EST> <Notice> <Management> <Starting
    discovery
    of Manag
    ed Server... This feature is on by default, you may turn this
    off
    by
    passing -Dw
    eblogic.management.discover=false>
    <Nov 29, 2001 2:24:35 PM EST> <Error> <JDBC> <Error during Data
    Source
    creation:
    weblogic.common.ResourceException: DataSource(jdbcthin.SignOnDB)
    can't
    be creat
    ed with non-existent Pool (connection or multi) (thin)>
    <Nov 29, 2001 2:24:35 PM EST> <Error> <JDBC> <Error during Data
    Source
    creation:
    weblogic.common.ResourceException: DataSource(jdbcthin.EstoreDB)
    can't
    be creat
    ed with non-existent Pool (connection or multi) (thin)>
    <Nov 29, 2001 2:24:35 PM EST> <Error> <JDBC> <Error during Data
    Source
    creation:
    weblogic.common.ResourceException: DataSource(jdbcthin.InventoryDB)can't be
    cr
    eated with non-existent Pool (connection or multi) (thin)>
    <Nov 29, 2001 2:24:35 PM EST> <Error> <JDBC> <Error during Data
    Source
    creation:
    weblogic.common.ResourceException: DataSource(weblogic.jdbc.jts.thin)can't be
    created with non-existent Pool (connection or multi) (thin)>
    <Nov 29, 2001 2:24:41 PM EST> <Notice> <Management> <Application
    Poller
    not star
    ted for production server.>
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    After the server has booted, your browser should
    automatically launch and point to the WebLogic Server
    Tour running on this server. If your browser fails to
    launch, point your browser to the URL
    "http://burtsun:7001"
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    <Nov 29, 2001 2:24:41 PM EST> <Notice> <WebLogicServer> <ListenThreadlistening
    on port 7001>
    <Nov 29, 2001 2:24:41 PM EST> <Notice> <WebLogicServer> <SSLListenThreadlisteni
    ng on port 7002>
    <Nov 29, 2001 2:24:42 PM EST> <Notice> <WebLogicServer> <Started
    WebLogic
    Admin
    Server "petstoreServer" for domain "petstore" running in ProductionMode>
    Could anyone please help me ?
    Thanks
    ..Madhuri
    Name: weblogic.log
    weblogic.log Type: Text Document (application/x-unknown-content-type-txtfile)
    Encoding: base64
    Name: PrintColumns.java
    PrintColumns.java Type: Visual Cafe File (application/x-unknown-content-type-VisualCafeFile.Document)
    Encoding: base64

  • Cannot create connection pool with weblogic jDriver XA for oracle

    Hi everybody,
    we have serious problems configuring the weblogic jDriver for Oracle with support
    for distributed transactions.
    Everything works fine with the non-XA driver.
    We tried the suggestions given here before like setting the environment variable
    ORACLE_SID. However, this does not change the errors we get. We use Weblgic Server
    6.1 SP2 with oracle 8.1.7 (client and server) under Windows NT.
    When attempting to create the connection pool, we get the following exception:
    Starting Loading jDriver/Oracle .....
    <14.05.2002 15:48:30 CEST> <Error> <JDBC> <Cannot startup connection pool "DiplPool"
    weblogic.common.ResourceException: java.sql.SQLException: open failed for XAResource
    'DiplPool' with error XAER_RMERR : A resource manager error has occured in the transaction
    branch. Check Oracle XA trace file(s) (if any) for database errors. The Oracle XA
    trace file(s) are located at the directory where you start the Weblogic Server, and
    have names like xa_<pool_name><MMDDYYYY>.trc.
    at weblogic.jdbc.oci.xa.XAConnection.<init>(XAConnection.java:58)
    at weblogic.jdbc.oci.xa.XADataSource.getXAConnection(XADataSource.java:601)
    at weblogic.jdbc.common.internal.XAConnectionEnvFactory.makeConnection(XAConnectionEnvFactory.java:200)
    at weblogic.jdbc.common.internal.XAConnectionEnvFactory.createResource(XAConnectionEnvFactory.java:57)
    at weblogic.common.internal.ResourceAllocator.makeResources(ResourceAllocator.java:698)
    at weblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.java:282)
    at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.java:623)
    at weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:107)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
    The trace file looks like this:
    ORACLE XA: Version 8.1.5.0.0. RM name = 'Oracle_XA'.
    113105.161:160.160.-1344514975:
    xaoopen: xa_info=Oracle_XA+Acc=P/schamper/schamper+SesTm=100+DB=DiplPool+Threads=true+LogDir=.+DbgFl=0x15,rmid=-1344514975,flags=0x0
    113105.161:160.160.-1344514975:
    ORA-12560: TNS: Fehler bei Protokolladapter
    113105.161:160.160.-1344514975:
    xaolgn_help: XAER_RMERR; OCIServerAttach failed. ORA-12560.
    113105.161:160.160.-1344514975:
    xaoopen: return -3
    We suspect that we do not set the properties of the connection pool correctly. The
    declaration of the pool in config.xml looks something like the following:
    <JDBCConnectionPool CapacityIncrement="1" DriverName="weblogic.jdbc.oci.xa.XADataSource"
    InitialCapacity="10" MaxCapacity="15" Name="DiplPool"
    Properties="user=scott;password=tiger;url=jdbc:weblogic:oracle:srlaptop_aidenbach.muc.sdm-research.de;dataSourceName=DiplPool"
    Targets="Marvin" TestTableName="privcust" URL="jdbc:weblogic:oracle:srlaptop_aidenbach.muc.sdm-research.de"/>
    Are there any known issues with the XA driver and the versions of oracle and Weblogic
    we use? Can someone tell us how exactly we have to define the connection pool or
    provide an example?
    Any help would be greatly appreciated.
    Best regards,
    Michael

    Hi Michael
    Here is an example connection pool tag,
    <JDBCConnectionPool
    Name="oraXAPool"
    Targets="myserver"
    DriverName="weblogic.jdbc.oci.xa.XADataSource"
    InitialCapacity="1"
    MaxCapacity="10"
    CapacityIncrement="2"
    Properties="user=scott;password=tiger;server=ORCL"
    />
    Ensure that the server=ORCL is replaced by server=<what ever the Alias is
    defined in TNSNAMES.ORA file>
    You dont have to specify the URL for this.
    hth
    sree
    "Michael Wufka" <[email protected]> wrote in message
    news:[email protected]...
    >
    Hi everybody,
    we have serious problems configuring the weblogic jDriver for Oracle withsupport
    for distributed transactions.
    Everything works fine with the non-XA driver.
    We tried the suggestions given here before like setting the environmentvariable
    ORACLE_SID. However, this does not change the errors we get. We useWeblgic Server
    6.1 SP2 with oracle 8.1.7 (client and server) under Windows NT.
    When attempting to create the connection pool, we get the followingexception:
    Starting Loading jDriver/Oracle .....
    <14.05.2002 15:48:30 CEST> <Error> <JDBC> <Cannot startup connection pool"DiplPool"
    weblogic.common.ResourceException: java.sql.SQLException: open failed forXAResource
    'DiplPool' with error XAER_RMERR : A resource manager error has occured inthe transaction
    branch. Check Oracle XA trace file(s) (if any) for database errors. TheOracle XA
    trace file(s) are located at the directory where you start the WeblogicServer, and
    have names like xa_<pool_name><MMDDYYYY>.trc.
    at weblogic.jdbc.oci.xa.XAConnection.<init>(XAConnection.java:58)
    atweblogic.jdbc.oci.xa.XADataSource.getXAConnection(XADataSource.java:601)
    atweblogic.jdbc.common.internal.XAConnectionEnvFactory.makeConnection(XAConnec
    tionEnvFactory.java:200)
    atweblogic.jdbc.common.internal.XAConnectionEnvFactory.createResource(XAConnec
    tionEnvFactory.java:57)
    atweblogic.common.internal.ResourceAllocator.makeResources(ResourceAllocator.j
    ava:698)
    atweblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.java:282
    atweblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.java:623
    at weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:107)
    atweblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentT
    arget.java:329)
    The trace file looks like this:
    ORACLE XA: Version 8.1.5.0.0. RM name = 'Oracle_XA'.
    113105.161:160.160.-1344514975:
    xaoopen:xa_info=Oracle_XA+Acc=P/schamper/schamper+SesTm=100+DB=DiplPool+Threads=true
    LogDir=.DbgFl=0x15,rmid=-1344514975,flags=0x0
    113105.161:160.160.-1344514975:
    ORA-12560: TNS: Fehler bei Protokolladapter
    113105.161:160.160.-1344514975:
    xaolgn_help: XAER_RMERR; OCIServerAttach failed. ORA-12560.
    113105.161:160.160.-1344514975:
    xaoopen: return -3
    We suspect that we do not set the properties of the connection poolcorrectly. The
    declaration of the pool in config.xml looks something like the following:
    <JDBCConnectionPool CapacityIncrement="1"DriverName="weblogic.jdbc.oci.xa.XADataSource"
    InitialCapacity="10" MaxCapacity="15" Name="DiplPool"
    Properties="user=scott;password=tiger;url=jdbc:weblogic:oracle:srlaptop_aide
    nbach.muc.sdm-research.de;dataSourceName=DiplPool"
    Targets="Marvin" TestTableName="privcust"URL="jdbc:weblogic:oracle:srlaptop_aidenbach.muc.sdm-research.de"/>
    >
    Are there any known issues with the XA driver and the versions of oracleand Weblogic
    we use? Can someone tell us how exactly we have to define the connectionpool or
    provide an example?
    Any help would be greatly appreciated.
    Best regards,
    Michael

  • JDBC CONNECTION POOL FOR WEBLOGIC 8.1 TO ORACLE 8.1.6

    I am having problems with my connection pool. When I try to use the classes12 driver I get periodic TNS:connection closed errors and I can not set my initial pool size very high because one will fail with this error. When I try to use the ojdbc14 driver I get a character set not supported error. I am using the nls_charset12.jar file
    I am running weblogic 8.1 sp2. I am connecting to an Oracle 8.1.6 database.
    Any suggestions would be greatly appreciated.
    Thanks
    Eric

    eric brantingham wrote:
    Hi, thanks for your assistance. Here is the log dump.You should add a 1-second login delay for the pool. (loginDelaySeconds=1).
    Oracle can get swamped and ocasionally fail valid connection requests if
    too many are sent in a short time, such as when a pool is being initially
    populated. This setting will put a delay between successive connection
    requests, and should solve the problem.
    Joe
    >
    ####<Aug 30, 2004 9:45:15 AM EDT> <Warning> <JDBC> <sun1523.daytonoh.ncr.com> <s
    moaServer> <ExecuteThread: '22' for queue: 'weblogic.kernel.Default'> <<anonymou
    s>> <> <BEA-001129> <Received exception while creating connection for pool "nolo
    aConnectionPool": ORA-12537: TNS:connection closed
    >
    ####<Aug 30, 2004 9:45:15 AM EDT> <Info> <JDBC> <sun1523.daytonoh.ncr.com> <smoa
    Server> <ExecuteThread: '22' for queue: 'weblogic.kernel.Default'> <<anonymous>>
    <> <BEA-001156> <Stack trace associated with message 001129 follows:
    java.sql.SQLException: ORA-12537: TNS:connection closed
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
    at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:1503)
    at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:309)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:198)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
    va:251)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:224)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Con
    nectionEnvFactory.java:175)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(Con
    nectionEnvFactory.java:111)
    at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourceP
    oolImpl.java:1103)
    at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourceP
    oolImpl.java:1040)
    at weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(Resourc
    ePoolImpl.java:320)
    at weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(Resourc
    ePoolImpl.java:252)
    at weblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.j
    ava:428)
    at weblogic.jdbc.common.internal.ConnectionPoolManager.reserve(Connectio
    nPoolManager.java:78)
    at weblogic.jdbc.common.internal.RmiDataSource.getPoolConnection(RmiData
    Source.java:288)
    at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSour
    ce.java:310)
    at user.User.getDbPoolConnection(User.java:174)
    at order.OrderMasterCustomer.dbRetrieveOrderCustomerHeaderData(OrderMast
    erCustomer.java:1181)
    at order.OrderMasterCustomer.dbRetrieveOrderCustomer(OrderMasterCustomer
    java:1108)
    at order.OrderMasterCustomer.dbSetPropertiesFromOrder(OrderMasterCustome
    r.java:1660)
    at order.Order.dbSetPropertiesFromOrder(Order.java:1031)
    at servlets.submitPages.OpenOrderSubmit.actionSearch(OpenOrderSubmit.jav
    a:367)
    at servlets.submitPages.OpenOrderSubmit.service(OpenOrderSubmit.java:107
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
    (ServletStubImpl.java:971)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:402)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:305)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    n.run(WebAppServletContext.java:6350)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:317)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    118)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
    rvletContext.java:3635)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
    pl.java:2585)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)

  • Connection pool running out of connections

    Hi all,
    I am using Oracle's connection pool implementation:
    OracleConnectionPoolDataSource dbConnection;
    OracleConnectionCacheImpl connectionPool;
    and tomcat 3 and 4. Sometimes on Tomcat 4 (Linux) I see that the connections are not being reutilized and therefore I run out of free connections. The same application runs fine on NT and Tomcat 3 and 4. I checked all my methods and all have a close(connection) in my finally{} and besides this the problem only happens once in a while and the program is using the same methods all the time. Anybody has a clue about what could the issue be?
    Thanks,
    A.

    have u tried setCacheScheme?

  • Connection pool not re-establishing connections, throwing exception instead

    Hello,
    I've just set up a connection pool on the sun java system application server 8 for a MySQL database using the official mysql-connector/j 5.0. Everything is working great, except when the connections timeout (or i kill them all manually from the database server) and then request a page that needs to use the DataSource object, the following exception is thrown:
    Exception thrown: com.mysql.jdbc.CommunicationsException -- Communications link failure due to underlying exception:
    ** BEGIN NESTED EXCEPTION **
    java.io.EOFException
    STACKTRACE:
    java.io.EOFException
         at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1913)
         at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2304)
         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2803)
         at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573)
         at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
         at com.mysql.jdbc.Connection.execSQL(Connection.java:3118)
         at com.mysql.jdbc.Connection.execSQL(Connection.java:3047)
         at com.mysql.jdbc.Statement.executeQuery(Statement.java:1166)
         at com.mysql.jdbc.jdbc2.optional.StatementWrapper.executeQuery(StatementWrapper.java:705)
         at beans.MySessionBean.businessMethod(MySessionBean.java:73)
         at org.apache.jsp.index_jsp._jspService(index_jsp.java:70)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:251)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         at sun.reflect.GeneratedMethodAccessor98.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:185)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:653)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:534)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask(ProcessorTask.java:403)
         at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:55)
    ** END NESTED EXCEPTION **
    Last packet sent to the server was 16 ms ago.What could be wrong?
    Thank you.

    The code is here:
        public String businessMethod() {
            //TODO implement businessMethod
            try
                InitialContext ic = new InitialContext();
                Object obj = ic.lookup("jdbc/MyDS");
                System.out.println("Object is: " + obj + " | Class is: " + obj.getClass().getName());
                DataSource ds = (DataSource)obj;
                Connection conn = ds.getConnection();
                Statement stmt = conn.createStatement();
                ResultSet rs = stmt.executeQuery("SELECT a,b FROM test");
                String ret = "";
                while(rs.next())
                    ret += rs.getString(1) + " - " + rs.getString(2) + "<br/>";
                conn.close();
                return ret;
            catch(Exception e)
                return "Exception thrown: " + e.getClass().getName() + " -- " + e.getMessage();
        }On the server, it is set up as XADataSource. I don't really have a big need for distributed transactions, but does it hurt badly to use it anyways? Could it be causing this problem?

  • Connection pooling is not really connection pooling? Right?

    Here's what I don't understand, I'm trying to pool connections but everywhere I look I see the following code:
    Connection con = null;
    try {
    con = dataSource.getConnection("username", "password");
    } catch (Exception ex}
    finally {
    con.close();
    Why is the connection closed? Isn't it supposed to be "pooled"? I have read that connections need to be closed to be reused, then what's the point of "pooling connections"? I mean, I have closely followed MySQL server connections and appears that connections are indeed closed, apparently, what "connection pooling" does is save some connection information (which is what apparently is the only thing that is "pooled") which is used to establish connections instead of reusing them.
    When I start my Java application, DataSource.getConnection() creates a connection and MySQL Administrator shows a new connection in a list of connections to MySQL. I get com.mysql.jdbc.Connection@13e6657 for that connection. After con.close() is called, that connection is removed from the list of connections and when DataSource.getConnection() is called again, I get com.mysql.jdbc.Connection34o3422 and a new connection shows up in MySQL Administrator.
    So what's the point in calling this "connection pooling"? I mean, this isn't really pooling connection but rather saving some data in the memory that is used to create connections, not saving them.

    ^ The fact that a connection is pooled is usually abstracted away from the client, such that a call to the Connection's close() method doesn't actually close the connection, but instead returns it to the pool. The example you cited above says as much. The code that @OP posted could very easily be pooled behind the scenes.
    Message was edited by:
    bckrispi

  • Struts and Connection pooling my servlet DB connections ...

    I have done extensive work using the MVC approach to application development and i am ready to move on to the nextlevel. THis next level, for me, is the STRUTS frame work of web application design. For the model portion of STRUTS, is there connection pooling contained with in the class structure or do we have to add this connection pooling ourselves. I have already develpoed DB / servlet connection pooling classes and i am looking to incorporate them into the STRUTS frame work, do i need to or is there some thing there already?

    Well, to be J2EE you could use an implementation of javax.sql.DataSource which also implements connection pooling.
    I use the one that's packaged in tomcat : exolab's tyrex. http://tyrex.exolab.org

  • Connection Pooling: how many active connections?

    Hi, everybody.
    I have a very simple question about connection pooling...
    How many active connections should a database see once a connection pool has been opened?
    I mean, it should see only one connection (the pool itself) at any time, or the number of "logical" active connections in that moment?
    Thanks for any answer.

    Sorry...
    This is the wrong forum, I posted again my question in the JDBC Forum...

  • How to purge connection pool on stale on connections

    Hello
    Our problem is when we are required to reboot the database then we have to reboot all application servers.
    Is there a way we can avoid app servers reboot.
    app server code is in VB 6.0 and .NET 1.1 (using odp.net for .net)
    in a sample application what we found that the ADO (using OraOLEDB) returns a connection where the connection state is open even after database reboot, but when try to use the connection object it throws an exception like end-of-line etc.
    so is there a way to clean up the connection pool or reset ole db connection manger.
    Any help will be greatly appreciated
    Thanks

    You're using both ODP and OLEDB then?
    ODP has a ClearPool method on a connection you can call, useful for just this situation.
    OLEDB connection pooling is done by the OLEDB framework provided by Microsoft, not by the provider itself. I dont know of any way to clear out the pool apart from restarting the application.
    Hope it helps, corrections/comments welcome
    Greg

  • Connection issues between 64 bit SSIS and Oracle in 64bit

    I've got a Win2K3 Std Ed server (x64) running 64-bit SQL Server 2005 Enterprise Edition. I've installed the Oracle 10g 64 bit and and installed ODAC 64 bit then oracle patch to take care of () issue, i managed to create a link server on management studio and connect to oracle a 64 bit server
    Now... when I try to create a new connection manager in SQL Server 2005 Integration Services i got the following error, the OLEDB provider for Oracle can't be found, and when I try to manually add an underlying OLEDB connection to the database, SQL Server reports: i got the following error....
    Test connection failed because of an error in initializing provider. The 'OraOLEDB.Oracle.1' provider is not registered on the local machine.
    Note: my sql server agent is not running on this server, let me know if this is an issue.

    I think I resolved this issue by installing Oracle 11g 32bit & 64bit clients in the 64bit SQL Server machine.
    Please refer to the detail:
    http://knol.google.com/k/jeyong-park/accessing-oracle-data-source-from-64bit/3vywlm4f31xae/12#

  • Oracle.DataAccess 2.112.1.0 - Connection Pool Problem

    Hi,
    Oracle.DataAccess 2.112.1.0 is having connection pool problem. The no. of TCP connections to Oracle database keep increasing untill the server's session run out of limit. My application created connections, use them, close them, and dispose them properly. When using previous Oracle.DataAccess 2.111.6.20, the no. of TCP connections do not increase.
    My database connection string has "Min Pool Size = 3 and Max Pool Size = 150".
    With 2.111.6.20 version, TCP connection stays at 3.
    With 2.112.1.0, TCP connection keep increasing for every 5 minutes. I've tried to disable Self Tuning, but still can't prevent the connections from increasing.
    Later today, I downloaded Oracle.DataAccess 2.112.1.2 (it comes with ODAC 11.2.0.1.2) and test again, the problem is resolved... no more connection increases... but.... it is only for 32 bit Windows.
    Unfortunately, there is no Oracle.DataAccess 2.112.1.2 for 64 bit Windows Server 2008.
    May I know how can i resolve this problem on 64bit Window installed with Oracle 11g R2 client, which comes with Oracle.DataAccess 2.112.1.0, which has serious problems...(according to this 11.2 ODP.NET causing test runner failures )
    Many thanks for your time and answers!
    Edited by: user1502907 on 04-Sep-2010 23:01

    Hi,
    The only thing that jumps out within your problem description is that connections are being increased every 5 minutes. Are you sure its every 5 minutes and not 3 minutes which is the timing interval used by the Connection Pool facility to perform connection pool maintenance. If this occurs even when the application is idle then you could be running into the following known issue filed against 11.2.0.1.0 and fixed in 11.2.0.1.2.
    Bug 9711600 - CONNECTIONS INCREASE BEYOND MAX POOL SIZE EVERY 3 MINUTE
    This is specific to using the option CommandBehavior.CloseConnection when calling execute reader. Are you using this option and then also closing the connection in code before the datareader object is closed, if so you may be hitting this bug. You can also generate an ODP trace at level 15 of the behavior and if you see negative pool counts, that is also a diagnostic that points to this bug.
    This is fixed in 11.2.0.1.0 Patch 3 or later for x64. If you have support, I recommend you open a service request to verify if this is your issue and if a patch set may help you.
    Regards
    Jenny B.

Maybe you are looking for

  • Raw files missing in import direct from canon eos 350D

    Hi, I realise that files missing for import is fairly common, but I still haven't been able to find a reason. I can load jpg and cr2 from a folder no problem, but when I attach the camera, using the latest canon WIA driver on windows xp, the window t

  • Higher resolution possible with capslock keyboard as midi contoller?

    I'm wondering if it's possible to use the capslock keyboard in logic as a midi controller with higher precision than i seem to be getting. For example, assigning the capslock keyboard to control the tune knob in the exs24 goes from 0 > +/- 24 in 1 pr

  • Convert ALV to .XLSX including HEAD of ALV

    Hello Guru's I have an ALV with columnheaders AND also als a header above with some info and a logo (on screen). When i translate this to a XLSX-spreadsheet (CNTRL-SHIFT-F7). There is an .XLSX made with data lines, column headers, BUT NO header and N

  • Macosx, instantclient and application bundle

    I'm facing strange problem - but it's maybe because I don't know too much about macosx internals. I have an application (Qt4/OCCI over Oracle InstantClient) and I want to redistribute it as a bundle. The bundle is built into required structure (requi

  • Upgrading to CS6 from CS5?

    Please help me to see if I understand Adobe's recent upgrade offer correctly... I currently have Design Premium Suite 5.0 for Mac. Looking at the CS6 Preordering page, it looks like "Adobe Creative Suite 6 Design & Web Premium" have replaced the form