PI JDBC not working properly on WebLogic 11g

Discussion created by leandro.lourenzoni on Jul 20, 2012
Latest reply on Jul 30, 2012 by michaelh

Hi all,

We're having some trouble trying to use PI JDBC in our Java applications on Linux environment lately. In order to solve this problem, some time ago, we´ve opened a case within tech support. Talking to OSI's specialist we had been told to post the problem here so that others vcampus' members could eventually come up with a solution or maybe someone experiencing the same problem could benefit from this thread. So here comes the description of the problem (I apologize in advance for the lengthy text, but I believe the more we detail the problem the more we get closer to the solution):


Since last year we've been trying to integrate our Java applications with PI Server through PI JDBC. Before trying to deploy to WebLogic Server we had developed the applications using Tomcat as the application server and had no problem in making direct connections to the DAS Server. The only problem arose when the server was kept running for more than 24 hours. We often ended up with a "The Channel is not registered on server" exception. For development purpose it was ok though.

When the time came to install the applications on the company's IT infrastructure, we've managed to configure a connection pool on the server to be reached through JNDI. In this process some libraries have had to be updated in the host OS (RedHat 5). We've contacted the technical support and a case was opened. After resolving the problems found so far, the solution was ready to production.

Some hours later, we've come across the same exception we mentioned before and the system became unstable. Talking to the support team, we've been told that even though connection pooling were supported by PI JDBC  through a 'dummy' implementation we were better of managing all connections directly in the applications' code. So we changed our code in order to follow the recommendations and created a small software component to handle the connections. The final solution worked well when installed on Tomcat, along with the applications using it.

The next step was to deploy the applications to the final environment, namely WebLogic Server 10.3.5, configured in a cluster topology with two nodes. When we deployed the first application, everything worked just well. But as soon as we deployed the second one, all PI connections stopped working. We've made one more test: we turned off one of the applications and the connection promptly started working again for the other one.

In the meanwhile, the infrastructure team configured a connection pool with a mechanism of 'keep alive' that prevented the PI Server of inadvertently closing the connections. Therefore we turned back to the first solution and both applications went to production.

As we don't consider this to be the definitive solution, we'd like to know if everyone has faced some similar problem or has any hint of how to make two applications deployed on WebLogic Server connect to the PI Server through PI JDBC. Any help will be extremely appreciated.


One last information: we had to put the PIJDBCDriver.jar on the application server classpath, because when it was inside the war file of both applications and we tried to deploy the second one we've ran into an exception with a message like this: the driver was already loaded by another classloader.
Thanks in advance.