Henry (2) [Avatar] Offline
#1
When I generate ejb files using chapter 3 sample codes on eclipse 3.1, there are 29 warnings,

Just quote some:

The serializable class BlogFacadeSession does not declare a static final serialVersionUID field of long

The serializable class BlogSimpleValue does not declare a static final serialVersionUID field of long

The method wrapReadOnly(Collection) from the type BlogSimpleValue is never used locally (BlogSimpleValue.java)

Does anyone know how to get rid of these warnings? And why are there these warnings?

Henry
squishy (2) [Avatar] Offline
#2
Re: Warning "does not declare a static final serialVersionUID field of long
These errors come because every class that implements java.io.Serializable or extends a class that implements that should have a

public static long serialVersionUID = <<longnumber>>;

variable, so that it can be distinguished later when serialized and deserialized.
Dont know how to do those with xdoclet yet though.
squishy (2) [Avatar] Offline
#3
Re: Warning "does not declare a static final serialVersionUID field of long
oh has to be

public final static long serialVersionUID