JCo Connections in WD Model running out

Hello,
we have WD application that uses RFC model.
During a load test we have observed that the connection
pools are running out of JCo connections. The result is a an error message in the trace file
and Http 500 response code to the end user.
Number of concurrent users: 20
Max Pool Size: 20
Max Connections: 20
Exception:
[code]aused by: com.sap.mw.jco.JCO$Exception: (106) JCO_ERROR_RESOURCE: Connection pool ME_LP_MODELDATA_TSTWEB1_PT_useSSO is exhausted. The current pool size limit is 20 connections.
     at com.sap.mw.jco.JCO$Pool.getClient(JCO.java:5150)
     at com.sap.mw.jco.JCO$PoolManager.getClient(JCO.java:5849)
     at com.sap.mw.jco.JCO$PoolManager.getClient(JCO.java:5799)
     at com.sap.mw.jco.JCO.getClient(JCO.java:8076)
     at com.sap.tc.webdynpro.serverimpl.core.sl.AbstractJCOClientConnection.getClient(AbstractJCOClientConnection.java:393)
     at com.sap.tc.webdynpro.modelimpl.dynamicrfc.AiiModel.getCurrentlyUsedJcoClient(AiiModel.java:191)[/code]
Questions:
Is it necessary to have equal number of Max Connections as
number of potential concurrent users?
Or is there a way to manually release not used connections?
Best Regards, Maik

Hi,
It is not necessary to create as many connections as there are concurrent users.
We have to handle the scope of the connection properly and also close the connections once we complete the task.
Re: How to close a model object connection for Adaptive RFC?
Regards
Bharathwaj

Similar Messages

  • ORA-30928: "Connect by filtering phase runs out of temp tablespace"

    i have created a query that is sued to display a data in a label. This particular query will then be stored into a program that we use. The query runs just fine until this morning when it returns the error ORA-30928: "Connect by filtering phase runs out of temp tablespace". I have Googled and found out that I can do any of the following:
    Include a NO FILTERING hint - but did not work properly
    Increase the temp tablespace - not applicable to me since this runs in a production server that I don't have any access to.
    Are there other ways to fix this? By the way, below is the query that I use.
    SELECT * FROM(
    SELECT
    gn.wipdatavalue
    , gn.containername
    , gn.l
    , gn.q
    , gn.d
    , gn.l2
    , gn.q2
    , gn.d2
    , gn.l3
    , gn.q3
    , gn.d3
    , gn.old
    , gn.qtyperbox
    , gn.productname
    , gn.slot
    , gn.dt
    , gn.ws_green
    , gn.ws_pnr
    , gn.ws_pcn
    , intn.mkt_number dsn
    , gn.low_number
    , gn.high_number
    , gn.msl
    , gn.baketime
    , gn.exptime
    , NVL(gn.q, 0) + NVL(gn.q2, 0) + NVL(gn.q3, 0) AS qtybox
    , row_number () over (partition by slot order by low_number) as n
    FROM
    SELECT
    tr.*
    , TO_NUMBER(SUBSTR(wipdatavalue, 1, INSTR (wipdatavalue || '-', '-') - 1)) AS low_number
    , TO_NUMBER(SUBSTR(wipdatavalue, 1 + INSTR ( wipdatavalue, '-'))) AS high_number
    , pm.msllevel MSL
    , pm.baketime BAKETIME
    , pm.expstime EXPTIME
    FROM trprinting tr
    JOIN CONTAINER c ON tr.containername = c.containername
    JOIN a_lotattributes ala ON c.containerid = ala.containerid
    JOIN product p ON c.productid = p.productid
    LEFT JOIN otherdb.pkg_main pm ON trim(p.brandname) = trim(pm.pcode)
    WHERE (c.containername = :lot OR tr.SLOT= :lot)
    )gn
    LEFT JOIN otherdb.intnr intn ON TRIM(gn.productname) = TRIM(intn.part_number)
    connect by level <= HIGH_NUMBER + 1 - LOW_NUMBER and LOW_NUMBER = prior LOW_NUMBER and prior SYS_GUID() is not null
    ORDER BY low_number,n
    WHERE n LIKE :n AND wipdatavalue LIKE :wip AND ROWNUM <= 300 AND wipdatavalue NOT LIKE 0
    I am using Oracle 11g too.
    Thanks for the help everyone.

    Hi,
    The documentation implies that the START WITH and CONNECT BY clauses should come before the GROUP BY clause. I've never known it to make a difference before, but you might try putting the GROUP BY clause last.
    If you're GROUPing by LEVEL, what's the point of SELECTing MAX (LEVEL)? MAX (LEVEL) will always be the same as LEVEL.
    What are you trying to do?
    Post some sample data (CREATE TABLE and INSERT statements) and the results you want from that data, and somebody will help you get them.

  • Should I have one JCo connection per RFC model?

    Hello SDN,
    I got a JCo doubt.
    Should I have one JCo connection per RFC model in a DC? or Can I have the same JCo connection for several models in such Web Dynpro Development Component?
    I will appreciate any help.
    Thank you.

    Hi Gustavo,
    Ideally, we use one JCo connection for all the models in all the DC's in a big project.
    If you see the SAP delivered XSS/ESS/MSS solutions they are also using one JCO (SAP_R3_Human_Resources) for all the dc's in one solution.
    Suppose you are not using SSO and you have different models with different JCO, now if you want to change the backend client, you have to change all the JCO connections.
    So having one JCO, helps easy maintenance of connections across different applications in a big project/solution.
    Regards,
    Shubham

  • The connection pool DIMT_DB is running out of connections

    I am facing an issue, the process instances created in activity are not getting routed to my work item. I found the following exception logged in engine DB at the time process instance was created,
    The connection pool DIMT_DB is running out of connections ( 100 % of the pool is in use).
    It is recommendable to expand the size through the Process Administrator.
    can anyone provide me a solution to this issue?
    the maximum pool size is 10. should it be increased?
    does this issue occur when database connection is not closed properly?

    Can anyone please share your ideas?
    Thanks,

  • Problem create jco connection in webdynpro application run time

    Hi There,
    I created webdynpro application using rfc model.
    After deploy the project , i created two jco connection
    for data & meta data this is work o.k (test with no errors). the sld is o.k.
    We are using application server (Single Server) for data
    & message server for meta data (Load Balance).
    During run time there is an error message:
    Error stacktrace:
    com.sap.tc.webdynpro.services.exceptions.WDTypeNotFoundException: type com.ness.crm.customerlasttwo01pckg.model.types.Datab could not be loaded: com.sap.dictionary.runtime.DdException:
         at com.sap.tc.webdynpro.services.datatypes.core.DataTypeBroker.getSimpleType(DataTypeBroker.java:242)
         at com.sap.tc.webdynpro.services.datatypes.core.DataTypeBroker.getDataType(DataTypeBroker.java:205)
         at com.sap.tc.webdynpro.progmodel.context.AttributeInfo.init(AttributeInfo.java:471)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.initAttributes(NodeInfo.java:771)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:756)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:761)
         at com.sap.tc.webdynpro.progmodel.context.Context.init(Context.java:40)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:199)
         at com.sap.tc.webdynpro.progmodel.controller.Component.getCustomControllerInternal(Component.java:433)
         at com.sap.tc.webdynpro.progmodel.controller.Component.getMappableContext(Component.java:371)
         at com.sap.tc.webdynpro.progmodel.controller.Component.getMappableContext(Component.java:400)
         at com.sap.tc.webdynpro.progmodel.context.MappingInfo.init(MappingInfo.java:138)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:746)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:761)
         at com.sap.tc.webdynpro.progmodel.context.Context.init(Context.java:40)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:199)
         at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:540)
         at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:422)
         at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:130)
         at com.sap.tc.webdynpro.progmodel.view.InterfaceView.initController(InterfaceView.java:41)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.displayToplevelComponent(ClientComponent.java:134)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:374)
         at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:593)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59)
         at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:249)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:48)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:385)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:263)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:340)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:318)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:821)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:239)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:147)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
         at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)
    Caused by: com.sap.dictionary.runtime.DdException:
         at com.sap.dictionary.runtime.ProviderFactory.internalGetProvider(ProviderFactory.java:225)
         at com.sap.dictionary.runtime.ProviderFactory.getProvider(ProviderFactory.java:180)
         at com.sap.dictionary.runtime.DdDictionaryPool.getProvider(DdDictionaryPool.java:78)
         at com.sap.dictionary.runtime.DdDictionaryPool.getDictionary(DdDictionaryPool.java:64)
         at com.sap.dictionary.runtime.DdDictionaryPool.getDictionary(DdDictionaryPool.java:39)
         at com.sap.dictionary.runtime.DdBroker.getDataType(DdBroker.java:149)
         at com.sap.dictionary.runtime.DdBroker.getSimpleType(DdBroker.java:170)
         at com.sap.tc.webdynpro.services.datatypes.core.DataTypeBroker.getSimpleType(DataTypeBroker.java:234)
         ... 44 more
    <u>Can some one help me with this matter?</u>
    Best regards Nir Shohat.

    Hi Nir,
    We also had same problem but no we won't. Check ur config on SLD again and the try to the test connection from the http://localhost:4444/webdynpro ( WAS 6.4 )server.
    If this connection is OK then deploy some small application n see.
    Is ur's JCo connection working for J2ee application?
    Arnigs

  • JCO connection tab in disabled mode in sap J2EE engine/webdynpro/local/proj

    Dear all,
    I'm developing the simple webdynpro object using netweaver developer studio, but when i deploy it to sap J2ee engine and go there to set the JCO connection, I find the jco connectiuon tab in the diabled mode. I need to configure the new jco connection in order to run the project. Please suggest.
    thanks,
    Anup.

    Hi Anup,
    You can find service "SLD data supplier" under server->services list.
    Refer following links for configuring SLD and JCO connections:
    Re: Web Dynpro - Problem with (SLD) JCO Connection
    Re: Configuration of SLD
    Regards,
    Bhavik

  • Model and MetaData configarations  in JCO Connection

    Hi all,
               while creating new model i used Load Balance option instead of Single Server.So while creating JCO connection what should be selected for ApplicationData and MetaData radio buttons.The error which i am got aftet deploying and running is
    com.sap.tc.webdynpro.modelimpl.dynamicrfc.WDDynamicRFCExecuteException: Error connecting using JCO.Client: null
    Is this error is because of LoadBalance configarartion while creating JCO for Destinations or at the client num which we gave at the starting step of creating JCO
    Regards
    Padma N

    i got similar problem and this is how i resolved
    this is because jco connections are Using SSO and the user who is accessing that webdynpro application is not present in the backend system.
    please make sure user is there in the backend system from which you are getting data
    xxxxxxxxxxxxxxxxxxxxxxx
    Edited by: Armin Reichert on Feb 18, 2008 7:26 PM

  • MII 12.1 time out for JCo Connection

    I'm running this MII transaction that, is using a JCO connection to run a Function Module in SAP.
    The problem we have is, that function module takes more than 60 seconds to run an return the values, that is correct because we are gathering a big amount of data, so if we run the function Module inside SAP it works ok, BUT, if we run the transaction from MII we receive a time out after exactly 60
    seconds.
    We have already modified several time out parameters inside MII
    but those changes are not making any difference.
    Do you know where that JCo time out parameter is inside MII 12.1?

    Hi Salvador,
    Try to increase the session timeout to 300 in SAP Menu --> System Properties. Initial it will be 60 sec only.
    And increase MII workbench Read Timeout as well. Help --> Setting --> Read Timeout
    If it doesn't solved your problem, go through below post
    How to set timeout for each level in MII?
    Regards,
    Praveen Reddy

  • ConnectionPoolDataSource - running out of Connections..

    Hi
    I have a same problem as described in this thread
    http://forum.java.sun.com/thread.jsp?forum=136&thread=560645&tstart=0&trange=15
    I have Q42004 Beta J2EE SDK, and am using MS SQL 2000 databse server with jTDS 0.9 (jtds.sourceforge.net) JDBC driver...
    I have a very simple servlet that gets a DataSource from the JNDI, gets connection , does some stuff, closes connection....Pretty basic....After a while I get the following error
    [#|2004-10-08T19:19:08.053-0400|INFO|sun-appserver-pe8.1|javax.enterprise.system.stream.out|_ThreadID=28;|
    [2004-10-08 19:19:08,053] [ERROR] [org.nemours.webapps.coi.COIServlet]
    [MSG] java.sql.SQLException: Error in allocating a connection. Cause: In-use connections equal max-pool-size and expired  max-wait-time. Cannot allocate more connections.
            at com.sun.gjc.spi.DataSource.getConnection(DataSource.java:74)
            at org.nemours.webapps.coi.COIServlet.getDBConnection(Unknown Source)
            at org.nemours.webapps.coi.COIServlet.doProcess(Unknown Source)
            at org.nemours.webapps.coi.COIServlet.doPost(Unknown Source)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
            at sun.reflect.GeneratedMethodAccessor248.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:246)
            at java.security.AccessController.doPrivileged(Native Method)
            at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
            at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:273)
            at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:236)
            at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
            at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:145)
            at java.security.AccessController.doPrivileged(Native Method)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:141)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:262)
            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:160)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:618)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:500)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask(ProcessorTask.java:375)
            at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:55)
    Error in allocating a connection. Cause: In-use connections equal max-pool-size and expired max-wait-time. Cannot alloca
    te more connections.
    |#]the configuration of the pool in my domain.xml is as follwing...
    <jdbc-resource enabled="true" jndi-name="jdbc/coiDB" object-type="user" pool-name="coi_Pool"/>
        <jdbc-connection-pool connection-validation-method="auto-commit" datasource-classname="net.sourceforge.jtds.jdbcx.JtdsConnectionPoolDataSource" fail-all-connections="true" idle-timeout-in-seconds="300" is-connection-validation-required="false" is-isolation-level-guaranteed="false" max-pool-size="32" max-wait-time-in-millis="60000" name="coi_Pool" pool-resize-quantity="2" res-type="javax.sql.ConnectionPoolDataSource" steady-pool-size="8">
          <description>jTDS 0.9 Type 4 JDBC Driver</description>
          <property name="DatabaseName" value="coi"/>
          <property name="Password" value="******"/>
          <property name="User" value="*******"/>
          <property name="ServerName" value="localhost"/>
        </jdbc-connection-pool>
    ...After few WAR redeployments I run out of connections....I have noticed also the following:
    1. On MS SQL Enterprise Manager - Management console there are no processes/locks associated with jTDS meaning there are no outstanding connection when I get an error...
    2. After a restart of MSSQL services i still get an error
    3. After an application redeployment I still get an error
    4. After a domain restart the error goes away untill i redeploy the app several times....
    Can someone PLEASE let me know if this is a bug in Q42004 or am I doing something bad...
    I spent hours debugging the code trying to figure this one out....
    Thanks
    Z

    Hi
    jTDS 0.9 does not have XADataSource implementation but it has DataSource implementation.
    If I use the DataSource imlementation I still get the "out of connections" problem....
    This same application did not exibit any problems on Updte 1.
    The code of my servlet is pretty big but here are the relevant snippets:
         private Connection getDBConnection() {
              DataSource ds = null;
              Connection conn = null;
              try {
                   Log.info(this.getClass(), "Attempting to use ServiceLocator to get DS from JNDI...");
                   ds = ServiceLocator.getInstance().getDataSource("jdbc/coiDB");
                   Log.info(this.getClass(), "Attempting to get connection...");
                  conn = ds.getConnection();
              } catch (Exception e) {
                   Log.error(this.getClass(),"failure...!");
                   Log.exception(this.getClass(), e);
              return conn;
         private Employee getEmployee(int empID) {
              Employee existingEmp = null;
              PreparedStatement pstmt = null;
              ResultSet rset = null;
              Connection conn = getDBConnection();
              try {               
                   pstmt = conn.prepareStatement("SELECT * FROM EMPLOYEE WHERE ID = ?");
                   pstmt.setInt(1, empID);
                   rset = pstmt.executeQuery();               
                   if (rset.next()) {
                        existingEmp = new Employee(rset.getInt("id"), rset.getString("fname"), rset.getString("lname"), rset.getString("location"), rset.getString("department"), rset.getString("phone"));
                        existingEmp.setCreateTS(rset.getTimestamp("create_ts"));
              } catch (SQLException e) {
                   Log.error(this.getClass(), "Failed DB operation while checking for existing employee");
                   Log.exception(this.getClass(), e);
              } finally {
                   DBUtils.closeResultSet(rset);
                   DBUtils.closeStatement(pstmt);
                   DBUtils.closeConnection(conn);
              return existingEmp;     
         }The DBUtils I use is just convenience static class that wraps regular JDBC calls into try catch block and ServiceLocator is a BluePrints pattern straight from AdventureBUilder 1.0.1. Employee is a my model/subject class.....
    Thanks
    Z...

  • Connection leaks and application is running out of connection

    Hi All,
    We have configured the SQL Database external resource for OBPM specific connection pool. All the business processes are using the Fuego.Sql package for the data base transaction calls. I have no clue how this package is managing the database connections. If more than 25 users perform concurrent testing, the application is running out of connections. Connection pool configuration details as below.
    Maximum Pool Size : 500
    Maximum connections per user : 50
    Minimun Pool Size : 0
    Connection Idle Time (mins). : 5
    Maximum Opened Cursors : 1000
    Please share your thoughts on how I can track and fix this issue. Also please let me know the answers below.
    1. Is there any way to find out the stats about the connection pool
    2. If I configure the remote JDBC that points to J2EE datasource, would that fix this issue.
    I appreciate your help.
    Thanks,

    Can anyone please share your ideas?
    Thanks,

  • How do I add to my data plan on the iPad once I have run out of time and no longer have an internet connection?

    How do I add to my data plan on the iPad once I have run out  and no longer have an internet connection? I am working out of the country and got a message that I was running low,followed immediatly by a you're out message.

    Should you not be asking your carrier? They are the people supplying your data plan.

  • How to create a model and JCO connection

    Hi all,
             The Userid and Password given while creating new model at Singleserver/Load balancing tab should be same as the userid and password given while creating JCO connection. i.e in JCO creation  while mapping modeldata to Application data and Metadata to metadata we will give some userid and password.
    will those 2 userids and passwords should be same.
    the error which i am getting is
    com.sap.tc.webdynpro.modelimpl.dynamicrfc.WDDynamicRFCExecuteException: Error connecting using JCO.Client: null
    Regards
    Padma N

    2 userids and passwords need not be same
    i got similar problem and this is how i resolved
    this is because jco connections are Using SSO and the user who is accessing that webdynpro application is not present in the backend system.
    please make sure user is there in the backend system from which you are getting data
    xxxxxxxxxxxxxxxxxxxxx
    Edited by: Armin Reichert on Feb 18, 2008 7:26 PM

  • Running out of data connections

    Problem Statement:
    Running out of data connections after some time and
    the following SQLException is thrown:
    "failed to create a data connection with any of the
    specified drivers"
    Problem Description:
    I have an application that is running under iPlanet
    6.0 on solaris using Oracle 8 and type 2 Oracle
    driver.
    The application is using a number of stateless
    session beans.
    Normally, my servlets instantiate the remote beans in
    order to make access to their interfaces. For
    example, I have a servlet that fetches all of
    the accounts for a given customer. First, The servlet
    does the fetch by calling JNDI to lookup the "home"
    interface, then does a "create" call on the home
    interface to get the "remote" interface
    (see snippets of code below, the ejbCreate()).
    Second, the servlet calls up a specific method that
    extracts the customer's accounts (see snippets of
    code below, the method getAccountList()).
    At first all seem to work well, however after some
    random time my beans start to throw the SQLException
    "failed to create a data connection with any of the
    specified drivers"
    At first I thought that I am not closing the
    connections, but all of of my connections,
    statements, and result sets, are closed
    and even set to null in a finally block as you can
    see in the snippets of code below.
    If I restart iAS, all of the connections get released
    and things look normal again till the problem
    re-occurs.
    Initially, we had this problem on SP2, so we upgraded
    to SP3 thinking that this may solve the problem,
    however the problem remained on SP3.
    Another thing, this same application works perfectly
    well on my laptop which has similar iPlanet
    configurations except that operating system is
    Windows 2000 Advanced Server, and Oracle 8.0.4.0.0.
    System Configuration:
    Following is my system configuration and related
    iPlanet 6.0 settings.
    -1- iPlanet 6.0 SP3
    -2- Type 2 Oracle driver
    -3- SunOs, sparc SUNW, Ultra-250, solaris 5.8
    -4- Oracle 8.1.6.0.0 64-bit Production
    -5- Following are the entry settings in the iPlanet
    registry under
    Software\iPlanet\Application Server\6.0\CCS0\DAE2\ORACLE_OCI
    - CacheCleanInterval = 120
    - CacheConnTimeOut = 120
    - CacheDebugMsgs = 0
    - CacheFreeSlots = 16
    - CacheInitSlots = 64
    - CacheMaxConn = 64
    - CachMaxGlobalConn = 128
    - ConnGiveUpTime = 60
    - RMThreadMax = 32
    - RMThreadMin = 0
    - RSBufferInitRows = 25
    - RSBufferMaxBufferSize = 6553600
    - RSBufferMaxRows = 100
    - RSBufferMaxSize = 32768
    - SQLDebugMsgs = 0
    Snippets of Code:
    The following snippets of code come from a stateless
    session bean and consist of a local data member, the
    ejbCreate() method, and a typical rmi method that
    does the database connection and extraction of
    related records.
    javax.sql.DataSource dataSourceObj = null;
    public void ejbCreate()
    throws java.rmi.RemoteException, javax.ejb.CreateException
    javax.naming.Context ctx = null;
    // Ensure first that the _props have been
    // successfully instantiated by the constructor.
    if (_props != null) {
    try{
    ctx = new javax.naming.InitialContext();
    }catch (Exception ex){           
         nbUtility.logError(ex,"Error while creating Initial Context !");
    try{
    // DEBUG:
    System.out.println("ejbCreate(): NB_DATASOURCE = " + props.getPropertyValue(props.NB_DATASOURCE));
    // DEBUG:
         dataSourceObj = (javax.sql.DataSource) ctx.lookup(_props.getPropertyValue(_props.NB_DATASOURCE));
    catch (Exception ex){
         ex.printStackTrace();
    if (dataSourceObj == null)
    throw new javax.ejb.CreateException("Couldn't get DataSource object from environment");
    } else {
    throw new javax.ejb.CreateException("Couldn't create the property manager: NB_CONFIG_FILE is null, empty, not set, or the file doesn't exist.");
    * Given a customer number, this method
    * returns the list of accounts that belongs to
    * this customers.
    public nbAccountList getAccountList(String CustomerNo)
    throws java.rmi.RemoteException {
    nbAccountList accountList = null;
    if ((CustomerNo != null) && (!CustomerNo.equals(""))) {
    java.sql.Connection conn = null;
    java.sql.Statement stmt = null;
    java.sql.ResultSet rset = null;
    try {
    accountList = new nbAccountList();
    String sql = "SELECT * FROM " +
    props.getPropertyValue(props.NB_DBTABLE_ACCOUNT) +
    " WHERE " +
    "(" + props.getPropertyValue(props.NB_DBFIELD_ACCOUNT_CUSTOMERNO) +
    "='" + CustomerNo + "')";
    // DEBUG:
    nbDebug.write("accounts list SQL= " + sql);
    // DEBUG:
    // Let's get the connection, the statement, and the record set.
    conn = dataSourceObj.getConnection();
    stmt = conn.createStatement();
    rset = stmt.executeQuery(sql);
    // Let's loop for each single account
    int index = 0;
    nbAccount account = null;
    while (rset.next()) {
         String AccountNo = rset.getString(_props.getPropertyValue(_props.NB_DBFIELD_ACCTPERMIS_ACCOUNTNO));
    // Instantiate an account object
    account = new nbAccount(AccountNo);
    index++;
    } catch (SQLException e) {
         nbUtility.logError(e, "SQLException while trying to get accounts data.");
    } finally {
    try {
    if (rset != null) { rset.close(); rset = null; }      
    if (stmt != null) { stmt.close(); stmt = null; }
    if (conn != null) { conn.close(); conn = null; }
    } catch (SQLException e) {
         nbUtility.logError(e, "SQLException while trying to close connection.");
    return (accountList);      
    }

    I've experienced similar problems. Unfortunately, all efforts by iPlanet
    technical support to resolve the issue have failed. (They do keep calling
    and asking if they can close the ticket for some reason)
    One thing that's totally anoying is the ksvradmin monitory crashes when I
    try to have it report any connection pool information. They verified it's a
    bug in SP3 but won't say if it's fixed in SP4 or provide an estimate.
    To date here's what I've tried (by tech support's recomendation):
    1) Configure for global transactions. (even thow I'm not using them)
    (Failed)
    2) Switch to using 3rd party driver (We were previously using native)
    (Failed)
    3) Ran report on oracle showing number of connections used during iplanet's
    failed attempt. Report from Oracle shows 2 connections open, but iPlanet is
    configured for 120.
    4) Increased the connection pool size. (I didn't know why based on the
    above info) (Increased to 300) (Failed)
    Well there's my history. We crash after about 3 days of heavy usage. I'm
    about to give up and just reset my servers each night. Will help me with
    logfile rotation of the kjs files as well.
    Rodger Ball
    Sr. Engineer
    Business Wire
    "Bilal Chouman" <[email protected]> wrote in message
    news:[email protected]...
    Problem Statement:
    Running out of data connections after some time and
    the following SQLException is thrown:
    "failed to create a data connection with any of the
    specified drivers"
    Problem Description:
    I have an application that is running under iPlanet
    6.0 on solaris using Oracle 8 and type 2 Oracle
    driver.
    The application is using a number of stateless
    session beans.
    Normally, my servlets instantiate the remote beans in
    order to make access to their interfaces. For
    example, I have a servlet that fetches all of
    the accounts for a given customer. First, The servlet
    does the fetch by calling JNDI to lookup the "home"
    interface, then does a "create" call on the home
    interface to get the "remote" interface
    (see snippets of code below, the ejbCreate()).
    Second, the servlet calls up a specific method that
    extracts the customer's accounts (see snippets of
    code below, the method getAccountList()).
    At first all seem to work well, however after some
    random time my beans start to throw the SQLException
    "failed to create a data connection with any of the
    specified drivers"
    At first I thought that I am not closing the
    connections, but all of of my connections,
    statements, and result sets, are closed
    and even set to null in a finally block as you can
    see in the snippets of code below.
    If I restart iAS, all of the connections get released
    and things look normal again till the problem
    re-occurs.
    Initially, we had this problem on SP2, so we upgraded
    to SP3 thinking that this may solve the problem,
    however the problem remained on SP3.
    Another thing, this same application works perfectly
    well on my laptop which has similar iPlanet
    configurations except that operating system is
    Windows 2000 Advanced Server, and Oracle 8.0.4.0.0.
    System Configuration:
    Following is my system configuration and related
    iPlanet 6.0 settings.
    -1- iPlanet 6.0 SP3
    -2- Type 2 Oracle driver
    -3- SunOs, sparc SUNW, Ultra-250, solaris 5.8
    -4- Oracle 8.1.6.0.0 64-bit Production
    -5- Following are the entry settings in the iPlanet
    registry under
    Software\iPlanet\Application Server\6.0\CCS0\DAE2\ORACLE_OCI
    - CacheCleanInterval = 120
    - CacheConnTimeOut = 120
    - CacheDebugMsgs = 0
    - CacheFreeSlots = 16
    - CacheInitSlots = 64
    - CacheMaxConn = 64
    - CachMaxGlobalConn = 128
    - ConnGiveUpTime = 60
    - RMThreadMax = 32
    - RMThreadMin = 0
    - RSBufferInitRows = 25
    - RSBufferMaxBufferSize = 6553600
    - RSBufferMaxRows = 100
    - RSBufferMaxSize = 32768
    - SQLDebugMsgs = 0
    Snippets of Code:
    The following snippets of code come from a stateless
    session bean and consist of a local data member, the
    ejbCreate() method, and a typical rmi method that
    does the database connection and extraction of
    related records.
    javax.sql.DataSource dataSourceObj = null;
    public void ejbCreate()
    throws java.rmi.RemoteException, javax.ejb.CreateException
    javax.naming.Context ctx = null;
    // Ensure first that the _props have been
    // successfully instantiated by the constructor.
    if (_props != null) {
    try{
    ctx = new javax.naming.InitialContext();
    }catch (Exception ex){
    nbUtility.logError(ex,"Error while creating Initial Context
    try{
    // DEBUG:
    System.out.println("ejbCreate(): NB_DATASOURCE = " +
    props.getPropertyValue(props.NB_DATASOURCE));
    // DEBUG:
    dataSourceObj = (javax.sql.DataSource)
    ctx.lookup(_props.getPropertyValue(_props.NB_DATASOURCE));
    catch (Exception ex){
    ex.printStackTrace();
    if (dataSourceObj == null)
    throw new javax.ejb.CreateException("Couldn't get DataSource
    object from environment");
    } else {
    throw new javax.ejb.CreateException("Couldn't create the
    property manager: NB_CONFIG_FILE is null, empty, not set, or thefile
    doesn't exist.");
    * Given a customer number, this method
    * returns the list of accounts that belongs to
    * this customers.
    public nbAccountList getAccountList(String CustomerNo)
    throws java.rmi.RemoteException {
    nbAccountList accountList = null;
    if ((CustomerNo != null) && (!CustomerNo.equals(""))) {
    java.sql.Connection conn = null;
    java.sql.Statement stmt = null;
    java.sql.ResultSet rset = null;
    try {
    accountList = new nbAccountList();
    String sql = "SELECT * FROM " +
    props.getPropertyValue(props.NB_DBTABLE_ACCOUNT)
    +
    " WHERE " +
    "(" +
    props.getPropertyValue(props.NB_DBFIELD_ACCOUNT_CUSTOMERNO) +
    "='" + CustomerNo + "')";
    // DEBUG:
    nbDebug.write("accounts list SQL= " + sql);
    // DEBUG:
    // Let's get the connection, the statement, and the record
    set.
    conn = dataSourceObj.getConnection();
    stmt = conn.createStatement();
    rset = stmt.executeQuery(sql);
    // Let's loop for each single account
    int index = 0;
    nbAccount account = null;
    while (rset.next()) {
    String AccountNo =
    rset.getString(_props.getPropertyValue(_props.NB_DBFIELD_ACCTPERMIS_ACCOUNTN
    O));
    >
    // Instantiate an account object
    account = new nbAccount(AccountNo);
    index++;
    } catch (SQLException e) {
    nbUtility.logError(e, "SQLException while trying to get
    accounts data.");
    } finally {
    try {
    if (rset != null) { rset.close(); rset = null; }
    if (stmt != null) { stmt.close(); stmt = null; }
    if (conn != null) { conn.close(); conn = null; }
    } catch (SQLException e) {
    nbUtility.logError(e, "SQLException while trying to close
    connection.");
    return (accountList);
    Try our New Web Based Forum at http://softwareforum.sun.com
    Includes Access to our Product Knowledge Base!

  • Dynamic JCo Connection with Adaptive RFC Model 2

    Hi gurus,
    I'm trying to dinamically change a model data connector inside my web dynpro. I'm using an Adaptive RFC Model 2 to communicate with the R/3 backend. I've found that is possible to change the connector modifiyng the code inside the web dynpro. In detail I've found this example:
    IWDDynamicRFCModel model1 = (IWDDynamicRFCModel) WDModelFactory.getModelInstance(Model1.class);
    I put this code into wdDoInit method but I get the following error:
    "<comp_name>.wdDoInit failed to create or init instance of model 'model_name' in scope NO_SCOPE with instanceId 'null'"
    Furthermore I've used the deprecated Adaptive RFC Model and when I instantiate a model, ModelName m=new ModelName(), I see that the methods m.setJcoClient(client) and m.setSystemName(systemName) are visible, while when I try to do the same with Adaptive RFC Model 2, with my model m, the methods before there aren't.
    So this is my question: is it possible to change data connector dinamically with Adaptive RFC Model 2?
    Thanks a lot

    Dear Lukinho,
    You may try this ;
    try {
    IWDJCOClientConnection clientCon =  WDSystemLandscape.getJCOClientConnection("<name of the JCO connection>");
    String clientName      = clientCon.getClientName();
    String lang          = clientCon.getLanguage();
    String passowrd          = clientCon.getPassword();
    String sysID          = clientCon.getSystemIdentifier();
    String user          = clientCon.getUser();
    //etc...
    } catch (WDSystemLandscapeException e1) {
    // TODO Auto-generated catch block
    e1.printStackTrace();
    I got this code from the thread   [Multiple Client Logon in JCO   |Re: Multiple Client Logon in JCO;
    Also have a look at this thread
    [JCo Destination   |Re: JCo Destination;
    Hope it helps!!
    Warm Regards
    Upendra Agrawal

  • Hey my iPod is not showing up on iTunes and my computer doesn't recognize it. It runs out of battery very fast and only shows the 'Connect to iTunes" screen. What do I do?

    Hey my iPod is not showing up on iTunes and my computer doesn't recognize it. It runs out of battery very fast and only shows the 'Connect to iTunes" screen. What do I do?

    http://support.apple.com/kb/ht1808
    http://support.apple.com/kb/ts1567
    Basic troubleshooting steps  
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G HD + OCZ Vertex 3 SSD Boot HD 
    Got problems with your Apple iDevice-like iPhone, iPad or iPod touch? Try Troubleshooting 101

Maybe you are looking for

  • MobileMe Galleries orphaned when importing Iphoto library into Aperture 3

    Can anyone advise how I can get my existing MobileMe galleries to be listed into A3. They were uploaded via Iphoto and I imported that library into A3 but the MM galleries are not there. Obviously I have filled in the appropriate boxes etc in prefere

  • Installing windows xp to a macbook

    is it even possible to install windows xp to a mac? where could I but the software? would i need some parralell software to if i wanted to be able to use mac os x and windows at say the same time? could i do this for windows vista? thnx john

  • IPhoto 4.0.3 crashes when attempting to export pics

    Whenever I go into the photo library or select multiple photos to export, my iBook completely crashes (grey screen advising me to hold the boot button to restart the machine). Is there a solution for this? iBook G4   Mac OS X (10.3.9)   iSight, AirPo

  • Why do i have to keep updating my flashplayer to play my games on facebook when i have like 10 times

    Every time i play on my facebook games i keep getting messages that say i have to update my flash player...I have done this several times. i finaly got to a spot on your website and tried to upgrade the sapce but it doesnt stay...need help cuz there

  • Element balance issue

    we are suppose to change the balance loan amount (to be recovered by company) and the number of installments (installments for a loan) that were assigned in the element of loan deduction. now when we are using Adjust Balance and we choose element for