Friday, March 07, 2014

SOA - DB connection issue in SOA env.

Today, I installed SOA Suite and OSB on a machine. Then I created a domain with OSB, SOA Suite and BAM support. When I started the weblogic service, I always got the follow error and the server could not be started.

The error is 
Insufficient data while reading from the network - expected a minimum of 6 bytes and received only 0 bytes.  The connection has been terminated.
    at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source)
    at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
    at org.apache.derby.jdbc.ClientDriver.connect(Unknown Source)
    at java.sql.DriverManager.getConnection(DriverManager.java:322)
    at java.sql.DriverManager.getConnection(DriverManager.java:273)
    at jdbc.JDBCSample.main(JDBCSample.java:19).

Searched on the internet, but didn't get any useful info. But it looks like a connectionissue. Then I opened the config file wlsbjmsrpDataSource-jdbc.xml and found the follow funny configuration.

jdbc:derby://localhost:1521/XE;create=true;ServerName=localhost;databaseName=XE
org.apache.derby.jdbc.ClientDriver

The driver is used derby, but the database was pointed to Oracle XE. Really have no idea why got such a config. Whatever, I modified it to the follow and the server started properly.

jdbc:oracle:thin:@localhost:1521/XE
oracle.jdbc.xa.client.OracleXADataSource


No comments: