Thanks for the response. Looks like I was getting the above errors because I forgot to save the server configuation when I added the data source. After saving the server I'm getting different error now. I'm running the application on WSAD 5 test application server.
[11/18/04 17:05:20:016 EST] 397eb5a7 ConnectionFac I J2CA0122I: Resource reference jdbc/ds1 could not be located, so default values of the following are used: [Resource-ref settings]
Dilip, You need to specify the password somewhere. It is prefered to use J2C (java connector) to do this. See the J2C tab on the server. If you want to harcode the password in the datasource itself, this message is expected.
Joined: Oct 16, 2000
When I go to "Modify Data Source" screen I don't see any fields for database/host name, User ID and Password. I'm wondering how the data source works without these fields. Looks like I'm missing something here.
I think this problem is occurring, becoz u r using a "Version 5.0 Datasource" For this version u require to setup a JAAS security Profile. U can set up this profile from the "Security" tab of the server configuration. (Dbl-click the server to open the server configuration). In this tab, go to the table "JAAS Authentication Entries", click on "Add" button, and enter a userid and password. After u have set up the JAAS profile, u need to go to the "Datasource" tab, select ur datasource, click "Edit" and go to the 2 drop down boxes at the bottom. (These are "Component-managed authentication alias" & "Container-managed authentication alias"). Enter the JAAS userid which u have just created in these 2 boxes. Now save ur settings and restart the server and try again. Let me know if that helps.
Joined: Oct 16, 2000
Thanks for the suggestions. I made the changes you suggested.
In the "Security" tab and under "JAAS Aunthentication Entries:" I now have Alias:serve1 User ID:server1
In the "Data sources" tab and under "Data source defined in the JDBC provider selected above:" I could see Name : DS1 JNDI Name:jdbc/ds1 Type:V5 I have selected serve1 for component-managed and container-managed authentication alias.
In the "J2C" tab and under "J2C Connection Factories:" I could see Name : DS1_CF JNDI Name:eis/jdbc/ds1_CMP
But still I'm getting following message
[11/24/04 10:07:04:516 EST] 645ab97b ConnectionFac I J2CA0122I: Resource reference jdbc/ds1 could not be located, so default values of the following are used: [Resource-ref settings]
That by the way is not an error....Its just a message which tells you that you are using the jndi name instead of a resource reference (which WebSphere suggests is the way to go )
Have you created a resource reference in the web.xml ??
If not create a resource reference and use "java:comp/env/ResRefName" in your lookup
In your web.xml go to the References tab, thn go to Resource tab(on the top) Your ResRefName will be "serve1" since thats the alias tht u have already created. make sure your res ref is called serve1 (case sensitive --as a precaution --since jndi is case sensitive). also enter the jndi name of your datasource which will be jdbc/ds1. Select javax.sql.DataSource as the type. Let the authentication and Sharing remain Container and Shareable respectively.
Also since its a V5 DataSource, you will need to create the Alias in JAAS. This alias should be the same as the resource reference that you create. Select the resource reference in the Container and component managed authentication in the DataSource properties(which you have already done) and you will not see that message. [ November 24, 2004: Message edited by: Murtuza Akhtari ]
When creating a connection factory or data source, a JNDI name is given by which the connection factory or data source can be looked up by a component. Generally an "indirect" name with the java:comp/env prefix should be used. This makes any resource-reference data associated with the application available to the connection management runtime, to better manage resources based on the res-auth, res-isolation-level, res-sharing-scope, and res-resolution-control settings.