[Solved] My Java application fails to connect to my Oracle database

Yesterday we debugged with Pepe some random connection reset exceptions in our application when trying to connect to the Oracle database. He wrote this nice post about it.

Goldfish tips

Problem

Yesterday we faced a very weird issue: we have a Java application connecting to an Oracle DB via ojdbc6.

In these days it stopped working, magically: no relevant changes in the system configuration or source code.

The application couldn’t connect to the database: on client side, debugging the stack traces shown it was stuck in the logon process; on server side, Oracle was killing the connection for a timeout waiting for the client:

(alert.log)

What’s weird is that we could successfully connect to the same DB using the same credentials of our application via SqlPlus, SQL Developer. And even the same application worked fine from another machine using the same JDK.

To make sure it wasn’t our application, we tested with the following small java class (please forgive the style):

This class shown the same problems of our application but it turned out to be very convenient because…

View original post 130 more words

Advertisements
This entry was posted in java, linux. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s