Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Websphere Studio Error : MQJMS1061: Unable to deserialize object

Sajet Inarup
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having weired problem when I try to send string message it works fine.
But, when I try to send Value object it gives me error.

FYI : When I send String message I comment our address code.
any ieda??? my code for message bean and value object as follows.


//Address Message Bean
import com.web.webapp.value.Address;

public void onMessage(javax.jms.Message msg) {
ObjectMessage message = (javax.jms.ObjectMessage) msg;
Address adrs;
String strMsg;

try {
//if i send string message this works fine
strMsg = (String)message.getObject(); //i can use TextMessage also here
//fails here give me exception MQJMS1061: Unable to deserialize object
adrs = (Address)message.getObject();
catch (JMSException jmsex) {
System.out.println("jmsex" + jmsex.getMessage());
catch (Exception ex) {
System.out.println("ex.getMessage()" + ex.getMessage());


//Address value Object As follows
package com.web.webapp.value;


public class Address implements Serializable{

// Attributes
private String streetName1;
private String streetName2;
private String city;
private String state;
private String zipCode;
private String country;

public Address() {}

public Address(String streetName1,
String streetName2,
String city,
String state,
String zipCode,
String country)
this.streetName1 = streetName1;
this.streetName2 = streetName2; = city;
this.state = state;
this.zipCode = zipCode; = country;

public String getCity() {
return city;
public String getCountry() {
return country;
public String getState() {
return state;
public String getStreetName1() {
return streetName1;
public String getStreetName2() {
return streetName2;
public String getZipCode() {
return zipCode;
public void setCity(String string) {
city = string;
public void setCountry(String string) {
country = string;
public void setState(String string) {
state = string;
public void setStreetName1(String string) {
streetName1 = string;
public void setStreetName2(String string) {
streetName2 = string;
public void setZipCode(String string) {
zipCode = string;

Roland Barcia
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sending the objects accross the network? Are the JVM's compatible
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic