Testing JDBC Connections and Troubleshooting for BY/JDA WMS
Whenever you’re setting up a new Application Server for BY/JDA WMS — be it for:
- A clean installation or
- To repoint the App to a different database instance or
- To create a lower environment
You need to test if your configuration works or not. Most of the time, System Administrators or Developers fail to follow some basic investigative techniques.
Today I will show you some simple tips and tricks and how I generally go about it:
- Is the Application Server able to communicate to the database server at all?
If the answer to the above is no, we need to address the firewall (VM and Network level). In this blog, I am assuming that the network-level firewall has correct exceptions setup between App Server and Database Server. Now some of us try to ping the server — which is in fact not the right way to address the issue (even to see if a VM came back online after a reboot). By default, ping is blocked on Windows-based servers. What you can do is simply check if the RDP port (3389) is open. To check this, simply type telnet server 3389 from the command line.
If the port is open, it will say Connecting to db-001…
You will now see that the title for cmd has changed to Telnet db-001. This means that it is indeed able to connect via the RDP port. Consequently, your next step should be to validate if you’re able to connect to the database port. By default, it is 1521 for Oracle and 1433 for SQL Server.
You can also validate it by running the following command on the target server (the server that is receiving the connection — in this case, the database server).
netstat -abo | findstr 3389
Now let’s say if you never tried connecting via the 3389 port. You should open see that the database server is listening on this port (but no connection attempts have been made so far), you should see something like this…
Now that we have established that at least some of the ports from the Application Server to the Database Server are accessible — so it is not a global issue on a VM level. So, how do we validate if our Application will be able to connect to the database server? I mean it is pointless to spend time setting up the application server only to realize that the connectivity between the application server and the database server is blocked, this step should be performed before setting up the Application Server (when possible) so the relevant team can open up the connection between the two servers.
For SQL Server, all you need to validate is if you can connect to the database instance. Use the following command to create an empty file on your desktop.
type NUL > testdb.udl
Open this file and enter the server name, you can even use Integrated Security if you have your user-created on SQL Server, otherwise use a local SQL Server username/password.
If you have named pipes disabled and let’s assume that the default port for your SQL Server Instance is not set to 1433. Then you need to enter the connection string as
However, if your database server is using dynamic TCP ports, then you don’t need to provide the port number.
Database Connectivity after BY WMS App Server has been configured:
If your BY/JDA WMS Application Server is set up, then you have different options to test and validate JDBC connectivity.
You can run the msql utility in server mode. If it fails, you will generally see the error of why it failed.
in newer versions of BY WMS, you will see a trace output as shown below:
Incorrect Server Name:
Incorrect database name:
That’s it. Hope this helps!