Home » Developer & Programmer » JDeveloper, Java & XML » Urgent help reqd :Invalid Packet Lenght error
Urgent help reqd :Invalid Packet Lenght error [message #91943] Mon, 17 November 2003 21:55 Go to next message
Prasad
Messages: 104
Registered: October 2000
Senior Member
Hello ,
I am getting following error . pls help in sorting out this issue.
Thanks in advance,
Prasad

java.sql.SQLException: Io exception: Invalid Packet Length.

at oracle/jdbc/dbaccess/DBError.throwSqlException (DBError.java:180)
at oracle/jdbc/dbaccess/DBError.throwSqlException (DBError.java:199)
at oracle/jdbc/dbaccess/DBError.throwSqlException (DBError.java:338)
at oracle/jdbc/driver/OracleStatement.close (OracleStatement.java:682)
at oracle/jdbc/driver/OraclePreparedStatement.privateClose (OraclePreparedStatement.java:338

at oracle/jdbc/driver/OraclePreparedStatement.close (OraclePreparedStatement.java:268)
at ItemForm.generateMessage (ItemForm.java:1018)
at ItemForm.extractAndSubscribe (ItemForm.java:911)
at ItemForm.extractAndSubscribe (ItemForm.java:931)
at ItemForm.extractAndSubscribe (ItemForm.java:931)
at ItemForm.extractAndSubscribe (ItemForm.java:931)
at ItemForm.extractAndSubscribe (ItemForm.java:931)
at ItemForm.extractAndSubscribe (ItemForm.java:931)
at ItemForm.extractAndSubscribe (ItemForm.java:931)
at ItemForm.extractAndSubscribe (ItemForm.java:931)
at ItemForm.extractAndSubscribe (ItemForm.java:931)
at ItemForm.extractAndSubscribe (ItemForm.java:931)
at ItemForm.extractAndSubscribe (ItemForm.java:931)
at ItemForm.run (ItemForm.java:864)
at java/lang/Thread.run (Thread.java)
Re: Urgent help reqd :Invalid Packet Lenght error [message #92433 is a reply to message #91943] Fri, 16 July 2004 05:41 Go to previous message
JB
Messages: 9
Registered: July 2002
Junior Member
I am submitting this less as a response to Prasad's original question as obviously this is an old post and more in the hope that it may help the next person searching for an answer to this problem.

I started to get this exact same message and although I did not figure out the precise cause I can say in a more general sense that it is caused when more than one thread is trying to make simultaneous use of the thin Oracle JDBC driver via the same Connection object.

To correct this problem I had to ensure that only one thread of execution was making use of the JDBC driver at a time through the same Connection OR upgrade to a later version of the driver.

Investigation of driver versions showed that the particular version of the JDBC driver that exhibits this behaviour is (code used to get this information shown below where connection is a JDBC Connection object):

DatabaseMetaData meta = connection.getMetaData ();
System.out.println ("JDBC driver Major version: " + meta.getDriverMajorVersion ());
System.out.println ("JDBC driver Minor version: " + meta.getDriverMinorVersion ());
System.out.println ("JDBC driver Driver Name: " + meta.getDriverName());
System.out.println ("JDBC driver version is " + meta.getDriverVersion());

JDBC driver Major version: 9
JDBC driver Minor version: 2
JDBC driver Driver Name: Oracle JDBC driver
JDBC driver version is 9.2.0.2.0

and is deployed in a file named classes12.zip . The other version of the JDBC Driver I tried that did NOT throw the exception was:

JDBC driver Major version: 9
JDBC driver Minor version: 2
JDBC driver Driver Name: Oracle JDBC driver
JDBC driver version is 9.2.0.3.0

and is deployed in a file named ojdbc14.jar

Hope this post might save the next soul unlucky enough to get the "Invalid Packet lenght" error some time...

James
Previous Topic: java.lang.ClassCastException
Next Topic: Pass XML data into oracle
Goto Forum:
  


Current Time: Thu Apr 18 07:41:26 CDT 2024