• 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

Datasource Test Connection is successful but the application is not able to connect to the Database

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using Websphere 6.1.0.19 and SQL Server 2005.

Following are the details of the JDBC Provider I am using:-

# Database Type - Sql Server 2005
# Provider Type - WebSphere Embedded connectJDBC Driver for MS SQL Server
# Implementation Type - XA Datasource

Then I created a DataSource using this Provider pointing to proper DB . Also the JAAS-J2C Authentication data is properly configured. The "Test-Connection" utility is also working fine showing that the datasource is able to connect to DB.

The custom properties for this datasource are:-
# enabaleToPhase= true
# authenticationMethod=None

But when I start the websphere and thus the application, it shows me following exceptions:----


java.sql.SQLException: [IBM][SQLServer JDBC Driver]A username is required if the connection option 'authenticationMethod' is specified with a value of 'UserIdPassword'.DSRA0010E: SQL State = HY000, Error Code = 0
at com.ibm.websphere.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.ibm.websphere.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.ibm.websphere.jdbc.sqlserver.tds.TDSConnection.createSecurityContext(Unknown Source)
at com.ibm.websphere.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown Source)
at com.ibm.websphere.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Source)
at com.ibm.websphere.jdbc.base.BaseConnection.connect(Unknown Source)
at com.ibm.websphere.jdbc.base.BaseConnection.setupImplConnection(Unknown Source)
at com.ibm.websphere.jdbc.base.BaseConnection.open(Unknown Source)
at com.ibm.websphere.jdbcx.base.BaseXADataSource.getBaseConnectionPreparedForXA(Unknown Source)
at com.ibm.websphere.jdbcx.base.BaseXADataSource.getXAConnection(Unknown Source)
at com.ibm.ws.rsadapter.spi.InternalGenericDataStoreHelper$1.run(InternalGenericDataStoreHelper.java:918)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.rsadapter.spi.InternalGenericDataStoreHelper.getPooledConnection(InternalGenericDataStoreHelper.java:955)
at com.ibm.ws.rsadapter.spi.WSRdbDataSource.getPooledConnection(WSRdbDataSource.java:1437)
at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnection(WSManagedConnectionFactoryImpl.java:1089)
at com.ibm.ejs.j2c.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:1837)
at com.ibm.ejs.j2c.FreePool.createOrWaitForConnection(FreePool.java:1568)
at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:2338)
at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:909)
at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:599)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:439)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:674)
at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:56)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:298)
... 44 more


The database is running on seperate machine (Microsoft 2003 Server) and is configured for supporting XA Connections and also the entries for sqljdbc.dll and sqljdbc_xa.dll are made in the registry. The database is configured for SQL Server Authentication. Kindly provide a solution to this.
 
security forum advocate
Posts: 236
1
Android Flex Google App Engine
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How are you utilizing the datasource within your app?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic