0
votes

My application is successfully deployed on test environment on IBM Websphere 6.1. I need to deploy the same application on my local machine. I am able to install my web application on IBM Websphere using admin console. But I am not able to configure datasource. Datasource is provided in the property file which is used successfully in test environment. Now, where do I configure datasource in IBM websphere, which will be used by my application. Datasource is not configured in web.xml or ibm-web-bnd.xmi. After deployment, I am getting following error in log files.

Connection Pooling Set up failed javax.naming.NameNotFoundException: Context: 01HW357911Node01Cell/nodes/01HW357911Node01/servers/server1, name: jdbc/SupplierNetDataSource: First component in name SupplierNetDataSource not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0

I also created datasource in IBM Websphere admin console in resources successfully. But same is not used by my application. I also created {Name Space Binding] in Environment->Naming path in admin console. But still same error is coming.

I also tried using tnsnames.ora file for datasource name, but was not successful.

Is there any way, to check the JNDI configured on test/dev unix server which can be replicated on local?

2
In your console, go to Resources, JDBC Providers and setup one. Inside the new provider, setup a JDBC DataSource, pointing to your database. Test the connection from the console, make that work first. Then make sure the JNDI name defined here matches what you declared in your EAR. The names must match. So it should be jndi/SupplierNetDataSource, not jdbc/SupplierNetDataSource I think (I can't see your EAR files).Nic3500
I have setup a jdbc datasource pointing to my mb and tested successfully. Also, I changed dataSource name in property file as com.acg.dataSourceName = jndi/SupplierNetDataSource However, still same error is coming.mahesh kumar

2 Answers

1
votes

WebSphere 6.1 reached end of service more than 5 years, do yourself a huge favor, move up to version 8.55 or 9, both of which are currently supported. When you said "datasource is provided in the property file...", I'm assuming you're referring to the procedure described in this IBM KnowledgeCenter topic. If so, you'll need to start the wsadmin command line tool and execute the steps indicated to create the datasource. Note, after running AdminTask.applyConfigProperties, you'll need to save the config using AdminConfig.save() and restart the server. As you mentioned, you can also create the datasource from the admin console, using the values in the datasource properties file as values, but you'll also need to create a JDBC provider to go with the datasource. If you're still having problems after applying the properties file, posting the contents of it here (less any userids/passwords) here would be the next step.

0
votes

which scope did you created jdbc/SupplierNetDataSource data source ?