aspose file tools*
The moose likes Websphere and the fly likes WSAD 5.1 DB2 Connection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "WSAD 5.1 DB2 Connection" Watch "WSAD 5.1 DB2 Connection" New topic
Author

WSAD 5.1 DB2 Connection

Guy Allard
Ranch Hand

Joined: Nov 24, 2000
Posts: 776
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

Joined: Aug 10, 2001
Posts: 3892
    
    5
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


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
Guy Allard
Ranch Hand

Joined: Nov 24, 2000
Posts: 776
Kyle - Thanks, I will try that on Monday, let you know.

Regards, Guy
Guy Allard
Ranch Hand

Joined: Nov 24, 2000
Posts: 776
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

Joined: Aug 10, 2001
Posts: 3892
    
    5
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

Joined: Nov 24, 2000
Posts: 776
:-) 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: WSAD 5.1 DB2 Connection