Topic
  • 44 replies
  • Latest Post - ‏2013-07-20T19:05:44Z by 0PFP_swarna_s
SystemAdmin
SystemAdmin
37422 Posts

Pinned topic Unable to get a pooled connection from the datasource

‏2005-06-21T23:32:15Z |
Hi All,

I was trying to connect to Oracle 8.1.7 using Oracle thin drivers. I am successful deploying my application (.war file) in WAS 6.0 without the connection pool implementation.

When I try to implement the connection pool I am getting these following errors. Can anyone of you please shed some light on this and point me where I am going wrong.

JNDI Name: jdbc/certDataSource

I specified the WebSphere Binding for the JNDI name as <java:comp/env/certDSResource>

Thanks a lot!

-Kishore

6/21/05 17:51:13:040 CDT 00000035 FreePool E J2CA0046E: Method createManagedConnectionWithMCWrapper caught an exception during creation of the ManagedConnection for resource jdbc/certDataSource, throwing ResourceAllocationException. Original exception: com.ibm.ws.exception.WsException: DSRA8100E: Unable to get a PooledConnection from the DataSource. with SQL State : null SQL Code : 17433
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:1160)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:183)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:346)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
at java.sql.DriverManager.getConnection(DriverManager.java:539)
at java.sql.DriverManager.getConnection(DriverManager.java:158)
at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:169)
at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPhysicalConnection(OracleConnectionPoolDataSource.java:149)
at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:95)
at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:63)
at com.ibm.ws.rsadapter.DSConfigurationHelper$1.run(DSConfigurationHelper.java:948)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java(Compiled Code))
at com.ibm.ws.rsadapter.DSConfigurationHelper.getPooledConnection(DSConfigurationHelper.java:943)
at com.ibm.ws.rsadapter.spi.WSRdbDataSource.getPooledConnection(WSRdbDataSource.java:949)
at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnection(WSManagedConnectionFactoryImpl.java:936)
at com.ibm.ejs.j2c.poolmanager.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:1502)
at com.ibm.ejs.j2c.poolmanager.FreePool.createOrWaitForConnection(FreePool.java:1294)
at com.ibm.ejs.j2c.poolmanager.PoolManager.reserve(PoolManager.java:2000)
at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:769)
at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:569)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:328)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:297)
at org.stjude.cisds.database.ConnDatabase.getConnection(ConnDatabase.java:1954)
at com.ibm._jsp._sjtx_5F_igreet._jspService(_sjtx_5F_igreet.java:101)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:88)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1212)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:629)
at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:117)
at com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.handleRequest(JSPExtensionServletWrapper.java:171)
at com.ibm.ws.jsp.webcontainerext.JSPExtensionProcessor.handleRequest(JSPExtensionProcessor.java:230)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:552)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:1034)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:997)
at com.ibm._jsp._main_5F_trax_5F_igreet._jspService(_main_5F_trax_5F_igreet.java:182)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:88)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1212)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:629)
at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:117)
at com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.handleRequest(JSPExtensionServletWrapper.java:171)
at com.ibm.ws.jsp.webcontainerext.JSPExtensionProcessor.handleRequest(JSPExtensionProcessor.java:230)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2837)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:220)
at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:204)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1681)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:77)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:421)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:367)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:94)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:548)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:601)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:934)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1021)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1332)
Caused by: java.sql.SQLException: invalid arguments in callDSRA0010E: SQL State = null, Error Code = 17,433DSRA0010E: SQL State = null, Error Code = 17,433
Updated on 2010-09-24T15:39:50Z at 2010-09-24T15:39:50Z by pdn262
  • SystemAdmin
    SystemAdmin
    37422 Posts

    Re: Unable to get a pooled connection from the datasource

    ‏2005-06-23T17:45:19Z  
    Try java:comp/env/jdbc/certDataSource instead of java:comp/env/certDSResource in you context look up.
  • SystemAdmin
    SystemAdmin
    37422 Posts

    Re: Unable to get a pooled connection from the datasource

    ‏2005-07-14T08:35:34Z  
    Hi, same problem here!
    Did you fix it?
  • SystemAdmin
    SystemAdmin
    37422 Posts

    Re: Unable to get a pooled connection from the datasource

    ‏2005-07-29T04:40:00Z  
    Hi, same problem here!
    Did you fix it?
    Hi me too facing the prob..anyone could resolve this...
    advance thanks
    Tamil.
  • SystemAdmin
    SystemAdmin
    37422 Posts

    Re: Unable to get a pooled connection from the datasource

    ‏2005-07-29T10:38:19Z  
    Hi me too facing the prob..anyone could resolve this...
    advance thanks
    Tamil.
    sasitamil2002@yahoo.com wrote:

    >Hi me too facing the prob..anyone could resolve this...
    >advance thanks
    >Tamil.
    >
    >
    There are typically 3 causes for this.

    1) the application isn't closing connections and is thus 'leaking' them.
    2) the database doesn't have enough 'listeners' for the number of
    connections you're trying to open. This generally happens in a clustered
    environment, where the database must support #Connections x #Servers.
    3) there's a database call that's taking a very long time, and
    eventually every configured connection gets into this call and until one
    completes, no other threads can get a connection.

    #1 is far and away the most common.

    Ken
  • SystemAdmin
    SystemAdmin
    37422 Posts

    Re: Unable to get a pooled connection from the datasource

    ‏2005-08-02T15:41:14Z  
    sasitamil2002@yahoo.com wrote:

    >Hi me too facing the prob..anyone could resolve this...
    >advance thanks
    >Tamil.
    >
    >
    There are typically 3 causes for this.

    1) the application isn't closing connections and is thus 'leaking' them.
    2) the database doesn't have enough 'listeners' for the number of
    connections you're trying to open. This generally happens in a clustered
    environment, where the database must support #Connections x #Servers.
    3) there's a database call that's taking a very long time, and
    eventually every configured connection gets into this call and until one
    completes, no other threads can get a connection.

    #1 is far and away the most common.

    Ken
    Just for information :
    http://www.lc.leidenuniv.nl/awcourse/oracle/java.920/a96654/oci_func.htm
  • SystemAdmin
    SystemAdmin
    37422 Posts

    Re: Unable to get a pooled connection from the datasource

    ‏2005-08-09T13:59:31Z  
    Just for information :
    http://www.lc.leidenuniv.nl/awcourse/oracle/java.920/a96654/oci_func.htm
    I had the same problem, and solved restarting the node agent... I hope it helps...
  • SystemAdmin
    SystemAdmin
    37422 Posts

    Re: Unable to get a pooled connection from the datasource

    ‏2005-08-09T14:21:28Z  
    I had the same problem, and solved restarting the node agent... I hope it helps...
    "java.sql.SQLException: null userid not supportedDSRA0010E: SQL State = null, Error Code = -99,999DSRA0010E: SQL State = null, Error Code = -99,999"

    The error message above could be caused by not setting up Component managed authentication alias. All JAAS alias should appear in the drop down of the datasource set up. You have to select the correct one.
  • MaximDim
    MaximDim
    1 Post

    Re: Unable to get a pooled connection from the datasource

    ‏2005-08-09T14:28:08Z  
    I had the same problem, and solved restarting the node agent... I hope it helps...
    Make sure you have selected 'Component-managed authentication alias' (create it first with your username/password for database)
  • SRS
    SRS
    3 Posts

    Re: Unable to get a pooled connection from the datasource

    ‏2005-09-22T17:16:53Z  
    • MaximDim
    • ‏2005-08-09T14:28:08Z
    Make sure you have selected 'Component-managed authentication alias' (create it first with your username/password for database)
    I have the same problem:

    Test connection failed for data source pon on server nodeagent at node app2node with the following exception: java.lang.Exception: java.sql.SQLException: null userid not supportedDSRA0010E: SQL State = null, Error Code = -99,999.
    I have created authentication data entries and set it in the combobox "Component-managed authentication alias".

    Why I receive the error?
  • SystemAdmin
    SystemAdmin
    37422 Posts

    Re: Unable to get a pooled connection from the datasource

    ‏2005-10-23T21:20:11Z  
    I was getting the same error message trying to connect (pooled or otherwise) to Oracle 9.1 from WAS 6.0.
    At the end what solved it was : setting the "Component-managed authentication alias" from default "(none)" to "MyComputerNode02/Oracle_Scott". That is something I created. (My computer's name is MyComputer, the node is Node02). To do this, I logged on to the WebSphere Admin Console, went to : Resources -> JDBC providers -> MyOracleJDBCDriver -> Data sources, created a new datasource named MyDataSource (with URL as jdbc:oracle:thin:@localhost:1521:myOraSid), saved the datasource and went back on to its page (i.e. Resources -> JDBC providers -> MyOracleJDBCDriver -> Data sources -> MyDataSource). Now the link (under "Related Items") named "J2EE Connector Architecture (J2C) authentication data entries" becomes clickable. Clicked there and created an account with alias "Oracle_Scott" UserID "scott" and password "tiger". Saved it, came back to the MyDataSource page, and set the "Component-managed authentication alias" from default "(none)" to "MyComputerNode02/Oracle_Scott", and saved it.
    Connection tested and the nagging problem of
       java.sql.SQLException: invalid arguments in callDSRA0010E: SQL State = null, Error Code = 17,433
    was gone!
  • SystemAdmin
    SystemAdmin
    37422 Posts

    Re: Unable to get a pooled connection from the datasource

    ‏2005-12-27T08:02:43Z  
    or you can do as follow:

    ... ...
    Object obj = (Object) initCtx.lookup("your ds jndi here");
    DataSource source = (DataSource)PortableRemoteObject.narrow(obj, DataSource.class);
    conn = source.getConnection("you db user name here","your db pswd here");
    ... ...

    ===============
    Good luck!
  • SystemAdmin
    SystemAdmin
    37422 Posts

    Re: Unable to get a pooled connection from the datasource

    ‏2005-12-30T18:26:35Z  
    or you can do as follow:

    ... ...
    Object obj = (Object) initCtx.lookup("your ds jndi here");
    DataSource source = (DataSource)PortableRemoteObject.narrow(obj, DataSource.class);
    conn = source.getConnection("you db user name here","your db pswd here");
    ... ...

    ===============
    Good luck!
    I have my "Component-managed authentication alias" set up and pointing to the username/password for connecting to Oracle. I still do not get the connection when I make this call: con = ds.getConnection();

    However, when I use the trick you suggested and make the call this way:
    con = ds.getConnection("user","pwd");
    I get the connection successfully.
    Do you know if there is some problem with XA datasources losing credentials?? (con = ds.getConnection() call was working for us before we turned XA ON)
    Thanks!
  • SystemAdmin
    SystemAdmin
    37422 Posts

    Re: Unable to get a pooled connection from the datasource

    ‏2006-02-28T06:15:56Z  
    I was getting the same error message trying to connect (pooled or otherwise) to Oracle 9.1 from WAS 6.0.
    At the end what solved it was : setting the "Component-managed authentication alias" from default "(none)" to "MyComputerNode02/Oracle_Scott". That is something I created. (My computer's name is MyComputer, the node is Node02). To do this, I logged on to the WebSphere Admin Console, went to : Resources -> JDBC providers -> MyOracleJDBCDriver -> Data sources, created a new datasource named MyDataSource (with URL as jdbc:oracle:thin:@localhost:1521:myOraSid), saved the datasource and went back on to its page (i.e. Resources -> JDBC providers -> MyOracleJDBCDriver -> Data sources -> MyDataSource). Now the link (under "Related Items") named "J2EE Connector Architecture (J2C) authentication data entries" becomes clickable. Clicked there and created an account with alias "Oracle_Scott" UserID "scott" and password "tiger". Saved it, came back to the MyDataSource page, and set the "Component-managed authentication alias" from default "(none)" to "MyComputerNode02/Oracle_Scott", and saved it.
    Connection tested and the nagging problem of
       java.sql.SQLException: invalid arguments in callDSRA0010E: SQL State = null, Error Code = 17,433
    was gone!
    Rajib.GanChaudhuri's explanation is very good. I solved the problem. Thanks!
  • SystemAdmin
    SystemAdmin
    37422 Posts

    Re: Unable to get a pooled connection from the datasource

    ‏2006-05-04T05:11:10Z  
    Ensure the alias you are trying to configure does not contain trailing spaces...

    Trap for young players
  • msiddan
    msiddan
    1 Post

    Re: Unable to get a pooled connection from the datasource

    ‏2006-06-08T00:06:42Z  
    I have my "Component-managed authentication alias" set up and pointing to the username/password for connecting to Oracle. I still do not get the connection when I make this call: con = ds.getConnection();

    However, when I use the trick you suggested and make the call this way:
    con = ds.getConnection("user","pwd");
    I get the connection successfully.
    Do you know if there is some problem with XA datasources losing credentials?? (con = ds.getConnection() call was working for us before we turned XA ON)
    Thanks!
    Just wodering if you had found a solution for this issue, I'm having the same problem. I have the component-managed alias setup but it still gives me the same error. I tried the other approach of passsing the userid and password and that works. Can anyone with experience in this area, shed some light. I'm wondering if it has anything to do with the scope of these setting, I had created my datasources under the server setting, also tried under node and cell same result.

    Thanks.
  • SystemAdmin
    SystemAdmin
    37422 Posts

    Re: Unable to get a pooled connection from the datasource

    ‏2006-11-27T15:54:40Z  
    I was getting the same error message trying to connect (pooled or otherwise) to Oracle 9.1 from WAS 6.0.
    At the end what solved it was : setting the "Component-managed authentication alias" from default "(none)" to "MyComputerNode02/Oracle_Scott". That is something I created. (My computer's name is MyComputer, the node is Node02). To do this, I logged on to the WebSphere Admin Console, went to : Resources -> JDBC providers -> MyOracleJDBCDriver -> Data sources, created a new datasource named MyDataSource (with URL as jdbc:oracle:thin:@localhost:1521:myOraSid), saved the datasource and went back on to its page (i.e. Resources -> JDBC providers -> MyOracleJDBCDriver -> Data sources -> MyDataSource). Now the link (under "Related Items") named "J2EE Connector Architecture (J2C) authentication data entries" becomes clickable. Clicked there and created an account with alias "Oracle_Scott" UserID "scott" and password "tiger". Saved it, came back to the MyDataSource page, and set the "Component-managed authentication alias" from default "(none)" to "MyComputerNode02/Oracle_Scott", and saved it.
    Connection tested and the nagging problem of
       java.sql.SQLException: invalid arguments in callDSRA0010E: SQL State = null, Error Code = 17,433
    was gone!
    Right info, just add that after doing that you will need to restart the nodeagent. If you do not restart it you will continue to get the same error.
  • SystemAdmin
    SystemAdmin
    37422 Posts

    Re: Unable to get a pooled connection from the datasource

    ‏2006-12-22T08:18:19Z  
    I had the same problem, and solved restarting the node agent... I hope it helps...
    Restarting the nodeagent of the current node after stopping the JVM server make it works (it occurred when I was on WAS 5.0, 5.1, 6.0 and 6.1).. thank you IBM.
  • SystemAdmin
    SystemAdmin
    37422 Posts

    Re: Unable to get a pooled connection from the datasource

    ‏2006-12-23T13:00:07Z  
    I had the same problem, and solved restarting the node agent... I hope it helps...
    I add same problem ...
    Restarting the nodeagent of the current node after stopping the JVM server make it works (it occurred when I was on WAS 5.0, 5.1, 6.0 and 6.1).. thank you IBM.
    A good enhancement could be to show a popup in the WebSphere console (retry nodeagent please !!)
  • SystemAdmin
    SystemAdmin
    37422 Posts

    Re: Unable to get a pooled connection from the datasource

    ‏2006-12-29T19:49:27Z  
    I add same problem ...
    Restarting the nodeagent of the current node after stopping the JVM server make it works (it occurred when I was on WAS 5.0, 5.1, 6.0 and 6.1).. thank you IBM.
    A good enhancement could be to show a popup in the WebSphere console (retry nodeagent please !!)
    Restarting Node Agent and using Compponent Authentication Alias along with Container Authentication Alias(for my requirement, as I am using java:comp/env to lookup the Resref).
    Also I had to restart my server instances under that Node.
    Thanks for everybody's invaluable comments.
  • SystemAdmin
    SystemAdmin
    37422 Posts

    Re: Unable to get a pooled connection from the datasource

    ‏2007-01-25T07:25:39Z  
    I was getting the same error message trying to connect (pooled or otherwise) to Oracle 9.1 from WAS 6.0.
    At the end what solved it was : setting the "Component-managed authentication alias" from default "(none)" to "MyComputerNode02/Oracle_Scott". That is something I created. (My computer's name is MyComputer, the node is Node02). To do this, I logged on to the WebSphere Admin Console, went to : Resources -> JDBC providers -> MyOracleJDBCDriver -> Data sources, created a new datasource named MyDataSource (with URL as jdbc:oracle:thin:@localhost:1521:myOraSid), saved the datasource and went back on to its page (i.e. Resources -> JDBC providers -> MyOracleJDBCDriver -> Data sources -> MyDataSource). Now the link (under "Related Items") named "J2EE Connector Architecture (J2C) authentication data entries" becomes clickable. Clicked there and created an account with alias "Oracle_Scott" UserID "scott" and password "tiger". Saved it, came back to the MyDataSource page, and set the "Component-managed authentication alias" from default "(none)" to "MyComputerNode02/Oracle_Scott", and saved it.
    Connection tested and the nagging problem of
       java.sql.SQLException: invalid arguments in callDSRA0010E: SQL State = null, Error Code = 17,433
    was gone!
    Hi,

    It's working in my case...
    Thanks for such descriptive explaination

    I m using WID 6.0.1
  • SystemAdmin
    SystemAdmin
    37422 Posts

    Re: Unable to get a pooled connection from the datasource

    ‏2007-10-08T18:03:50Z  
    I could resolve this issue by restarting the server.
    1)See that you provide all custom properties like URL,server name ,database name and J2C authentication details.
    2Try restarting the server after configuring JDBC.
  • lafual
    lafual
    1 Post

    Re: Unable to get a pooled connection from the datasource - DIFFERENT SOLUTION

    ‏2007-10-14T11:39:56Z  
    I could resolve this issue by restarting the server.
    1)See that you provide all custom properties like URL,server name ,database name and J2C authentication details.
    2Try restarting the server after configuring JDBC.
    On RAD/WSAD7, right click on the project, then open Properties. Choose JDBC Connections. In the "Name" drop-down, choose the connection in question. Beside the Runtime Connection Details panel click "Edit...".

    THIS IS THE BIT THAT CONFUSED ME...

    We were trying use the user/pass@db defined on the target server. So I presumed we had to UNCHECK "Data source requires a user id ..." and "Deploy database and connection properties..." as these are defined elsewhere.

    I was wrong ...the "Data source requires a user id..." MUST BE CHECKED. The user/pass MUST have a value otherwise the IDE UN-checks this option. The user/pass can be nonsense - it will now use what is defined on the remote server.

    So in summary - make sure "Data source requires a user id..." is checked otherwise you will get DSRA0010E: SQL State = null, Error Code = 17,433.
  • SystemAdmin
    SystemAdmin
    37422 Posts

    Re: Unable to get a pooled connection from the datasource

    ‏2008-04-02T06:47:12Z  
    Hello....

    one of the reason for this is the customer properties.
    for example while giveing user name and password for the DB connection, if u type username instead of user u may face this probelem.....

    please check the custome properties what u have given.....

    path for the custome properties is given below

    Resources - JDBC - Data sources > OracleJNDI > Custom properties
  • SystemAdmin
    SystemAdmin
    37422 Posts

    Re: Unable to get a pooled connection from the datasource

    ‏2008-04-08T18:05:40Z  
    Hello....

    one of the reason for this is the customer properties.
    for example while giveing user name and password for the DB connection, if u type username instead of user u may face this probelem.....

    please check the custome properties what u have given.....

    path for the custome properties is given below

    Resources - JDBC - Data sources > OracleJNDI > Custom properties
    just wondering... this thread was opened about three years ago and we still see the replies... seems like everlasting issue, ain't it?