• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Websphere Studio Error : MQJMS1061: Unable to deserialize object

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
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.

Thanks,

//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());
getMessageDrivenContext().setRollbackOnly();
}
catch (Exception ex) {
System.out.println("ex.getMessage()" + ex.getMessage());
}

}

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

import java.io.Serializable;

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;
this.city = city;
this.state = state;
this.zipCode = zipCode;
this.country = 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;
}

}
 
author
Posts: 181
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you sending the objects accross the network? Are the JVM's compatible
 
reply
    Bookmark Topic Watch Topic
  • New Topic