aspose file tools*
The moose likes JDBC and the fly likes java.sql.SQLException: Protocol violation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "java.sql.SQLException: Protocol violation" Watch "java.sql.SQLException: Protocol violation" New topic
Author

java.sql.SQLException: Protocol violation

lalitha prasad
Greenhorn

Joined: Aug 28, 2004
Posts: 16
Hi,

I am getting the protocol violation error while inserting (XML content) into BLOB. I am getting the following exception.

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.Oall7.receive(Oall7.java:585)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:109
3)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.ja
va:2047)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.jav
a:1940)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStateme
nt.java:2709)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePrepar
edStatement.java:589)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(Del
egatingPreparedStatement.java:233)
at com.as.components.forms.masterform.BasePopulator.setDataToXml(Unknown
Source)
at com.as.components.forms.masterform.BasePopulator.setTitle(Unknown Sou
rce)
at com.as.web.actions.forms.masterform.CommonFormAction.setRationaleActi
on(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.as.web.actions.forms.masterform.CommonFormAction.perform(Unknown
Source)
at com.as.web.framework.ControlServlet.doProcess(ControlServlet.java:220
)
at com.as.web.framework.ControlServlet.doGet(ControlServlet.java:134)
at com.as.web.framework.ControlServlet.doPost(ControlServlet.java:104)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:191)




I am using tomcat-4.1.29,j2sdk-1.4.2 and Db server is Oracle 9i. I checked with different jar files classes12.jar and ojdbc14.jar

anybody knows solution please help me.

Thanks in Advance,
LALITH
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30353
    
150

Try storing a blob with just the string "test". That will determine whether the problem is with storing blobs in general or with your blob in particular. Also, can you post some code?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
lalitha prasad
Greenhorn

Joined: Aug 28, 2004
Posts: 16
Hi Sorry the problem is not with the BLOB. It is related to DB query problem.

The Problem is while getting the data we should be checking for all Unique keys.

We are using
SELECT FRM_XML from PTL_DTLS WHERE PTL_NUMBER = ?

instead of
SELECT FRM_XML from PTL_DTLS WHERE PTL_NUMBER = ? AND PTL_DTLS_ID =?.

We have two records in PTL_DTLS table
here FRM_XML is long field.


Anyway thanks for responding to my problem.



Thanks,
LALITH
 
jQuery in Action, 2nd edition
 
subject: java.sql.SQLException: Protocol violation