dbping command-line utility tests the connection between a DBMS and the client machine via a JDBC driver. More info here. However, when I tried to run the same on my machine, it threw up errors.
Syntax: java utils.dbping
: java -classpath weblogic.jar utils.dbping ORACLE_THIN system welcome1 localhost:1521/xe
After a few failed attempts, Ravi suggested that the Java version needs to be at least 1.6 or more. When I ran "java -version", it turned up to be 1.4.2. I knew that I had JDK 1.6 installed inside my Middleware home directory. I just had to change where the OS looked to to find the Java program. I tried setting the PATH and JAVA_HOME parameters but to no avail. Finally, I ran the command. "which java" which turned up "/usr/bin/java". That file turned out to be a symbolic link. All I had to was delete the symbolic link and recreate it to point to the JDK Java, which I did by running, "ln -s /oracle/fmwhome/jdk160_18/bin/java /usr/bin/java". To verify, I checked the version again by running "java -version" and it displayed "1.6". You might have to switch to root user to delete/recreate the symbolic link.
Now, after I ran the dbping command, it turned up a successful result.
[oracle@soabpm-vm lib]$ java -classpath weblogic.jar utils.dbping ORACLE_THIN system welcome1 localhost:1521/xe
**** Success!!! ****