Main Tutorials

WARNING: JSF1063: WARNING! Setting non-serializable attribute value into HttpSession

Problem

In JSF 2.0 web application, during server initialization, it hits following warning message

WARNING: JSF1063: WARNING! Setting non-serializable attribute value into HttpSession
(key: user, value class: com.mkyong.UserBean).

UserBean.java


package com.mkyong;

@ManagedBean(name="user")
@SessionScoped
public class UserBean{

	//...
}

Solution

The “UserBean” is not serializable. To get rid of this warning message, just make this bean implement java.io.Serializable interface.

UserBean.java


package com.mkyong;

import java.io.Serializable;

@ManagedBean(name="user")
@SessionScoped
public class UserBean implements Serializable{

	//...
}

About Author

author image
Founder of Mkyong.com, love Java and open source stuff. Follow him on Twitter. If you like my tutorials, consider make a donation to these charities.

Comments

Subscribe
Notify of
6 Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments
billbaroud
7 years ago

thank dude

Fabian
3 years ago

this is not working

tavita
4 years ago

no me soluciono nada

SomeOne
9 years ago

Thank you man!! You saved my life!!

Chris
10 years ago

Thank you man.

Rampage
13 years ago

Thank you!