can't get a connetion from MS SQL Server 2000 connectionpool

Discussions

General J2EE: can't get a connetion from MS SQL Server 2000 connectionpool

  1. Hi ,

    I have java servlet that creates a connection from connection pool .
    and I am getting the following errror.I am working on WSAD 4.x.
    I am using Microsoft SQL Server 2000 JDBC Driver Implementation class: com.microsoft.jdbcx.sqlserver.SQLServerDataSource and
    provided all the required jar files located at. C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib.also i have given the resoure properties.

    WebSphere DataSource:CMProperties for DataSource "MSSQLServerConDev"
    DataSource Properties [com.microsoft.jdbcx.sqlserver.SQLServerDataSource]: {user=sa;password=XXXXXXXX;selectMethod=cursor;por
    tNumber=1433;databaseName=FREDTest;serverName=JADE
    ;}
    Connection Pool Properties:
    dataBaseVersion = 0
    minConnectionPoolSize = 1
    maxConnectionPoolSize = 10
    connTimeout = 180
    idleTimeout = 1800
    orphanTimeout = 1800
    ........................................

    [10/23/03 9:40:10:058 CDT] 6e899fa1 SystemOut U SQL exception

    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]

    [SQLServer]Login failed for user 'sa'.
    at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
    at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
    at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source)
    at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source)
    at com.microsoft.jdbc.sqlserver.tds.TDSLoginRequest.processReplyToken(Unknown Source)
    at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)
    at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Source)
    at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown Source)
    at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
    at com.microsoft.jdbcx.base.BaseDataSource.getBaseConnection(Unknown Source)
    at com.microsoft.jdbcx.base.BaseDataSource.getConnection(Unknown Source)
    at com.ibm.ejs.cm.portability.PortabilityLayerImpl.getInstance(PortabilityLayerImpl.java:964)
    at com.ibm.ejs.cm.portability.PortabilityLayerFactory.getPortabilityLayer(PortabilityLayerFactory.java:90)
    at com.ibm.ejs.cm.JDBC1PhaseRF.createConnectionFactory(JDBC1PhaseRF.java:57)
    at com.ibm.ejs.cm.DataSourceImpl$3.run(DataSourceImpl.java:219)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.ibm.ejs.cm.DataSourceImpl.getSource(DataSourceImpl.java:217)
    at com.ibm.ejs.cm.DataSourceImpl$1.run(DataSourceImpl.java:135)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.ibm.ejs.cm.DataSourceImpl.getConnection(DataSourceImpl.java:133)
    at com.ibm.ejs.cm.DataSourceImpl.getConnection(DataSourceImpl.java:102)
    at com.mmm.jdbc.JavaDatabaseTestServlet.doGet(JavaDatabaseTestServlet.java:62)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:827)
    at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:167)
    at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:297)
    at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:110)
    at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472)
    at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012)
    at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913)
    at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:721)
    at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:374)
    at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:118)
    at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:134)
    at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:239)
    at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
    at com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:106)
    at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:154)
    at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:317)
    at com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:60)
    at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:391)
    at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:274)
    at com.ibm.ws.util.CachedThread.run(ThreadPool.java:144)
    java.lang.NumberFormatException: null
    at java.lang.Integer.parseInt(Integer.java(Compiled Code))
    at java.lang.Integer.<init>(Integer.java:558)
    at com.mmm.jdbc.JavaDatabaseTestServlet.doGet(JavaDatabaseTestServlet.java:72)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:827)
    at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:167)
    at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:297)
    at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:110)
    at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472)
    at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012)
    at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913)
    at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:721)
    at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:374)
    at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:118)
    at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:134)
    at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:239)
    at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
    at com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:106)
    at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:154)
    at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:317)
    at com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:60)
    at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:391)
    at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:274)
    at com.ibm.ws.util.CachedThread.run(ThreadPool.java:144)
    [10/23/03 9:40:10:214 CDT] 6e899fa1 SecurityManag X SECJ0135A: Illegal System.exit() attempted
    [10/23/03 9:40:10:245 CDT] 6e899fa1 SecurityManag A SECJ0135A: Illegal System.exit() attempted
    [10/23/03 9:40:10:261 CDT] 6e899fa1 WebGroup X Servlet Error: : java.lang.SecurityException
    at com.ibm.ejs.security.SecurityManager.checkExit(SecurityManager.java:123)
    at java.lang.Runtime.exit(Runtime.java:119)
    at java.lang.System.exit(System.java:746)
    at com.mmm.jdbc.JavaDatabaseTestServlet.doGet(JavaDatabaseTestServlet.java:103)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:827)
    at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:167)
    at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:297)
    at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:110)
    at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472)
    at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012)
    at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913)
    at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:721)
    at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:374)
    at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:118)
    at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:134)
    at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:239)
    at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
    at com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:106)
    at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:154)
    at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:317)
    at com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:60)
    at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:391)
    at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:274)
    at com.ibm.ws.util.CachedThread.run(ThreadPool.java:144)


    pl help

    Thanks.
  2. Write a small standalone java program that successfuly connects to that MS SQL instance and apply URL and connection properties to the pool definition.

    Hope this helps.

    Regards,

    Slava Imeshev