• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

what is the problem

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

i have solved the problem of container-managed authentication alias but i got the following error that saying two things :

1-Unable to get a PooledConnection from the DataSource.

2-Unable to connect. DataSource property serverName must be specified.

pls help me to find what's the problem to enable to connect to my SQL my datasource


with regards




===================================================================


[4/26/05 15:23:23:048 PDT] 6f825a96 FreePool E J2CA0046E: Method createManagedConnctionWithMCWrapper caught an exception during creation of the ManagedConnection for resource jdbc/DBDatasource, throwing ResourceAllocationException. Original exception: com.ibm.ws.exception.WsException: DSRA8100E: Unable to get a PooledConnection from the DataSource.
at com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException.<init>(DataStoreAdapterException.java:244)
at com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException.<init>(DataStoreAdapterException.java:171)
at com.ibm.ws.rsadapter.AdapterUtil.createDataStoreAdapterException(AdapterUtil.java:208)
at com.ibm.ws.rsadapter.DSConfigurationHelper.getPooledConnection(DSConfigurationHelper.java:706)
at com.ibm.ws.rsadapter.spi.WSRdbDataSource.getPooledConnection(WSRdbDataSource.java:487)
at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnection(WSManagedConnectionFactoryImpl.java:577)
at com.ibm.ejs.j2c.poolmanager.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:1280)
at com.ibm.ejs.j2c.poolmanager.FreePool.createOrWaitForConnection(FreePool.java:1064)
at com.ibm.ejs.j2c.poolmanager.PoolManager.reserve(PoolManager.java:1571)
at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:622)
at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:424)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:216)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:308)
at com.ibm.db.db.base.DatabaseConnection.connectToDataSource(DatabaseConnection.java)
at com.ibm.db.db.DatabaseConnection.connect(DatabaseConnection.java)
at com.ibm.db.db.Statement.connect(Statement.java)
at com.ibm.db.db.SelectStatement.execute(SelectStatement.java)
at com.ibm.db.beans.DBSelect.execute(DBSelect.java)
at apress.wsad.db.BookSearchMasterViewBean.execute(BookSearchMasterViewBean.java:53)
at org.apache.jsp._BookSearchMasterView._jspService(BookSearchMasterView.jsp :27)
at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:344)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:662)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.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:283)
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:974)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:555)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
at apress.wsad.db.BookSearchController.dispatch(BookSearchController.java:104)
at apress.wsad.db.BookSearchController.performTask(BookSearchController.java:67)
at apress.wsad.db.BookSearchController.doPost(BookSearchController.java:89)
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:283)
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:974)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:555)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:114)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
Caused by: java.sql.SQLException: [IBM][SQLServer JDBC Driver]Unable to connect. DataSource property serverName must be specified.
at com.ibm.websphere.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.ibm.websphere.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.ibm.websphere.jdbcx.base.BaseDataSource.getConnectionProperties(Unknown Source)
at com.ibm.websphere.jdbcx.base.BaseDataSource.getBaseConnection(Unknown Source)
at com.ibm.websphere.jdbcx.base.BaseDataSource.getPooledConnection(Unknown Source)
at com.ibm.ws.rsadapter.DSConfigurationHelper$1.run(DSConfigurationHelper.java:688)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java(Compiled Code))
at com.ibm.ws.rsadapter.DSConfigurationHelper.getPooledConnection(DSConfigurationHelper.java:683)
... 57 more
---- Begin backtrace for nested exception
java.sql.SQLException: [IBM][SQLServer JDBC Driver]Unable to connect. DataSource property serverName must be specified.
at com.ibm.websphere.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.ibm.websphere.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.ibm.websphere.jdbcx.base.BaseDataSource.getConnectionProperties(Unknown Source)
at com.ibm.websphere.jdbcx.base.BaseDataSource.getBaseConnection(Unknown Source)
at com.ibm.websphere.jdbcx.base.BaseDataSource.getPooledConnection(Unknown Source)
at com.ibm.ws.rsadapter.DSConfigurationHelper$1.run(DSConfigurationHelper.java:688)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java(Compiled Code))
at com.ibm.ws.rsadapter.DSConfigurationHelper.getPooledConnection(DSConfigurationHelper.java:683)
at com.ibm.ws.rsadapter.spi.WSRdbDataSource.getPooledConnection(WSRdbDataSource.java:487)
at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnection(WSManagedConnectionFactoryImpl.java:577)
at com.ibm.ejs.j2c.poolmanager.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:1280)
at com.ibm.ejs.j2c.poolmanager.FreePool.createOrWaitForConnection(FreePool.java:1064)
at com.ibm.ejs.j2c.poolmanager.PoolManager.reserve(PoolManager.java:1571)
at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:622)
at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:424)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:216)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:308)
at com.ibm.db.db.base.DatabaseConnection.connectToDataSource(DatabaseConnection.java)
at com.ibm.db.db.DatabaseConnection.connect(DatabaseConnection.java)
at com.ibm.db.db.Statement.connect(Statement.java)
at com.ibm.db.db.SelectStatement.execute(SelectStatement.java)
at com.ibm.db.beans.DBSelect.execute(DBSelect.java)
at apress.wsad.db.BookSearchMasterViewBean.execute(BookSearchMasterViewBean.java:53)
at org.apache.jsp._BookSearchMasterView._jspService(BookSearchMasterView.jsp :27)
at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:344)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:662)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.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:283)
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:974)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:555)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
at apress.wsad.db.BookSearchController.dispatch(BookSearchController.java:104)
at apress.wsad.db.BookSearchController.performTask(BookSearchController.java:67)
at apress.wsad.db.BookSearchController.doPost(BookSearchController.java:89)
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:283)
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:974)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:555)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:114)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
Next Linked Exception:
java.sql.SQLException: [IBM][SQLServer JDBC Driver]Unable to connect. DataSource property serverName must be specified.
at com.ibm.websphere.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.ibm.websphere.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.ibm.websphere.jdbcx.base.BaseDataSource.getConnectionProperties(Unknown Source)
at com.ibm.websphere.jdbcx.base.BaseDataSource.getBaseConnection(Unknown Source)
at com.ibm.websphere.jdbcx.base.BaseDataSource.getPooledConnection(Unknown Source)
at com.ibm.ws.rsadapter.DSConfigurationHelper$1.run(DSConfigurationHelper.java:688)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java(Compiled Code))
at com.ibm.ws.rsadapter.DSConfigurationHelper.getPooledConnection(DSConfigurationHelper.java:683)
at com.ibm.ws.rsadapter.spi.WSRdbDataSource.getPooledConnection(WSRdbDataSource.java:487)
at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnection(WSManagedConnectionFactoryImpl.java:577)
at com.ibm.ejs.j2c.poolmanager.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:1280)
at com.ibm.ejs.j2c.poolmanager.FreePool.createOrWaitForConnection(FreePool.java:1064)
at com.ibm.ejs.j2c.poolmanager.PoolManager.reserve(PoolManager.java:1571)
at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:622)
at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:424)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:216)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:308)
at com.ibm.db.db.base.DatabaseConnection.connectToDataSource(DatabaseConnection.java)
at com.ibm.db.db.DatabaseConnection.connect(DatabaseConnection.java)
at com.ibm.db.db.Statement.connect(Statement.java)
at com.ibm.db.db.SelectStatement.execute(SelectStatement.java)
at com.ibm.db.beans.DBSelect.execute(DBSelect.java)
at apress.wsad.db.BookSearchMasterViewBean.execute(BookSearchMasterViewBean.java:53)
at org.apache.jsp._BookSearchMasterView._jspService(BookSearchMasterView.jsp :27)
at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:344)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:662)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.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:283)
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:974)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:555)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
at apress.wsad.db.BookSearchController.dispatch(BookSearchController.java:104)
at apress.wsad.db.BookSearchController.performTask(BookSearchController.java:67)
at apress.wsad.db.BookSearchController.doPost(BookSearchController.java:89)
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:283)
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:974)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:555)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:114)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)


[4/26/05 15:23:23:089 PDT] 6f825a96 ConnectionMan E J2CA0020E: The Connection Pool Manager could not allocate a Managed Connection: javax.resource.spi.ResourceAllocationException: DSRA8100E: Unable to get a PooledConnection from the DataSource.
at com.ibm.ejs.j2c.poolmanager.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:1321)
at com.ibm.ejs.j2c.poolmanager.FreePool.createOrWaitForConnection(FreePool.java:1064)
at com.ibm.ejs.j2c.poolmanager.PoolManager.reserve(PoolManager.java:1571)
at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:622)
at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:424)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:216)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:308)
at com.ibm.db.db.base.DatabaseConnection.connectToDataSource(DatabaseConnection.java)
at com.ibm.db.db.DatabaseConnection.connect(DatabaseConnection.java)
at com.ibm.db.db.Statement.connect(Statement.java)
at com.ibm.db.db.SelectStatement.execute(SelectStatement.java)
at com.ibm.db.beans.DBSelect.execute(DBSelect.java)
at apress.wsad.db.BookSearchMasterViewBean.execute(BookSearchMasterViewBean.java:53)
at org.apache.jsp._BookSearchMasterView._jspService(BookSearchMasterView.jsp :27)
at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:344)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:662)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.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:283)
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:974)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:555)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
at apress.wsad.db.BookSearchController.dispatch(BookSearchController.java:104)
at apress.wsad.db.BookSearchController.performTask(BookSearchController.java:67)
at apress.wsad.db.BookSearchController.doPost(BookSearchController.java:89)
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:283)
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:974)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:555)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:114)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
---- Begin backtrace for Nested Throwables
java.sql.SQLException: [IBM][SQLServer JDBC Driver]Unable to connect. DataSource property serverName must be specified.
at com.ibm.websphere.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.ibm.websphere.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.ibm.websphere.jdbcx.base.BaseDataSource.getConnectionProperties(Unknown Source)
at com.ibm.websphere.jdbcx.base.BaseDataSource.getBaseConnection(Unknown Source)
at com.ibm.websphere.jdbcx.base.BaseDataSource.getPooledConnection(Unknown Source)
at com.ibm.ws.rsadapter.DSConfigurationHelper$1.run(DSConfigurationHelper.java:688)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java(Compiled Code))
at com.ibm.ws.rsadapter.DSConfigurationHelper.getPooledConnection(DSConfigurationHelper.java:683)
at com.ibm.ws.rsadapter.spi.WSRdbDataSource.getPooledConnection(WSRdbDataSource.java:487)
at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnection(WSManagedConnectionFactoryImpl.java:577)
at com.ibm.ejs.j2c.poolmanager.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:1280)
at com.ibm.ejs.j2c.poolmanager.FreePool.createOrWaitForConnection(FreePool.java:1064)
at com.ibm.ejs.j2c.poolmanager.PoolManager.reserve(PoolManager.java:1571)
at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:622)
at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:424)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:216)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:308)
at com.ibm.db.db.base.DatabaseConnection.connectToDataSource(DatabaseConnection.java)
at com.ibm.db.db.DatabaseConnection.connect(DatabaseConnection.java)
at com.ibm.db.db.Statement.connect(Statement.java)
at com.ibm.db.db.SelectStatement.execute(SelectStatement.java)
at com.ibm.db.beans.DBSelect.execute(DBSelect.java)
at apress.wsad.db.BookSearchMasterViewBean.execute(BookSearchMasterViewBean.java:53)
at org.apache.jsp._BookSearchMasterView._jspService(BookSearchMasterView.jsp :27)
at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:344)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:662)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.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:283)
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:974)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:555)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
at apress.wsad.db.BookSearchController.dispatch(BookSearchController.java:104)
at apress.wsad.db.BookSearchController.performTask(BookSearchController.java:67)
at apress.wsad.db.BookSearchController.doPost(BookSearchController.java:89)
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:283)
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:974)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:555)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:114)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
.
[IBM][SQLServer JDBC Driver]Unable to connect. DataSource property serverName must be specified.

[4/26/05 15:23:23:109 PDT] 6f825a96 WebGroup E SRVE0026E: [Servlet Error]-[[IBM][SQLServer JDBC Driver]Unable to connect. DataSource property serverName must be specified.]: java.sql.SQLException: [IBM][SQLServer JDBC Driver]Unable to connect. DataSource property serverName must be specified.
at com.ibm.websphere.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.ibm.websphere.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.ibm.websphere.jdbcx.base.BaseDataSource.getConnectionProperties(Unknown Source)
at com.ibm.websphere.jdbcx.base.BaseDataSource.getBaseConnection(Unknown Source)
at com.ibm.websphere.jdbcx.base.BaseDataSource.getPooledConnection(Unknown Source)
at com.ibm.ws.rsadapter.DSConfigurationHelper$1.run(DSConfigurationHelper.java:688)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java(Compiled Code))
at com.ibm.ws.rsadapter.DSConfigurationHelper.getPooledConnection(DSConfigurationHelper.java:683)
at com.ibm.ws.rsadapter.spi.WSRdbDataSource.getPooledConnection(WSRdbDataSource.java:487)
at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnection(WSManagedConnectionFactoryImpl.java:577)
at com.ibm.ejs.j2c.poolmanager.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:1280)
at com.ibm.ejs.j2c.poolmanager.FreePool.createOrWaitForConnection(FreePool.java:1064)
at com.ibm.ejs.j2c.poolmanager.PoolManager.reserve(PoolManager.java:1571)
at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:622)
at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:424)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:216)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:308)
at com.ibm.db.db.base.DatabaseConnection.connectToDataSource(DatabaseConnection.java)
at com.ibm.db.db.DatabaseConnection.connect(DatabaseConnection.java)
at com.ibm.db.db.Statement.connect(Statement.java)
at com.ibm.db.db.SelectStatement.execute(SelectStatement.java)
at com.ibm.db.beans.DBSelect.execute(DBSelect.java)
at apress.wsad.db.BookSearchMasterViewBean.execute(BookSearchMasterViewBean.java:53)
at org.apache.jsp._BookSearchMasterView._jspService(BookSearchMasterView.jsp :27)
at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:344)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:662)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.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:283)
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:974)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:555)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
at apress.wsad.db.BookSearchController.dispatch(BookSearchController.java:104)
at apress.wsad.db.BookSearchController.performTask(BookSearchController.java:67)
at apress.wsad.db.BookSearchController.doPost(BookSearchController.java:89)
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:283)
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:974)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:555)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:114)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)

with regards
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please don't post the same problem in numerous topics. Its very confusing for anyone trying to follow the thread, and will only hamper your chances of getting a meaningful response.

The cause of your problem is detailed in your stack trace: WebSphere is unable to get a Pooled Connection from the DataSource because you have not specified a serverName property for this DataSource. (This is how stack traces work in Java - if one exception is casued by another you will see both listed in the trace.)

You don't mention which version of WebSphere you are using so I don't know if you can do it this way, but you probably need to go to the part of the Admin Console where you defined your DataSource and add a Custom Property called "serverName" with the correct value of your mySQL serverName.
 
sabr sabars
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
these are more information that can assist you to help me :

1-my websphere 5.1

2-i use my sqlserver in the same machine

3-i test my application in the test unit

2-i did not configure any connection pool for my datasource and here is my code :

package apress.wsad.db;
/**************************************************************
*Description - BookSearch Master View Bean
*
* An HTML View Bean wrappers your data so that you can capture the
* output and make it HTML friendly
*/

// Imports
import java.io.*;
import com.ibm.db.beans.*;
import java.sql.Types;
import java.sql.DatabaseMetaData;
import java.sql.SQLException;

public class BookSearchMasterViewBean {
// ConnectionSpec
protected static DBConnectionSpec connectionSpec = null;

//Variables
protected DBSelect masterViewDBBean = null;

protected String mvUsername = "";
protected String mvPassword = "";
protected String mvDataSourceName = "";

protected String inLOCATION;

//Constants
protected static final String SQL_STRING = "SELECT dbo.BOOK_CATALOG.CATALOG_NUMBER, dbo.BOOK_CATALOG.AUTHOR, dbo.BOOK_CATALOG.BOOK_TITLE, dbo.BOOK_ACTIVITY.TXN_DATE, dbo.BOOK_ACTIVITY.TXN_TYPE, dbo.BOOK_ACTIVITY.COMPANY_NAME FROM dbo.BOOK_CATALOG, dbo.BOOK_ACTIVITY WHERE dbo.BOOK_CATALOG.LOCATION <> :location AND dbo.BOOK_ACTIVITY.BOOK_CAT_NUM = dbo.BOOK_CATALOG.CATALOG_NUMBER ";
protected static final String PARAM1_NAME = "LOCATION";
protected static final String BookSearch_CATALOG_NUMBER_LABEL = "CATALOG_NUMBER";
protected static final String BookSearch_AUTHOR_LABEL = "AUTHOR";
protected static final String BookSearch_BOOK_TITLE_LABEL = "BOOK_TITLE";
protected static final String BookSearch_dbo_BOOK_ACTIVITY_TXN_DATE_LABEL = "dbo_BOOK_ACTIVITY_TXN_DATE";
protected static final String BookSearch_dbo_BOOK_ACTIVITY_TXN_TYPE_LABEL = "dbo_BOOK_ACTIVITY_TXN_TYPE";
protected static final String BookSearch_COMPANY_NAME_LABEL = "COMPANY_NAME";

/*****************************************************************
* Initialize the connectionSpec
*/
protected void initConnectionSpec() throws SQLException {
connectionSpec = new DBConnectionSpec();
connectionSpec.setUsername(getUsername());
connectionSpec.setPassword(getPassword());
connectionSpec.setDataSourceName(getDataSourceName());
}

/*****************************************************************
* Execute the database query
*/
public void execute() throws SQLException {
getDBSelect().execute();
}

/****************************************************************
*prepare the sql statement for execution
**/
protected void prepareStatement() throws SQLException {
// Set SQL statement.
getDBSelect().setCommand(SQL_STRING);

DBSelectMetaData resultMetaData = getDBSelect().getMetaData();

// Assign labels to columns.
resultMetaData.setColumnLabel(1, BookSearch_CATALOG_NUMBER_LABEL);
resultMetaData.setColumnLabel(2, BookSearch_AUTHOR_LABEL);
resultMetaData.setColumnLabel(3, BookSearch_BOOK_TITLE_LABEL);
resultMetaData.setColumnLabel(4, BookSearch_dbo_BOOK_ACTIVITY_TXN_DATE_LABEL);
resultMetaData.setColumnLabel(5, BookSearch_dbo_BOOK_ACTIVITY_TXN_TYPE_LABEL);
resultMetaData.setColumnLabel(6, BookSearch_COMPANY_NAME_LABEL);

//Add parameters descriptions to meta data.
DBParameterMetaData metaData = getDBSelect().getParameterMetaData();
metaData.setParameter(1, PARAM1_NAME,
DatabaseMetaData.procedureColumnIn,
java.sql.Types.VARCHAR,
java.lang.String.class);

// Set parameters.
getDBSelect().setParameter(PARAM1_NAME,
inLOCATION);
}

/*************************************************************
* Closes Result Set
*/
public void close() throws DBException, SQLException {
getDBSelect().close(DBStatement.LEVEL_RESULTSET); // close result set
getDBSelect().close(); //close statement or connection.
masterViewDBBean = null;
}

/**************************************************************
*Moves to the next row of the result set if it exsits
*@return true if there is another row of data
*/
public boolean next() throws DBException, SQLException {
return getDBSelect().next();
}

/**************************************************************
*Moves to the first row of the result set if it exsits
*@return true if there is a first row of data
*/
public boolean first() throws DBException, SQLException {
return getDBSelect().first();
}

/*************************************************************
* Formats code so that is HTML Firendly
* @param in The incoming String
* @return The formated String
*/
protected String massageOutput(Object in) {
Object out = in;
//Place code here to format your output
return (out != null) ? out.toString() : "";
}

//Setters
/**************************************************************
* Set LOCATION
* @param LOCATION
*/
public void setLOCATION(String LOCATION) {
inLOCATION = LOCATION;
}
/**************************************************************
* Set the database username
*/
public void setUsername(String username){
mvUsername = username;
}

/**************************************************************
* Set the database password
*/
public void setPassword(String password){
mvPassword = password;
}

/**************************************************************
* Set the database data source name
*/
public void setDataSourceName(String dataSourceName){
mvDataSourceName = dataSourceName;
}

//Getters
/**************************************************************
* Get the result set
* @return The DBSelect Object
*/
protected DBSelect getDBSelect() throws DBException, SQLException {
if (masterViewDBBean == null) {
// Create selection bean
masterViewDBBean = new DBSelect();
if (connectionSpec == null){
initConnectionSpec();
}
masterViewDBBean.setConnectionSpec(connectionSpec);

// The following option turns off the firing of events, and
// causes all values to be fetched from the db with getString.
masterViewDBBean.setOptimizeForJsp(true);
prepareStatement();
}
return masterViewDBBean;
}

/**************************************************************
* Get CATALOG_NUMBER
* @return return column CATALOG_NUMBER
*/
public String getCATALOG_NUMBER() throws DBException, SQLException {
Object ret = getDBSelect().getColumn(BookSearch_CATALOG_NUMBER_LABEL);
return massageOutput(ret);
}
/**************************************************************
* Get AUTHOR
* @return return column AUTHOR
*/
public String getAUTHOR() throws DBException, SQLException {
Object ret = getDBSelect().getColumn(BookSearch_AUTHOR_LABEL);
return massageOutput(ret);
}
/**************************************************************
* Get BOOK_TITLE
* @return return column BOOK_TITLE
*/
public String getBOOK_TITLE() throws DBException, SQLException {
Object ret = getDBSelect().getColumn(BookSearch_BOOK_TITLE_LABEL);
return massageOutput(ret);
}
/**************************************************************
* Get dbo_BOOK_ACTIVITY_TXN_DATE
* @return return column dbo.BOOK_ACTIVITY.TXN_DATE
*/
public String getdbo_BOOK_ACTIVITY_TXN_DATE() throws DBException, SQLException {
Object ret = getDBSelect().getColumn(BookSearch_dbo_BOOK_ACTIVITY_TXN_DATE_LABEL);
return massageOutput(ret);
}
/**************************************************************
* Get dbo_BOOK_ACTIVITY_TXN_TYPE
* @return return column dbo.BOOK_ACTIVITY.TXN_TYPE
*/
public String getdbo_BOOK_ACTIVITY_TXN_TYPE() throws DBException, SQLException {
Object ret = getDBSelect().getColumn(BookSearch_dbo_BOOK_ACTIVITY_TXN_TYPE_LABEL);
return massageOutput(ret);
}
/**************************************************************
* Get COMPANY_NAME
* @return return column COMPANY_NAME
*/
public String getCOMPANY_NAME() throws DBException, SQLException {
Object ret = getDBSelect().getColumn(BookSearch_COMPANY_NAME_LABEL);
return massageOutput(ret);
}
/**************************************************************
* Get the database username
* @return String database username
*/
public String getUsername(){
return mvUsername;
}

/**************************************************************
* Get the database password
* @return String database password
*/
public String getPassword(){
return mvPassword;
}

/**************************************************************
* Get the database data source name
* @return String database data source name
*/
public String getDataSourceName(){
return mvDataSourceName;
}
}

pls tell me what's the problem ? and how i can solve it

with regards
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please don't post the same problem in numerous topics.
 
sabr sabars
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i apologize for posting the same problem in numerous topics, but i want just to solve my problem ASAP

thanks and apologize for that
 
drifter
Posts: 1364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The result of so many posts is that now there are answers sprinkled across 7 posts (I found 3 threads in JDBC and 4 in websphere forum), some have been locked, some have angry comments from people like me that wasted time trying to help, and now less people want to help you than if you had limited yourself to one post.

It's almost impossible now to follow what your problem is and what you have tried.
 
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It sounds like you don't have the datasource attributes setup correctly in WAS.

Admin console -- JDBC Providers --(Your configured JDBC Provider) -- Data Sources -- Custom Properties. You would set your servername, password, etc, etc, etc, etc, etc.
 
reply
    Bookmark Topic Watch Topic
  • New Topic