• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.sql.SQLException: Protocol violation

 
lalitha prasad
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Marshal
Posts: 34071
331
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
lalitha prasad
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic