|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Reason code 2005 using Tomcat |
« View previous topic :: View next topic » |
Author |
Message
|
lunobili |
Posted: Thu May 06, 2004 10:18 am Post subject: Reason code 2005 using Tomcat |
|
|
Novice
Joined: 06 Nov 2001 Posts: 17
|
Hi everybody,
I have made a web application to menege messages. If I run it under Websphere 5.0 if works fine, if I run it under Tomcat I have a "get" that fails, while many others in the program work just fine. I tried running Tomcat on the same JVM on which Websphere runs, but it did not change anything. Has anybody ever seen such a behaviour?
Thanks, Luca |
|
Back to top |
|
 |
bower5932 |
Posted: Thu May 06, 2004 10:54 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
Is the 2005 that you are getting a linked exception 2005 or is an MQJMS2005? If it is MQJMS2005, catch the linked exception to see what the underlying error.
If it is an MQ 2005, then that indicates you have a buffer length error and I'd like to see the stack trace of it. |
|
Back to top |
|
 |
lunobili |
Posted: Thu May 06, 2004 11:19 am Post subject: |
|
|
Novice
Joined: 06 Nov 2001 Posts: 17
|
Here is the stack trace:
Code: |
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2005
at com.ibm.mq.MQQueue.get(MQQueue.java:305)
at mqbrowse.util.Queue.delMsgs(Queue.java:302)
at mqbrowse.actions.GetMsgListAction.execute(GetMsgListAction.java:75)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
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(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:513)
|
I have already read the meaning of the reason code 2005, but I do not see how the buffer can be negative in this code:
Code: |
gmo.options = MQC.MQGMO_BROWSE_NEXT + MQC.MQGMO_ACCEPT_TRUNCATED_MSG;
mqm.clearMessage();
mqm.correlationId = MQC.MQCI_NONE;
mqm.messageId = MQC.MQMI_NONE;
try{
myQueue.get(mqm,gmo,0);
}
catch(MQException mqe){
if(!(mqe.completionCode == MQException.MQCC_WARNING && mqe.reasonCode == MQException.MQRC_TRUNCATED_MSG_ACCEPTED))
throw mqe;
}
|
|
|
Back to top |
|
 |
RogerLacroix |
Posted: Thu May 06, 2004 2:02 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Hi,
I usually do the following:
Code: |
myQueue.get(mqm,gmo,1); |
Regards,
Roger Lacroix _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
lunobili |
Posted: Fri May 07, 2004 8:05 am Post subject: |
|
|
Novice
Joined: 06 Nov 2001 Posts: 17
|
Thanks Roger,
setting 1 instead of 0 solved the problem. I just wonder why!!!! Basically what happens in my webapp, is that a servlet calls a certain number of classes until I get to my business class, that does all the usual things on the queue (such as put, get, browse) and then returns a result. Why changing application server should change this behavior? My class should not be aware at all that it is running in a web application!!!!!!!!!! So, why should it work fine in a case and miserably fail in another?
Anyway, thank for your help.
Bye, Luca. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|