• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

WSAD 5.1 DB2 Connection

 
Guy Allard
Ranch Hand
Posts: 776
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi - Just installed 5.1.

I think I have my server data source connection set up OK. Trying to get to a DB2 instance I can reach via DB2Connect.

No where was I asked for a userid/password in WSAD.

And sure enough, when the Web App I am testing starts, it fails with "invalid username/password".

Can't find anything in "help".

Any ideas about what else I need to configure?

Thanks, Guy
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yup -- you need to add a JAAS alias. That's where you enter the userid and password. You create the alias in the part of the Data Sources configuration page labeled "J2C Authentication Data Entries". You set it in the container-managed or component-managed authentication alias fields in the Data Source properties page.

Read the section titled: "Creating and configuring a data source using the administrative console" in the InfoCenter.

Kyle
 
Guy Allard
Ranch Hand
Posts: 776
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kyle - Thanks, I will try that on Monday, let you know.

Regards, Guy
 
Guy Allard
Ranch Hand
Posts: 776
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kyle - Well, I have not been able to get any further.

I cannot find a section in the Info Center that looks at all like what you named.

I started the admin console, logged in, went to:

-Resources->JDBC Providers->Default DB2 JDBC PRovider->
DataSources->EIADataSource

-JNDI Name is jdbc/checklworks

-Went to J2C Authentication Data Entries

And created one with my DB user ID and passwerd.

I still fail with:

[6/14/04 14:34:10:087 EDT] 3c19f22c FreePool E J2CA0046E: Method createManagedConnctionWithMCWrapper caught an exception during creation of the ManagedConnection for resource jdbc/checkworks, throwing ResourceAllocationException. Original exception: com.ibm.ws.exception.WsException: DSRA0080E: An exception was received by the Data Store Adapter. See original exception message: [IBM][CLI Driver] SQL1403N The username and/or password supplied is incorrect. SQLSTATE=08004
.
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.exceptions.DataStoreAdapterException.<init>(DataStoreAdapterException.java:124)
at com.ibm.ws.rsadapter.spi.WSRdbDataSource.translateSQLException(WSRdbDataSource.java:737)
at com.ibm.ws.rsadapter.spi.WSRdbDataSource.getConnection(WSRdbDataSource.java:543)
at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnection(WSManagedConnectionFactoryImpl.java:578)
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:191)
at com.checkworks.vip.util.DatabaseBean.getPooledConnection(DatabaseBean.java:135)

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

When I created the J2C alias, I created it as:

E2Conn

When I display it is shows as:

localhost/E2Conn

What is that about?

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

I do not understand where "container or component managed authenticaton fields" are in the Datasource properties page. I do not see anything like that.

Any further assisstance would be appreciated.

Thanks, Guy
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, you set the component-managed and container-managed authentication aliases by expanding Resources>JDBCProviders>(Select Your JDBC Provider)>(Select Your Data Source).

On the Data Source configuration page there are two drop-downs, one for "Component-Managed Authentication Alias" and another one for "Container-Managed Authentication Alias". Those drop-downs should contain (in the list) the alias you just defined. Select it in both and apply.

Kyle
 
Guy Allard
Ranch Hand
Posts: 776
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
:-) Thank You very much, I am up and running.

Do I gather there is no place to make those changes without using the admin console, i.e. using the server configuration editor?

Thanks again, Guy
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic