could not connect with database on remote machine.

Posted on 2006-07-11
Medium Priority
Last Modified: 2013-12-10

I have websphere studio 5 with test envoirment 4.
I want to access database on remote machine but getting the following error:

javax.naming.NameNotFoundException: jdbc/dbtest

In my web.xml file I had defined:

  <description>for testing</description>
  <description>login id</description>
  <description>password to login</description>
  <description>db machine name</description>

I tried to search on web, it looks that I need to data source created on my machine.

Please somebody answer the following things.
0) Do I need the data source?
1) I have no admin console, so do I need to admin console to create data source.
2) Do I need to install admin console separately or websphre studio 5 installation itself contain the admin console.
3) How to run admin console.

If data source is no needed then what is solution to get rid of above error and connect with the database.

Question by:alakhan
  • 3
  • 2

Expert Comment

ID: 17089452

yes you need data source.

you can configure data source by putting some env information in web.xml

add the fowlling code to your web.xml and try


some times there is some problem with custom installation . please do the follow steps to install admin console

Run the following commands from %WAS_HOME%/bin folder


wsadmin.bat "$AdminApp uninstall adminconsole" -port 2011

wsadmin.bat "$AdminApp install  c:/websphere5.0/AppServer/bin/installedApps/nvad2836/adminconsole.ear {-cell nvad2836 -node nvad2836_mydomain -server server1" -port 2011

Port 2011 is the soap connector port which can be verified in your configuration in portdef.properties.

other properties cell, node, server can be checked in sertversataenv.bat

if port  2011 is in use with other profile or cell, change the port number and try again .

If you have any doubts using wsadmin.bat see the help  like follow %WAS_HOME%\bin> wsadmin --help

Hope this will solve your problem :)


Author Comment

ID: 17090825
One more thing:
I just fig. out that I dont have jdbc driver installed on my machine. I am running windows/websphre 5 studio and using ver. 4 test envoirment to run the web application. The database on remote server is db2 running on iSeries.
I think I need jdbc driver of db2 of type 4. Can you give me link to download that driver and is it need to be specific for db2 on iseries?

Author Comment

ID: 17092452
One more thing, I dont have admin console on my machine. I had mentioned the param list and values. can you explain according to the above values what will be the code?

Author Comment

ID: 17094554
I just found that previously they were using IBM tool box. I included the dt400.jar file into project path and create a connection but when i try to execute query it says that file does not found.

Can you tell me just how to make connection with IBM Tool box libaray and execute a simple query????

Accepted Solution

anumalas earned 1000 total points
ID: 17096824

For your first question  you need to install db2udb client to get the type 4 driver please refer following link


For your second question you need to add above mentioned entries in web.xml with your db2 type 4 dirver and url of that driver

excluding your 2 questions, for your third question  please refer the following 2 links and see sample programs




Hope this will help :)

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Upgrading Tomcat – There are a couple of methods to upgrade Tomcat is to use The Apache Installer is to download and unzip and run the services.bat remove|install Tomcat6 Because of the App that we are working with, we can only use Tomcat 6.…
There are numerous questions about how to setup an IBM HTTP Server to be administered from WebSphere Application Server administrative console. I do hope this article will wrap things up and become a reference for this task. You need three things…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Watch the video of Kernel Migrator for SharePoint, which demonstrate the process easily of migration from SharePoint to SharePoint, OneDrive for Business & Google Drive servers, Public Folder to SharePoint, File Server to SharePoint. The tool has va…

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question