Hi,
I'm having difficulty with this error. The stack trace is below:
com.mycompany.exception.Do
mainExcept
ion: java.sql.SQLException: Io exception: Protocol violation
at com.mycompany.database.DAO
.implement
ation.User
DbDAO.getU
sersByCrit
eria(UserD
bDAO.java:
400)
at com.mycompany.web.struts.a
ction.User
SearchActi
on.execute
(UserSearc
hAction.ja
va:56)
at org.apache.struts.action.R
equestProc
essor.proc
essActionP
erform(Req
uestProces
sor.java:4
19)
at org.apache.struts.action.R
equestProc
essor.proc
ess(Reques
tProcessor
.java:224)
at org.apache.struts.action.A
ctionServl
et.process
(ActionSer
vlet.java:
1194)
at org.apache.struts.action.A
ctionServl
et.doGet(A
ctionServl
et.java:41
4)
at javax.servlet.http.HttpSer
vlet.servi
ce(HttpSer
vlet.java:
740)
at javax.servlet.http.HttpSer
vlet.servi
ce(HttpSer
vlet.java:
853)
at jrun.servlet.ServletInvoke
r.invoke(S
ervletInvo
ker.java:9
1)
at jrun.servlet.JRunInvokerCh
ain.invoke
Next(JRunI
nvokerChai
n.java:42)
at jrun.servlet.JRunRequestDi
spatcher.i
nvoke(JRun
RequestDis
patcher.ja
va:252)
at jrun.servlet.ServletEngine
Service.di
spatch(Ser
vletEngine
Service.ja
va:527)
at jrun.servlet.http.WebServi
ce.invokeR
unnable(We
bService.j
ava:168)
at jrunx.scheduler.ThreadPool
$ThreadThr
ottle.invo
keRunnable
(ThreadPoo
l.java:451
)
at jrunx.scheduler.WorkerThre
ad.run(Wor
kerThread.
java:66)
Caused by: java.sql.SQLException: Io exception: Protocol violation
at oracle.jdbc.dbaccess.DBErr
or.throwSq
lException
(DBError.j
ava:170)
at oracle.jdbc.dbaccess.DBErr
or.throwSq
lException
(DBError.j
ava:212)
at oracle.jdbc.dbaccess.DBErr
or.throwSq
lException
(DBError.j
ava:325)
at oracle.jdbc.driver.OracleS
tatement.p
repare_for
_new_resul
t(OracleSt
atement.ja
va:2606)
at oracle.jdbc.driver.OracleP
reparedSta
tement.exe
cuteUpdate
(OraclePre
paredState
ment.java:
402)
at oracle.jdbc.driver.OracleP
reparedSta
tement.exe
cuteQuery(
OraclePrep
aredStatem
ent.java:3
44)
at jrun.sql.JRunPreparedState
ment.execu
teQuery(JR
unPrepared
Statement.
java:69)
at com.mycompany.database.DAO
.implement
ation.User
DbDAO.getU
sersByCrit
eria(UserD
bDAO.java:
294)
... 14 more
javax.servlet.ServletExcep
tion: java.sql.SQLException: Io exception: Protocol violation
at org.apache.struts.action.R
equestProc
essor.proc
essExcepti
on(Request
Processor.
java:523)
at org.apache.struts.action.R
equestProc
essor.proc
essActionP
erform(Req
uestProces
sor.java:4
21)
at org.apache.struts.action.R
equestProc
essor.proc
ess(Reques
tProcessor
.java:224)
at org.apache.struts.action.A
ctionServl
et.process
(ActionSer
vlet.java:
1194)
at org.apache.struts.action.A
ctionServl
et.doGet(A
ctionServl
et.java:41
4)
at javax.servlet.http.HttpSer
vlet.servi
ce(HttpSer
vlet.java:
740)
at javax.servlet.http.HttpSer
vlet.servi
ce(HttpSer
vlet.java:
853)
at jrun.servlet.ServletInvoke
r.invoke(S
ervletInvo
ker.java:9
1)
at jrun.servlet.JRunInvokerCh
ain.invoke
Next(JRunI
nvokerChai
n.java:42)
at jrun.servlet.JRunRequestDi
spatcher.i
nvoke(JRun
RequestDis
patcher.ja
va:252)
at jrun.servlet.ServletEngine
Service.di
spatch(Ser
vletEngine
Service.ja
va:527)
at jrun.servlet.http.WebServi
ce.invokeR
unnable(We
bService.j
ava:168)
at jrunx.scheduler.ThreadPool
$ThreadThr
ottle.invo
keRunnable
(ThreadPoo
l.java:451
)
at jrunx.scheduler.WorkerThre
ad.run(Wor
kerThread.
java:66)
The error indicates a problem within the com.mycompany.database.DAO
.implement
ation.User
DbDAO.getU
sersByCrit
eria() method. The line referenced is:
rs = ps.executeQuery();
The ps variable is a PreparedStatement that is set earlier. I have test cases that execute outside of my AS (JRun4), and they consistently return correctly. The problem appears only when I run the search through the web application - using the same exact parameters as my test case. Both are consistent - test case consistently works, JRun consistently fails.
The database table that is being searched resides on an Oracle 10g database, and contains a column defined as a LONG data type. I initially thought that this might be the cause of the problem, but found that I don't have issues with other methods that return the same exact columns using different criteria.
I've checked various resources online, and have not found a solution. Any ideas?