ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » Reason code 2005 using Tomcat

Post new topic  Reply to topic
 Reason code 2005 using Tomcat « View previous topic :: View next topic » 
Author Message
lunobili
PostPosted: Thu May 06, 2004 10:18 am    Post subject: Reason code 2005 using Tomcat Reply with quote

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
View user's profile Send private message
bower5932
PostPosted: Thu May 06, 2004 10:54 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
lunobili
PostPosted: Thu May 06, 2004 11:19 am    Post subject: Reply with quote

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
View user's profile Send private message
RogerLacroix
PostPosted: Thu May 06, 2004 2:02 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
lunobili
PostPosted: Fri May 07, 2004 8:05 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » Reason code 2005 using Tomcat
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.