Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Riena » Java 5 Enums / Hessian / Riena
Java 5 Enums / Hessian / Riena [message #584054] Mon, 09 November 2009 12:28
Jens Mayer is currently offline Jens MayerFriend
Messages: 19
Registered: September 2009
Location: Hamburg
Junior Member

I encountered a when I tried to use a DTO which owns an Enum.

This is the Enum:

public enum BelegTyp {


private final static Map<String,BelegTyp> map = new HashMap<String,BelegTyp>();
private final String value;

private BelegTyp (String val){
this.value = val;

public String getValue() {
return value;

public String toString() {
return value;

... this is the DTO which owns the Enum:

public class DTOBeleg {
protected BelegTyp typ;

public BelegTyp getTyp() {
return typ;

public void setTyp(BelegTyp typ) {
this.typ = typ;

... and this is the DTO which has to be transferred:

public class DTOLieferschein extends DTOBeleg {

private String lieferscheinNr;


public String getLieferscheinNr() {
return lieferscheinNr;

public void setLieferscheinNr(String lieferscheinNr) {
this.lieferscheinNr = lieferscheinNr;


On the client-side the following exception is fired during deserialization:

Caused by: de.myapp.common.we.DTOBeleg.typ: de.myapp.common.we.DTOLieferschein (DTOLieferschein [allbel_id=0, lieferscheinNr=00039023]) cannot be assigned to de.myapp.common.we.BelegTyp
at$ObjectFieldDeserializ er.deserialize(
at .java:1943)
at .java:1666)
at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.j ava:201)
... 36 more

I know that there were some issues with hessian and Java5-Enums in former versions of hessian (3.0.x)
Riena 1.1.0 uses Hessian 3.1.3, right ? So Enums should be supported.

Can anybody tell me how to avoid these errors?
Previous Topic:Using SSLConfiguration
Next Topic:Using SSLConfiguration
Goto Forum:

Current Time: Fri Sep 22 23:10:46 GMT 2023

Powered by FUDForum. Page generated in 0.01608 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top