• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Io exception: Invalid Packet Lenght

 
Monty Guppy
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am doing multitreading when running Weblogic on Unix. While connecting to Oracle (9i running on UNIX), I get the above exception (note the incorrect spelling). It happens intermittently, and is generally seen when a second thread is started before the first one is released. Basically I execute a Stored Proc, but when this exception occurs, it results in the truncating of the number of records returned by the first thread.
Here is some code snippet:
public final static Connection getOracleConnection()
{
java.sql.Connection oracleConnection = null;Context ctx = null;
Hashtable ht = new Hashtable();SQLEngine sqlEngine = new SQLEngine();
ht.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
try {
ctx = new InitialContext(ht);
DataSource ds = (DataSource) ctx.lookup ("java:comp/env/rptx\\oradb");
oracleConnection = ds.getConnection();
}catch
-----
I call the connection through my thread like this.....
java.sql.Connection connection = null;
connection = SQLEngine.getOracleConnection();
--------------
 
John Haselden
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've had an identical problem (same typo also) and it appears to be caused by using an incorrect driver: ie using an Oracle 8i driver against a 9i database.
 
Raghu Shree
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I also have exactly same problem. But I can't find a solution.
Please give me your solutions.

Regds
Raghu
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic