• Post Reply Bookmark Topic Watch Topic
  • New Topic

Strange problem cause the connection failed in close  RSS feed

Zee Ho
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, everybody, Can any one help me on this. Now I am developed a program to scan all the record in the database, but when reading one record(which is CLob type) cause me failed in close the connection.

It throws out.

java.sql.SQLException: Protocol violation
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:1160)
at oracle.jdbc.ttc7.Ocommoncall.receive(Ocommoncall.java:149)
at oracle.jdbc.ttc7.TTC7Protocol.rollback(TTC7Protocol.java:488)
at oracle.jdbc.driver.OracleConnection.rollback
at com.core.esg.database.NonAutoCommitConnection.close
at com.core.esg.database.DBUtility.close(DBUtility.java:441)
at com.core.esg.sanity.grabber.ColumnsGrabber.destroy
at com.core.esg.sanity.SanityModel.destroy(SanityModel.java:422)
at com.core.esg.sanity.SanityModel.processCustomChecker
at com.core.esg.sanity.SanityModel.sanityCheck(SanityModel.java:70)
at com.core.idex.sanity.SanityRunner.main(SanityRunner.java:31)
2004-10-27 20:18:41,320 [main] [com.core.idex.sanity.SanityRunner] INFO - ----

I know when invoking the clob.length() may cause such problem, but It has already been fixed in is my current version)

I think It might cause by the encoding problem, there are some very strange characters in the record, when you select the record by sqlplus and you can see thousands of character(if you set the environment long enough your sqlplus will crash), but when I read the length using the clob.length(), it return me 150. check the record use TOAD you can
only see several characters there. copy it you will get another corrupt record. and reading such record will cause your connection fail in close(why? strange, the exception throws out when I invoke the connection.close())

pls give me some idea on how to handle with it.
Bear Bibeault
Author and ninkuma
Posts: 66263
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

We're pleased to have you here with us here on the Ranch, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Forum Bartender
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!