SQL Server DataSource connection problems

Discussions

EJB programming & troubleshooting: SQL Server DataSource connection problems

  1. SQL Server DataSource connection problems (3 messages)

    I am working on a project that is trying to implement a DAO pattern, we have a session bean which uses a dao ( which is a pojo), the dao then tries to get hold a datasource which is registered with the server, the error below is the message I am getting.

    Resource reference jdbc/bfl/ericDS could not be located, so default values of the following are used: [Resource-ref settings]res-auth: 1 (APPLICATION)
    res-isolation-level: 0 (TRANSACTION_NONE)
    res-sharing-scope: false (UNSHAREABLE)
    res-resolution-control: 999 (undefined)

    [23/09/04 11:13:36:377 BST] 7eae8628 DSConfigurati E DSRA0023E: The DataSource implementation class "com.microsoft.jdbcx.sqlserver.SQLServerDataSource" could not be found.
    [23/09/04 11:13:36:392 BST] 7eae8628 DSConfigurati E DSRA0011E: Exception: java.lang.ClassNotFoundException: com.microsoft.jdbcx.sqlserver.SQLServerDataSource

    Can anyone point me in the right direction
    Thanks.
  2. SQL Server DataSource connection problems[ Go to top ]

    You are probably missing the jar files from the SQLServer 2000 JDBC driver.
    If you have installed the JDBC drivers already, make sure the three jar files in the lib folder of the JDBC driver home are in your server's classpath.

    What app server are you using?

    - Prab
  3. SQL Server DataSource connection problems[ Go to top ]

    I am using Websphere Enterprise Developer, the three jars are set in the classpath.
    I have made a drivermanager connection using the JDBC driver and also used a Datasource connection when using FSContext but I cannot get the datasource from the jndi when bound to the app server.
    The stack trace shows the jndi has bound but the error below is what happens
    when I try and get hold of the datasource.


    [27/09/04 14:19:26:564 BST] 48137ee1 ConnectionFac W J2CA0122I: Resource reference jdbc/bfl/Eric could not be located, so default values of the following are used: [Resource-ref settings]

    res-auth: 1 (APPLICATION)
    res-isolation-level: 0 (TRANSACTION_NONE)
    res-sharing-scope: false (UNSHAREABLE)
    res-resolution-control: 999 (undefined)

    [27/09/04 14:19:31:846 BST] 48137ee1 DSConfigurati E DSRA8100E: Unable to get a XAConnection from the DataSource.
    [27/09/04 14:19:31:846 BST] 48137ee1 DSConfigurati E DSRA0010E: SQL State = 08001, Error Code = 0
    [27/09/04 14:19:31:846 BST] 48137ee1 DSConfigurati E DSRA0011E: Exception: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
    at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
    at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
    at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
    at com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>(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.BaseXADataSource.getXAConnection(Unknown Source)
    at com.microsoft.jdbcx.sqlserver.SQLServerDataSource.getXAConnection(Unknown Source)
    at com.ibm.ws.rsadapter.DSConfigurationHelper$1.run(DSConfigurationHelper.java:589)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.ibm.ws.rsadapter.DSConfigurationHelper.getPooledConnection(DSConfigurationHelper.java:584)
    at com.ibm.ws.rsadapter.spi.WSRdbDataSource.getPooledConnection(WSRdbDataSource.java:180)
    at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnection(WSManagedConnectionFactoryImpl.java:497)
    at com.ibm.ejs.j2c.poolmanager.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:964)
    at com.ibm.ejs.j2c.poolmanager.FreePool.createOrWaitForConnection(FreePool.java:772)
    at com.ibm.ejs.j2c.poolmanager.PoolManager.reserve(PoolManager.java:1049)
    at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:507)
    at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:328)
    at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:205)
    at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:296)
    at uk.co.cooperativefinancialservices.DataSources.SQLServerDataSource.getConnection(SQLServerDataSource.java:77)
    at uk.co.cooperativefinancialservices.Dao.DataAccess.getConnection(DataAccess.java:27)
    at uk.co.cooperativefinancialservices.DaoHome.LoginDaoImpl.validatePassword(LoginDaoImpl.java:40)
    at uk.co.cooperativefinancialservices.accessService.AccessServiceImpl.Login(AccessServiceImpl.java:57)
    at uk.co.cooperativefinancialservices.ejb.access.AccessBean.login(AccessBean.java:54)
    at uk.co.cooperativefinancialservices.ejb.access.EJSRemoteStatelessAccessBean_Access_f1961806.login(EJSRemoteStatelessAccessBean_Access_f1961806.java:41)
    at uk.co.cooperativefinancialservices.ejb.access._Access_Stub.login(_Access_Stub.java:257)
    at app.LoginAction.perform(LoginAction.java:47)
    at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1791)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:258)
    at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:825)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:443)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:171)
    at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79)
    at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:199)
    at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:66)
    at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
    at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:331)
    at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
    at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:430)
    at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:343)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:546)
  4. Did you ever figure out what the problem was here? I am having the same problem under RAD 6.0 and would dearly love any hints toward a solution.