For a database connection I was getting this one. I just added the following in the class path:
export CLASSPATH=<path>/db2jcc4.jar:**./**
Here I appended ./ in last so that my class also get identified while loading.
Now just run:
java ConnectionExample <args>
It worked perfectly fine.