Connection pooling

hi
im dreaded with a problem in connection pooling in struts .i use ide netbeans.im completly new to this topic.now i encountered an error
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet execution threw an exception
     org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
root cause
java.lang.NoSuchMethodError: strutsTutorial.userRegistration.getDataSource(Ljavax/servlet/http/HttpServletRequest;Ljava/lang/String;)Ljavax/sql/DataSource;
     strutsTutorial.userRegistration.execute(userRegistration.java:50)
     org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:413)
     org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:225)
     org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
     org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:459)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
     org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
anybody please help me as soon as possible

hi,u just try netbeans help topics instruction which lead to u container connection pooling,its pretty clearly given for the beginners.
Goto help,click the search,just type connection pooling,u can get the steps for what u asked..bye...

Similar Messages

  • RFC_FAILURE affects Connection Pool

    Using VB.NET (2003) with .Net Connector 2.0.
    An intermittent problem causes a RFC Call to fail, and an exception is raised in the .NET code. The Exception message is:
         See RFC trace file or SAP system log for more details
    The Trace file shows:
    ERROR file opened at 20051115 131423 GMT Standard
         T, SAP-REL 640,0,78 RFC-VER 3 759904 MT-SL
    <b>T:2844 Could not send rfc container 0x130
    T:2844 <* RfcCall [1] : returns 1:RFC_FAILURE
    T:2844 <* RfcCallReceive [1] : returns 1:RFC_FAILURE
    >TS> Tue Nov 15 13:14:24 2005
    T:2844 <* RfcCleanupContext [1] : returns
              18:RFC_INVALID_HANDLE
    T:2844 <* RfcCleanupContext [1] : returns
              18:RFC_INVALID_HANDLE</b>
    This error adversely affects the Connection Pool – as calls to other RFCs are now prone to similar intermittent errors…
    Is there any way to prevent the problem causing problems with Connection Pool ?
    Is there any way of removing a “faulty” connection from the pool ? (NB Close and Dispose on the connection does not help)

    The application is a Windows service - so I don't want to lose any connections. I assume that closing the connection (and not returning it) will affect the number of available connections in the pool(?).
    I'm using async. RFC call, and the problem is detected in the callback function when the EndRFCCall is performed.
    Original code:
    Public Sub Execute_RFC(ByVal parameters as string())
    ' Assign SAP Connection to RFC Proxy
    sapRFCProxy.Connection = SAPConnectionPool.GetConnectionFromPool(<i>ConnectString</i>)
    Call the SAP RFC - Asynchronously
    arAsyncResult = m_sapRFCProxy.BeginRFCCall( params..., AddressOf RFC_CallBack, objAsyncState)
    End Sub
    Private Sub RFC_CallBack(ByVal ar As IAsyncResult)
    Try
        ' Retrieve the SAP RFC Response...
        Call sapRFCProxy.EndRFCCall(ar, <i>param1, param2, etc...</i>)
    Catch ex As Exception
        ' Log the Error...
    End Try
    ' Return the Connection
    Call SAPConnections.ReturnConnection(sapRFCProxy.Connection)
    End Sub
    I have changed the code as suggest so that the connection is closed, disposed but <u>not</u> returned. This cleared the RFC_INVALID_HANDLE errors, but the main problem of a corrupted connection persists.
    Diagnostics produced by the amended code:
    <u>Trace File (Info):</u>
    2005-11-16 11:55:46Z     Warning: RfcCleanupContext failed. Closing connection
    <u>dev_RFC.trc</u>
    ERROR file opened at 20051116 115546 GMT Standard T, SAP-REL 640,0,78 RFC-VER 3 759904 MT-SL
    T:3068 ======> CPIC-CALL: 'CMSEND'
    ERROR       program state check for conversation 99610798
    TIME        Wed Nov 16 11:55:46 2005
    RELEASE     640
    COMPONENT   CPIC (TCP/IP)
    VERSION     3
    RC          471
    MODULE      r3cpic.c
    LINE        2576
    DETAIL      called function STSEND in state state=BUFFER_DATA2
    COUNTER     1
    T:3068 <* RfcCall [20] : returns 1:RFC_FAILURE
    T:3068 <* RfcCallReceive [20] : returns 1:RFC_FAILURE
    T:3068 <* RfcCleanupContext [20] : returns 1:RFC_FAILURE
    Even with the change to the code, a call to a reliable RFC will now fail <u>intermittently</u> with:
    T:2876 Could not send rfc container 0x130
    T:2876 <* RfcCall [24] : returns 1:RFC_FAILURE
    T:2876 <* RfcCallReceive [24] : returns 1:RFC_FAILURE
    Thanks

  • Connection pool / db failure

    WLS6.0 sp2 / Win2k
    Oracle 8.1.7 / Solaris 8
    problem is if DB fails, the connection pool fails, and will not restart. If I run a java weblogic.Admin EXISTS_POOL command, it says the pool doesnt exist.
    If i run a RESET_POOL, using the system user password, it comes back with:
    Exception in thread "main" javax.naming.AuthenticationException. Root exception is java.lang.Securi
    tyException: Authentication for user guest denied in realm weblogic
    <<no stack trace available>>
    I have test on reserved set (and dual as the table).
    Anyone shed any light on what could be going wrong, because right now, every time the DB fails, we have to restart the **&$"&^ server.... (and that takes around 20mins for all the apps to init)
    tks
    will

    Hi Will,
    When you bring up the server, if the database is down, your connection pools
    will not come up if you have an initial capacity greater than 0. This is a
    known issue and the workaround for this is to set the initial capacity to
    zero so the pool comes up even when the database is down, then make sure you
    set the capacity increment to the value that you like your initial capacity
    to be and have the TestConnectionOnReserve to true.
    hth
    sree
    "Will" <[email protected]> wrote in message
    news:3d13111f$[email protected]..
    WLS6.0 sp2 / Win2k
    Oracle 8.1.7 / Solaris 8
    problem is if DB fails, the connection pool fails, and will not restart.If I run a java weblogic.Admin EXISTS_POOL command, it says the pool doesnt
    exist.
    If i run a RESET_POOL, using the system user password, it comes back with:
    Exception in thread "main" javax.naming.AuthenticationException. Rootexception is java.lang.Securi
    tyException: Authentication for user guest denied in realm weblogic
    <<no stack trace available>>
    I have test on reserved set (and dual as the table).
    Anyone shed any light on what could be going wrong, because right now,every time the DB fails, we have to restart the **&$"&^ server.... (and that
    takes around 20mins for all the apps to init)
    >
    tks
    will

  • RFC_ERROR_SYSTEM_FAILURE: Time limit exceeded. Connection Pool - JCO api

    Hi Everyone
    My Connection  Pool parameters JCO api.
    client=300
    user=SISGERAL_RFC
    passwd=******
    ashost=14.29.3.120
    sysnr=00
    size=10
    I have these parameters on my Connection Pool and sometimes appear these wrongs in my application:
    1.
    2006-01-07 13:20:37,414 ERROR com.tel.webapp.framework.SAPDataSource - ##### Time limit exceeded. LOCALIZED MESSAGE = Time limit exceeded. KEY = RFC_ERROR_SYSTEM_FAILURE GROUP = 104 TOSTRING = com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR_SYSTEM_FAILURE: Time limit exceeded.
    2.
    2006-01-07 14:01:31,007 ERROR com.tel.webapp.framework.SapPoolConnectionManager - Timeout
    I’d like to know if is happening.
    Are there something wrong with my connection pool?
    What can be happening?
    Thanks

    Raghu,
    Thanks for your response.
    Yes, the pool connections are in place according to the sAP note mentioned above.
    Regards,
    Faisal

  • Connection Pool Failure: "No suitable driver"

    Hi,
    Upon server startup, I get the following result:
    <Nov 7, 2001 4:18:32 PM CST> <Error> <JDBC> <Cannot startup connection pool "ora
    cleTrufflePool" No suitable driver>
    I assumed it was a path problem, but in the startWebLogic.cmd script I've set the PATH and CLASSPATH variables to the same as in a separate command window that can successfully dbping the Oracle db.
    One thing I completely don't understand is what the URL value should be for the pool, and I can't see a pattern in the examples and docs I've found on this. Here are my pool settings, at any rate:
    Name: oracleTrufflePool
    URL: myOracleServerName
    Driver Classname: weblogic.jdbc.oci.Driver
    Properties:
    user=user
    password=password
    server=myOracleServerName
    ACLName: user
    Password: password
    As you can see, I also don't understand whether the Oracle user name and password must be duplicated in the Properties section, or should they really only be listed in the ACLName and Password fields (in the Server Console UI)?
    TIA,
    Steve

    Hi. The issue is that the URL you give is not the URL the driver (weblogic.jdbc.oci.Driver)
    wants. The URL should be "jdbc:webLogic:oci". The properties user, password and server
    will be passed to the driver for conenction attempts. The ACL is for who gets to use the
    pool, and the other password entry is only if you need the DBMS password to be encrypted
    in the XML. If so, set that password value, and don't have it in the driver properties.
    Joe
    Steve Clark wrote:
    >
    Hi,
    Upon server startup, I get the following result:
    <Nov 7, 2001 4:18:32 PM CST> <Error> <JDBC> <Cannot startup connection pool "ora
    cleTrufflePool" No suitable driver>
    I assumed it was a path problem, but in the startWebLogic.cmd script I've set the PATH and CLASSPATH variables to the same as in a separate command window that can successfully dbping the Oracle db.
    One thing I completely don't understand is what the URL value should be for the pool, and I can't see a pattern in the examples and docs I've found on this. Here are my pool settings, at any rate:
    Name: oracleTrufflePool
    URL: myOracleServerName
    Driver Classname: weblogic.jdbc.oci.Driver
    Properties:
    user=user
    password=password
    server=myOracleServerName
    ACLName: user
    Password: password
    As you can see, I also don't understand whether the Oracle user name and password must be duplicated in the Properties section, or should they really only be listed in the ACLName and Password fields (in the Server Console UI)?
    TIA,
    Steve

  • Connection Pool Failure

    Hello. I'm using wls 5.1 and Oracle 8i and an unable to make a connection pool. I keep getting the following with the message below. Where and how do I change my path?
    weblogic.common.ResourceException: weblogic.common.ResourceException:
    Could not create pool connection. The DBMS driver exception was:
    java.sql.SQLException: System.loadLibrary threw java.lang.UnsatisfiedLinkError
    'no weblogicoci36 in java.library.path'.
    at weblogic.jdbcbase.oci.Driver.connect(Driver.java:116)

    Hi,
    You need to ensure that the ORACLE_HOME is set and PATH has
    %ORACLE_HOME%\bin;%ORACLE_HOME%\lib;%WL_HOME%\bin\oci816_8 (check verison of
    database) in the server startup script.
    hth
    sree
    "Purvi" <porgie_76@> wrote in message news:3c6306f9$[email protected]..
    Hello. I'm using wls 5.1 and Oracle 8i and an unable to make a connection
    pool. I keep getting the following with the message below. Where and how do
    I change my path?
    weblogic.common.ResourceException: weblogic.common.ResourceException:
    Could not create pool connection. The DBMS driver exception was:
    java.sql.SQLException: System.loadLibrary threw
    java.lang.UnsatisfiedLinkError
    'no weblogicoci36 in java.library.path'.
    at weblogic.jdbcbase.oci.Driver.connect(Driver.java:116)

  • Easy JNDI + Connection Pool Question

    This is an easy question:
    Once I get the object represented by my connection pool from the
    Weblogic JNDI tree, how do I get a connection from the returned object
    of type weblogic.common.internal.ResourceAllocator?
    I keep getting ClassCastExceptions. I have tried
    ConnectionPoolDataSource, Connection, and DataSource.
    String conPool = "weblogic.jdbc.connectionPool.demoPool";
    try {
    Object obj = ctx.lookup(conPool);
    msg(DEBUG,"FROM LOOKUP" + obj.getClass().getName());
    //DataSource ds = (DataSource)ctx.lookup(conPool);
    //con = ds.getConnection();
    } catch (NameNotFoundException e) {
    // binding does not exist
    msg(ERROR,"BINDING DOES NOT EXIST",e);
    } catch (NamingException e) {
    // a failure occurred
    msg(ERROR,"NAMING FAILURE OCCURED",e);
    } catch (Exception e) {
    msg(ERROR,"SOME RANDOM ERROR",e);
    Thanks,
    -Jacob

    "Jacob Meushaw" wrote in message
    Once I get the object represented by my connection pool from the
    Weblogic JNDI tree, how do I get a connection from the returned object
    of type weblogic.common.internal.ResourceAllocator?
    I keep getting ClassCastExceptions.
    DataSource ds = (DataSource)ctx.lookup(conPool);I think, you must use narrow operation:
    Object reference = ctx.lookup(conPool);
    DataSource ds =
    (DataSource) PortableRemoteObject.narrow (ds,DataSource.class);
    I haven't got time to check it, but I hope that works.
    Wojtek

  • Create A Connection Pool In the ServletContextListener

    The Specification says that we should create the connection pool in the ServletContextListener. I have the code for creating a connection pool (see below). How do I create it in the ServletContextListener?
    import java.sql.Connection;
    import java.sql.SQLException;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import javax.sql.DataSource;
    public class DBConnection
       public static Connection getDBConnection() throws SQLException
          Connection conn = null;
          try
             InitialContext ctx = new InitialContext();
             DataSource ds = ( DataSource ) ctx.lookup( "java:comp/env/jdbc/MySQLDB" );
             try
                conn = ds.getConnection();
             catch( SQLException e )
                System.out.println( "Open connection failure: " + e.getMessage() );
          catch( NamingException nEx )
             nEx.printStackTrace();
          return conn;

    I use the connection pool feature provide by the server I use. Is this what I should do? Please confirm.
    import java.sql.Connection;
    import java.sql.SQLException;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import javax.sql.DataSource;
    import javax.servlet.*;
    public class CreateResources implements javax.servlet.ServletContextListener
         public void contextInitialized(ServletContextEvent sce)
              public static Connection getDBConnection() throws SQLException
                   Connection conn = null;
                   try
                        InitialContext ctx = new InitialContext();
                        DataSource ds = ( DataSource ) ctx.lookup( "java:comp/env/jdbc/MySQLDB" );
                        try
                             conn = ds.getConnection();
                        catch( SQLException e )
                             System.out.println( "Open connection failure: " + e.getMessage() );
                  catch( NamingException nEx )
                        nEx.printStackTrace();
                  return conn;
         public void contextDestroyed(ServletCotnextEvent sce)
    }

  • Issue JDBC connection pool with Glassfish 3.1.2.2 and Oracle XE 11gR2

    Hello,
    I am experiencing an issue with pinging a JDBC connection Pool.
    I installed the following without any warnings or errors:
    Operating System: Oracle Enterprise Linux 5
    Oracle XE 11gR2 (11.2.0.2.0) database
    Glassfish 3.1.2.2
    I will refer to the steps I did after the installations
    1) In the .profile file of the OS I add the following:
    JRE_HOME=/usr/java/jre1.6.0_31; export JRE_HOME
    JAVA_HOME=/usr/java/jdk1.6.0_31; export JAVA_HOME
    GLASSFISH_DIR=/u01/glassfish3
    GLASSFISH_HOME=/u01/glassfish3/glassfish
    DERBY_HOME=$GLASSFISH_DIR/javadb
    OPEN_MQ_HOME=$GLASSFISH_DIR/mq
    PATH=:$JAVA_HOME/bin:$JRE_HOME/bin:$PATH:$HOME/bin:$GLASSFISH_HOME/bin:$DERBY_HOME/bin:$OPEN_MQ_HOME/bin
    export GLASSFISH_HOME
    export DERBY_HOME
    export OPEN_MQ_HOME
    export PATH
    LD_LIBRARY_PATH=/u01/app/oracle/product/11.2.0/xe/lib; export LD_LIBRARY_PATH
    . /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh
    2) I copied the ojdbc6.jar to the $GLASSFISH_HOME/domains/domain1/lib
    3) I login to the Glassfish admin console and created a new JDBC Connection Pool.
    Pool Name: ds_orasys
    Resource Type: javax.sql.DataSource
    Datasource Classname: oracle.jdbc.pool.OracleDataSource
    User: [myschema]
    Password: [myschema password]
    URL: jdbc:oracle:thin:@localhost:1521:xe
    When I ping the connection pool I get the following message in the server log:
    [#|2012-10-23T12:14:37.069+0300|WARNING|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.service|_ThreadID=22;_ThreadName=Thread-2;|RAR8054: Exception while creating an unpooled [test] connection for pool [ ds_orasys ], Connection could not be allocated because: Invalid Oracle URL specified|#]
    [#|2012-10-23T12:14:37.071+0300|SEVERE|glassfish3.1.2|org.glassfish.admingui|_ThreadID=19;_ThreadName=Thread-2;|RestResponse.getResponse() gives FAILURE. endpoint = 'http://212.205.62.217:4848/management/domain/resources/ping-connection-pool.json'; attrs = '{id=ds_orasys}'|#]
    I tried to use different jar files. I used ojdbc6dms.jar and ojdbc14.jar.
    I also copied the jar files in the $GLASSFISH_HOME/domains/domain1/lib/ext directory as some people suggested. Still no luck. I keep getting the same error messages in the server.log
    Can anybody help me out or point me to the right direction.
    Thank you in advance

    The error is in the URL. It was in front of my eyes and I couldn't see the error. I skipped the ':' before the '@' when I created the pool. It is working fine now.

  • Configuring JCo3 Connection Pool with single sign on on non SAP Java server

    Hi Everyone,
    i have configured a connection pool on JBoss as per JCo3 Documentation and is working great.
    Now I need help to configure this connection pool with single sign on so that RFc on SAP ECC systems are executed using end users credential rather than using single user name password used to configure JCo connection pool.
    On SAP Java stack I am sure its possible within Java WebDynpro    and i assume using JCA resource adapter. But what if we don't want to use SAP Java App server.
    Any help will be appreciated.
    Thanks,
    Divyakumar Jain

    Eason, 你好!
    I have exactly the same problem.  Did you find a solution to this problem?  If so, please let me know!

  • Recognizing alternate connection pool

    hi..
    Currently, If a connection pool fails due to a TNS failure, application instance also fails, it has lost connectivity.
    But I need, my application to recognize an alternate connection pool, such that if transactions time out on one connection, application would recognize that the primary pool is not responding and retry the transactions on a secondary data connection pool via the alternate DB instance.
    If I get the solution for this, it will be appreciable
    Thanks in advance
    Suresh

    Hi. Look at our documentation on multipools.
    Joe
    Suresh Kumar wrote:
    hi..
    Currently, If a connection pool fails due to a TNS failure, application instance also fails, it has lost connectivity.
    But I need, my application to recognize an alternate connection pool, such that if transactions time out on one connection, application would recognize that the primary pool is not responding and retry the transactions on a secondary data connection pool via the alternate DB instance.
    If I get the solution for this, it will be appreciable
    Thanks in advance
    Suresh

  • JDBC Connection pool recovery after DB server restart

    I am finding that Kodo is throwing the following exception after I restart
    my database server (mysql). I am doing the database server restart while my
    application server is idle, so it is not during a transaction.
    Communication link failure: java.net.SocketException [code=0;state=08S01]
    NestedThrowables:
    com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper:
    This is presumably due to the JDBC connection pooling. Is there a
    configuration setting that allows Kodo to detect such failures and reconnect
    to the database server without exposing this problem to the application
    code? For example, WebLogic Server's JDBC connection pool has a setting that
    enables testing a connection and recovering from such failures before
    allocating it from the pool.
    Ben

    This is presumably due to the JDBC connection pooling. Is there a
    configuration setting that allows Kodo to detect such failures and reconnect
    to the database server without exposing this problem to the application
    code?Not right now. You can log an enhancement request with our bug database:
    http://bugzilla.solarmetric.com/

  • RCA Connection Pool idle Time-Out takes no effect !

    My question description goes here.
    According to JCA specification, I developed my 'ManagedConnectionImpl' class from the interface 'ManagedConnection'. I realize the 'destroy()' function to send out logout request to the EIS.
    Then I deployed the connector in Sun Java System Application Server, I noticed there are two parameters in Connection Pool part, they are:
    1. Idle Timeout. It said it's the maximum time that a connection can remain idle in the pool. I assume the connection will be removed after the specific time expired and before it's removed it will call the recallable function, 'destroy()', in my concrete class, 'ManagedConnectionImpl'.
    2. Pool Resize Quantity. it said it's number of connections to be removed when pool idle time expired.
    I am weird about it. I think EIS had itself session control strategy, if the specific session time-out expired, it will invalidate this session. So I think we will set 'Idle Timeout' in application server to be shorter than the EIS session time-out. If the 'Idle Timeout' in application server expired, it should remove all connections inside otherwise maybe the connection with invalid session will exist! (the background knowledge is our system will return back soap fault when it meets invalid session, so the invalid connections will not be removed by switching on your configuration item, 'On Any Failure')
    So I set "inital and minimum pool size" to 8, "maximum pool size" to 32 and "Pool Resize Quantity" to 32. (I expect AS to remove all when pool idle time expired)
    After deploying, I send out requests at the first round and wait for the time expired but I can't see the desired logout requests from pool automatically even one. Firstly I guess if my recallable function definition is wrong but when I shut down the Application Server, the desired logout requests are sent out from pool automatically. So I think my recallable function definition is workable.
    What's your comments on it?
    P.S.
    I am using Sun Java System Application Server 8.1.
    Thanks in advance!
    BRs
    /Leo

    I have had following test to ensure I sent out notification to listener.
    [#|2005-08-23T16:14:25.061+0800|INFO|sun-appserver-pe8.1_01|javax.enterprise.system.stream.out|_ThreadID=12;|
    It's in managed env!|#]
    [#|2005-08-23T16:14:25.062+0800|INFO|sun-appserver-pe8.1_01|javax.enterprise.system.stream.out|_ThreadID=12;|
    enter matchManagedConnections() !|#]
    [#|2005-08-23T16:14:25.062+0800|INFO|sun-appserver-pe8.1_01|javax.enterprise.system.stream.out|_ThreadID=12;|
    try to find a matching and existing one, reuse it!|#]
    [#|2005-08-23T16:14:25.062+0800|INFO|sun-appserver-pe8.1_01|javax.enterprise.system.stream.out|_ThreadID=12;|
    Found a matching and existing one, reuse it!|#]
    [#|2005-08-23T16:14:25.495+0800|INFO|sun-appserver-pe8.1_01|javax.enterprise.system.stream.out|_ThreadID=12;|
    tearDown() is called, the application-level connection is released!|#]
    [#|2005-08-23T16:14:25.496+0800|INFO|sun-appserver-pe8.1_01|javax.enterprise.system.stream.out|_ThreadID=12;|
    enter calling close() of managed connection.|#]
    [#|2005-08-23T16:14:25.496+0800|INFO|sun-appserver-pe8.1_01|javax.enterprise.system.stream.out|_ThreadID=12;|
    Start calling close() of managed connection.|#]
    [#|2005-08-23T16:14:25.496+0800|INFO|sun-appserver-pe8.1_01|javax.enterprise.system.stream.out|_ThreadID=12;|
    start to notify the listener the completeness of connection.|#]
    [#|2005-08-23T16:14:25.496+0800|INFO|sun-appserver-pe8.1_01|javax.enterprise.system.stream.out|_ThreadID=12;|
    notify the listener the completeness of connection successfully.|#]
    Whether it's related with the initial and minimum number parameter? Although I found it will not be created during AS start-up and will be created at the first request.
    Whether it shall be kept to meet the minimum requirement? I have failed to set it to 0.

  • Serious connection pool problem on Tomcat

    Hi,
    We are deploying our JSF creator-made app onto Tomcat 1.5. We set up our JNDI datasource on Tomcat (using the i-net driver ).
    Initially the pages load ok but after a short period of time we are getting these errors:
    Initialization Failure: javax.faces.FacesException: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get a connection, pool exhaustedWe believe that somehow the Creator-generated code is NOT freeing up connections in the connection pool.
    We think that when the afterRenderResponse() methods in the beans call rowset.close() this is NOT returning the connections to the pool. Can someone, hopefully a Sun Engineer confirm that the rowset.close() code in afterRenderResponse() returns the connection behind the rowset to the connection pool.
    Could this be a driver issue? We are using the i-net driver not the DataDirect one, but this should implement the full API.
    This is a very serious problem for us.
    regards,
    john

    do you have any example code you could post? I have a Spring/JSC tutorial on this forum. Just search for Spring and you should find it. It you need something more, I'll try to give you some help...time provided.
    am i
    right in thinking that you use the forms designer to
    lay out your pages and just put your own stuff in the
    bean constructor?Close...but not everything goes in the constructor.
    >
    One thing that may have caused a problem is we have
    just noticed that in one of our most commonly hit
    pages this line:
    dataTable1Model.setDataCacheKey("com.sun.datacache.my_
    page.my_rowset");
    featured the WRONG "my_page" jsp page but the correct
    rowset name "my_rowset". The page DID load correctly
    and run correctly, though. Could this cause problems
    with connection pooling? Anyone?I wouldn't think so, but it depends on how Creator builds the code.

  • JDBC connection pool failures when used by JMS stores

              We are using WebLogic 6.1 sp2. We defined a separate connection pool for use by
              a JMS Store.
              <JDBCConnectionPool Name="sybaseJMSPool"
              Targets="cluster00"
              InitialCapacity="2"
              MaxCapacity="10"
              DriverName="com.sybase.jdbc2.jdbc.SybDriver"
              Properties="[email protected]@;[email protected]@;charset=utf8"
              URL="jdbc:sybase:Tds:@jms.db.host@/@jms.db.name@"/>
              (note that the @xxx@ string are replaced by actual values).
              We are using Sybase Jconnect 5.5 to a Sybase ASE 12.5 database.
              We deployed this configuration on a number of environments (testing, staging,
              ..). The actual hardware and network configuration is different for the different
              system, but the WebLogic domain stays the same regarding this issue.
              On the test system we frequently get the following exceptions:
              <Aug 13, 2002 1:56:04 PM CEST> <Alert> <JMS> <www00-test> <node00>
              <ExecuteThread: '6' for queue: 'JMS.TimerClientPool'> <> <> <040048>
              <JMSServer "JMSServer00", store failure while writing message for topic
              OrderChangeTopic, java.io.IOException: JMS JDBC store, connection pool =
              <sybaseJMSPool>, prefix = <JMS00>: write failed
              java.sql.SQLException: JZ006: Caught IOException:
              com.sybase.jdbc2.jdbc.SybConnectionDeadException: JZ0C0: Connection is already
              closed.
              at com.sybase.jdbc2.jdbc.ErrorMessage.raiseErrorCheckDead
              (ErrorMessage.java:715)
              at com.sybase.jdbc2.tds.Tds.handleIOE(Tds.java:3124)
              at com.sybase.jdbc2.tds.Tds.cancel(Tds.java:1412)
              at com.sybase.jdbc2.tds.Tds.cancel(Tds.java:1341)
              at com.sybase.jdbc2.jdbc.SybStatement.doCancel(SybStatement.java:564)
              at com.sybase.jdbc2.jdbc.SybStatement.updateLoop(SybStatement.java:1672)
              at com.sybase.jdbc2.jdbc.SybStatement.executeUpdate
              (SybStatement.java:1625)
              at com.sybase.jdbc2.jdbc.SybPreparedStatement.executeUpdate
              (SybPreparedStatement.java:91)
              at com.p6spy.engine.logging.P6LogPreparedStatement.executeUpdate
              (P6LogPreparedStatement.java:179)
              at weblogic.jdbc.pool.Statement.executeUpdate(Statement.java:293)
              at weblogic.jms.store.JDBCIOStream.write(JDBCIOStream.java:1246)
              at weblogic.jms.store.StoreRequest.doTheIO(StoreRequest.java:250)
              at weblogic.jms.store.JMSStore.execute(JMSStore.java:182)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              .>
              java.io.IOException: JMS JDBC store, connection pool = <sybaseJMSPool>, prefix
              = <JMS00>: write failed
              java.sql.SQLException: JZ006: Caught IOException:
              com.sybase.jdbc2.jdbc.SybConnectionDeadException: JZ0C0: Connection is already
              closed.
              at com.sybase.jdbc2.jdbc.ErrorMessage.raiseErrorCheckDead
              (ErrorMessage.java:715)
              at com.sybase.jdbc2.tds.Tds.handleIOE(Tds.java:3124)
              at com.sybase.jdbc2.tds.Tds.cancel(Tds.java:1412)
              at com.sybase.jdbc2.tds.Tds.cancel(Tds.java:1341)
              at com.sybase.jdbc2.jdbc.SybStatement.doCancel(SybStatement.java:564)
              at com.sybase.jdbc2.jdbc.SybStatement.updateLoop(SybStatement.java:1672)
              at com.sybase.jdbc2.jdbc.SybStatement.executeUpdate
              (SybStatement.java:1625)
              at com.sybase.jdbc2.jdbc.SybPreparedStatement.executeUpdate
              (SybPreparedStatement.java:91)
              at com.p6spy.engine.logging.P6LogPreparedStatement.executeUpdate
              (P6LogPreparedStatement.java:179)
              at weblogic.jdbc.pool.Statement.executeUpdate(Statement.java:293)
              at weblogic.jms.store.JDBCIOStream.write(JDBCIOStream.java:1246)
              at weblogic.jms.store.StoreRequest.doTheIO(StoreRequest.java:250)
              at weblogic.jms.store.JMSStore.execute(JMSStore.java:182)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              at weblogic.jms.store.JDBCIOStream.throwIOException
              (JDBCIOStream.java:1213)
              at weblogic.jms.store.JDBCIOStream.write(JDBCIOStream.java:1256)
              at weblogic.jms.store.StoreRequest.doTheIO(StoreRequest.java:250)
              at weblogic.jms.store.JMSStore.execute(JMSStore.java:182)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              Before that this message appeared:
              <Aug 13, 2002 11:31:16 AM CEST> <Error> <ConnectionManager> <www00-test>
              <node00> <ExecuteThread: '26' for queue: 'default'> <> <> <000000>
              <Closing: 'weblogic.rjvm.t3.T3JVMConnection@795af6' because of: 'Server
              received a message over an uninitialized connection: 'JVMMessage from: 'null'
              to: '-4555218188801970213S:192.168.13.1:[7001,7001,7002,7002,7001,7002,-
              1]:ADIS:node00' cmd: 'CMD_REQUEST', QOS: '101', responseId: '1',
              invokableId: '287', flags: 'JVMIDs Not Sent, TX Context Not Sent', abbrev
              offset: '34'''>
              This problem did not occur on another system which was used during a 2 day stress
              testing session.
              It seems that the problem occurs after a period in which no user request where
              made. The user requests trigger EJB's that start sending JMS messages.
              When the problem occurs, the JMS messaging systems seems to lock up as no messages
              are received anymore by the different listeners (MDBs).
              Undeploying and redeploying the JBDC connection pool solves the problem. This
              solution is unacceptable in case of a production system.
              A similarly defined connection pool, which is used by the EJBs to make database
              connection, does not manifest this problem.
              <JDBCConnectionPool Name="sybasePool"
              Targets="cluster00"
              InitialCapacity="10"
              CapacityIncrement="5"
              MaxCapacity="50"
              PreparedStatementCacheSize="150"
              DriverName="com.sybase.jdbc2.jdbc.SybDriver"
              Properties="[email protected]@;[email protected]@;JCONNECT_VERSION=6;charset=utf8"
              URL="jdbc:sybase:Tds:@db.host@/@db.name@"/>
              The JDBC connection pool is used as follows by the JDBC store
              <JMSJDBCStore ConnectionPool="sybaseJMSPool" Name="JDBCStore00" PrefixName="JMS00"/>
              <JMSServer Name="JMSServer00" Store="JDBCStore00" Targets="node00">
              <JMSTopic JNDIName="ADIS.JMSError" JNDINameReplicated="false" Name="ErrorTopic"/>
              <JMSTopic JNDIName="ADIS.Status"
              Name="StatusTopic" RedeliveryDelayOverride="300000"/>
              <JMSTopic JNDIName="ADIS.OrderChange" JNDINameReplicated="false"
              Name="OrderChangeTopic" RedeliveryLimit="3"/>
              </JMSServer>
              Turning on the "Test Reserved Connection" with a appropriate test table does not
              help.
              Some sources on the internet tell us that JZ0C0 errors in the Jconnect driver
              can be related to network problems. Nevertheless the connection pool should be
              able to cope with this.
              Can you provide any solution for this ? Or give us hints what can cause the problem
              

    Zhenhao Qi wrote:
    thanks! Joe.
    The SQL statement itself can no longer be simplified, the long excuation time is due to the database size and complicated Select criteria. I can easily reproduce the problem by using this SQL. I tried "BEA's Oracle driver (Type 4): Version 8.1.7,9.0.1,9.2.0". the question can be dissect into 2 pieces:
    1) why the jdbc connection (using oracle.jdbc.OracleDriver) won't return anything if the SQL execution time > 5min, that is probably the Oracle's problem
    2) why the occupied connection pool won't release even I set "Statementtimeout=600", this is Weblogic's problem.
    ZhenhaoHi. Yes, (1) is oracle's problem. (2) may also be. The JDBC spec has very few
    allowances for one thread to interrupt a second thread's JDBC call. If we
    transmit your timeout request by calling setQueryTimeout() on the oracle
    statement, and if you have a weblogic-controlled transaction we call
    Statement.cancel() on any ongoing statement, we end up relying on whether
    the Oracle driver implements and responds to those calls.
    Are you doing weblogic-controlled transactions? Are you/can you
    call Statement.setQueryTimeout() on your statements, or are these
    generated JDBC queries?
    If you can duplicate the problem using the weblogic.jdbc.oracle.OracleDriver
    we have some other debug avenues. This would be good even if you really
    want to use the thin driver, because we will do the same JDBC calls to
    either driver, and the debug would prove (if) we set up a query timeout
    and if we call cancel(). If we do, then we can know that it is the Oracle
    driver failing in these regards.
    Joe

  • External Connection Pool - No Available Connections

    I am using Toplink 9.0.4 in an application deployed on WebLogic 7. Toplink is configured to use an external connection pool.
    Under heavy load we sometimes exhaust the connection pool. When this occurs we start to get failures when trying to acquire connections.
    It appears that when Toplink tries to obtain a connection from the pool and none are available the attempt immediately fails with an exception. What we would prefer to happen is for the thread to block and wait for a connection to become available.
    Do you know of any way to produce this behavior? Is there a way to configure Toplink so this occurs?
    Alternatively is there a practical way to produce this behavior by implementing logic in a ServerSession exception handler? We have implemented an exception handler that handles dropped and stale database connections, but I'm not sure if this is the appropriate place to handle a failure retrieving a connection from the external pool.
    Any suggestions are appreciated.

    Well I have tried but I am unable to write an effective exception handler that can recover from an exception retrieving a connection from an external pool. I wrote the following handler and attached it to the ServerSession.
         public Object handleException(RuntimeException exception) throws DatabaseException{
              if(exception instanceof DatabaseException){
                   DatabaseException dbex = (DatabaseException)exception;
                   String exceptionMessage = dbex.getMessage();
                   if(exceptionMessage != null && exceptionMessage.indexOf("No available connections in pool") >= 0){
                        try{
                             Thread.sleep(5000);                    
                        }catch(InterruptedException e){}
                        oracle.toplink.publicinterface.Session session = null;
                        session = serverSession.acquireClientSession();
                        dbex.setSession(session);
                        if(session != null){
                             DatabaseQuery query = dbex.getQuery();
                             if(query != null){
                                  return session.executeQuery(query);
                             }else{
                                  return null;
                        throw exception;
                   }else{
                        throw exception;
              }else{
                   throw exception;
    It works sometimes but other times I get strange errors when executing the query. I know the mappings are good, the queries succeed under normal circumstances. The following error is commmon:
    Exception Description: The parameter name [UNIQUE_ID] in the query's selection criteria does not match any parameter name defined in the query.
    The other problem I have is the recursive nature of the exception handling. If calling ServerSession.acquireClientSession() in the exception handler causes an exception, I end up in another exception handler. It's not clear which instance should execute and return the query in this case.
    Any suggestions or examples of exception handlers for this situation are appreciated.

Maybe you are looking for

  • Performance issue of report

    Hi Friends, Can you please give me the exact answer for the below question. Suppose my report program is taking long time to execute, what are the reasons that may effect the report. and what are the remedies should i follow, please provide appropria

  • Adobe Media Encoder - Random Coding Interrupts?

    Greetings all - I've been a long time reader to this forum and thought I would bring a recent issue to the brilliant guys that Adobe seems to attract. First the details: Win 7 64bit AMD Athlon X2 250 ATI Radeon 5770 (1GB GDDR5) 3 gig RAM Standard iss

  • Printing more than one report in the viewer

    Post Author: gchambers01 CA Forum: General I have 3 form letters I would like to print. Is there a way to print mutiple reports at the same time? I tried using the subreports but they need to run at different times in the report. One subreport is tie

  • How to create first instance of directory server (Solaris 9).

    With solaris 9 installation also installs iplanet directory server in "/usr/iplanet/ds5". But there is no instance of the directory server available. How can I add the first instcance of the directory server. I can not use the admin server as it requ

  • Drag function disabling button actions within movieclip

    I'm building an interactive map and i've run into a problem. The map is draggable and I have a start and stop drag function running as well as an onEnterFrame function which restricts how far you can drag the map. The map is displayed inside of a mas