I am using Websphere MQ 6.x and I am getting the following exception thrown when an object is read from the queue.
Caused by: javax.jms.MessageFormatException: MQJMS1061: Unable to deserialize object
at com.ibm.jms.JMSMessage.newMessageFormatException(JMSMessage.java:4982)
at com.ibm.jms.JMSObjectMessage.getObject(JMSObjectMessage.java:289)
I am able to see the serialized version of the message (class) using WMQ Tool. But when the application reads it this exception happens.
Any ideas why?
I think a early version 6.x had a problem with primitive types. Maybe its this:http://www-01.ibm.com/support/docview.wss?uid=swg1IC50448
have you tried trying to read and write the messages from the queue using other tools besides your application?
You can try and see if you can read and write the messages to your queues using RFH Util for example or MQ Explorer to see if the problem is with your application or with the MQ infrastructure.
What is the application that is reading the message from the MQ Queue?
HTH
Manglu
Is it possible that the application reading the message does not have the class in it's classpath ? Or a more subtle issue, it may not be visible to the thread's context classloader.
Do you have a longer stack trace that might supply more information ?
Related
I am using Apache Camel Framework and going through the documentation regarding the error handling , i am confused between Exchange.ERRORHANDLER_HANDLED and Exchange.FAILURE_HANDLED properties
Exchange.ERRORHANDLER_HANDLED: As per my understanding this property is to propagate the exception back to caller.
but not able to find any information Exchange.FAILURE_HANDLED on this.
Those are internal flags and should not be in-use by end users.
I'm getting the following error for the rabbitmq application.
org.springframework.amqp.rabbit.listener.ConditionalRejectingErrorHandlerExecution of Rabbit message listener failed.
We are using spring-amqp 1.6.6 version. I want to know the possible reasons for this exception.
Thanks in advance
Any exception thrown by the listener will cause this, as well as anything that will prevent the listener from being called (such as a message conversion exception).
1.6.x is no longer supported; the current 1.x version is 1.7.10.
I want to run a java application which calls a web service. Everything works fine from the netbeans ide, but fails when I run the .jar generated. What could be the problem?
How can I check the content type that the error is pointing at?
the error says: "SEVERE: SAAJ0537: Invalid Content-Type. Could be an error message instead of a SOAP message. com.sun.xml.messaging.saaj.MessageImpl identifyContentType"
EDIT
I am realizing that the problem could be originated by the fact that the web service that Im consuming uses a custom data type, but I have no idea where to look.
Please help
Your question lacks the details that would help identify your problem (like, what web container are you using, some source code, etc) but I've encountered and resolved this same problem. I'm using Tomcat with Eclipse and apparently, the problem occurs because for some reason, Tomcat can't find some JARs even though I have specified them in my build path. The resolution is to put the JARs in the actual lib directory of Tomcat instead of in some project-specific location. (See this same case with log4j.)
What happens is this missing JAR causes the servlet to produce an internal server error when called. Tomcat generates an error page---which is of type "text/html"---and sends it back to client. So, client reads "text/html" instead of the expected "text/xml".
For a test this SOAP tutorial produces the specified error due to jaxm-api.jar but can be fixed with the solution I described above. I have verified this with Tomcat 7.
How can I check the content type that the error is pointing at?
A bit difficult to answer without some code. But if you are using javax.xml.soap.SOAPPart, it has methods to check the headers of the SOAP transaction. Check the javadocs. Shame it does not override toString(). But personally, I did not arrive at this answer with Java debug methods but via looking at TCP dumps.
I have traditional (com.ibm.mq.jar) MQ application in Java for testing purpose. Now I need to use that application to send some messages to JMS. When I try to set any JMS property on MQ message, for example:
message.setStringProperty("JMSDestination", "queue:///" + queueName);
I always get error: 2471 - MQRC_PROPERTY_NOT_AVAILABLE. It works if I just remove JMS from the property name.
Is it possible to set JMS properties directly on MQMessage? What is a correct way to do that on MQ level?
Btw. I have the same application in .NET where setting JMS properties this way is possible so I'm only trying to use the same code in Java.
It is not allowed to do this manually. Please use the JMS API to set JMS properties.
Restrictions to MQ properties are explained here.
One thing is interessting in that document page though,
The names of properties specified directly as MQRFH2 elements are not guaranteed to be validated by the MQPUT call.
You could perhaps work around this, on a short term basis. There seems to be no guarantee that setting the MQRFH2 elements directly will not be validated, though.
I'm trying to deploy an application and I've got a webservice that is unavailable. By contacting the team responsible for the webservice, they're asking me if I'm using Axis or SpringWS to access their webservice (apparently in my case there's no other option). Can this be determined from the following (partial) stack trace ?
Here's the Tomcat log I got:
INFO main # jaxws.PlatosJaxWsPortProxyFactoryBean - Retrieve of the wsdl informations.
Retrieving document at 'http://www.xxxxxxxxxxxxxxxx?wsdl'.
ERROR main # utilities.WSDLAnalyzer - javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERROR: Unable to resolve imported document at 'http://www.xxxxxxxxxxxx?wsdl'.: java.io.IOException: Server returned HTTP response code: 503 for URL: http://www.xxxxxxxxxx?wsdl
Neither, judging by the info you posted you are using GlassFish Metro.
You're using some implementation of the JAX-WS API, but the error doesn't indicate which one.
Most likely it's the JAX-WS implementation that ships internally to Java6, but it could also be something like Apache CXF or Metro. What's on your application's classpath?
Are these two the only options?
Google says it might be something called Petals Service Engine.
You should contact the ISMS-ALSA department of your company. And, by the way, you're not supposed to use Axis, nor Glassfish Metro!
p.s.: the best answer should rather be assigned to skaffman.