File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Strange problem cause the connection failed in close Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Strange problem cause the connection failed in close" Watch "Strange problem cause the connection failed in close" New topic

Strange problem cause the connection failed in close

Zee Ho
Ranch Hand

Joined: Jul 20, 2004
Posts: 128
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(
at oracle.jdbc.dbaccess.DBError.throwSqlException(
at oracle.jdbc.dbaccess.DBError.check_error(
at oracle.jdbc.ttc7.Ocommoncall.receive(
at oracle.jdbc.ttc7.TTC7Protocol.rollback(
at oracle.jdbc.driver.OracleConnection.rollback
at com.core.esg.database.NonAutoCommitConnection.close
at com.core.esg.database.DBUtility.close(
at com.core.esg.sanity.grabber.ColumnsGrabber.destroy
at com.core.esg.sanity.SanityModel.destroy(
at com.core.esg.sanity.SanityModel.processCustomChecker
at com.core.esg.sanity.SanityModel.sanityCheck(
at com.core.idex.sanity.SanityRunner.main(
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.

SCJP 1.4<br />SCWCD 1.3<br />SCJD<br />SCBCD<br />IBM Xml Cert in progress
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63852


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

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Strange problem cause the connection failed in close
It's not a secret anymore!