Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > J2EE
|
J2EE General J2EE (Java 2 Enterprise Edition) discussions. Questions not specific to EE will be redirected elsewhere.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the J2EE section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 4th, 2004, 02:48 AM
Registered User
 
Join Date: Aug 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default java.rmi.UnmarshalException

Hi,
While running my program, i am getting a java.io.NotSerializableException. This is the exception message:
Caused by: java.io.NotSerializableException: myapp.dto.BSADTO

This is my DTO


import ...

public class BSADTO implements Serializable {
    private String stateCode;
    private BigDecimal serviceStateId;
    private String[] selectedCounties;
    private Collection countiesForSelectedState;

    public BSADTO() {

    }
    public BranchServiceAreaDTO(BigDecimal serviceStateId,String stateCode) {
....
            }

    public BigDecimal getServiceStateId() {
        return serviceStateId;
    }

    public void setServiceStateId(BigDecimal serviceStateId) {
        this.serviceStateId = serviceStateId;
    }

    public String getStateCode() {
        return stateCode;
    }

    public void setStateCode(String stateCode) {
        this.stateCode = stateCode;
    }

    public String[] getSelectedCounties() {
        return selectedCounties;
    }

    public void setSelectedCounties(String[] selectedCounties) {
        this.selectedCounties = selectedCounties;
    }

    public Collection getCountiesForSelectedState() {
        return countiesForSelectedState;
    }

    public void setCountiesForSelectedState(Collection countiesForSelectedState) {
        this.countiesForSelectedState = countiesForSelectedState;
    }

}



Is there anything wrong with my code.
Please help me. Thanks,
Malar
 
Old August 10th, 2004, 07:27 AM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 345
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to gokul_blr Send a message via Yahoo to gokul_blr
Default

Check follow the Java Rule while passing Serializable objects using HttpSession:

"One Should use response forward, instead of response sendRedirect.
     As response sendRedirect, generated a fresh request and all the HttpSession
     objects will be Null. And should use request.getSession(false), As a true argument
     value to this will create a new session and the earlier session will be Null."







Similar Threads
Thread Thread Starter Forum Replies Last Post
First RMI Program Pratik_Garg J2EE 1 April 4th, 2006 03:41 AM
RMI newbie NickTheBubble J2EE 0 December 17th, 2004 07:59 AM
Why rmi don't run? Edward King J2EE 2 December 7th, 2004 05:41 AM
how will create policy file in rmi sivapmk J2EE 1 December 10th, 2003 11:50 AM
Problem running RMI melida J2EE 0 September 23rd, 2003 09:33 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.