Expand my Community achievements bar.

ALC-DSC-119-000: com.adobe.idp.dsc.util.InvalidCoercionException:

Avatar

Former Community Member

In our processs:

An operation will be called will return an java bean memberDTO or throw an exception.  Dependent on the return result, the process will do different things.  for example, if it is return an exception do A action. If it return the java bean memberDTO, it will do B action.

A action works fine; but if it return the java bean(B) action. it will throw following exception

ALC-DSC-119-000: com.adobe.idp.dsc.util.InvalidCoercionException: Cannot coerce object: com.casenet.dto.MemberDTO@1cbf712 of type: com.casenet.dto.MemberDTO to type: class java.lang.Byte

any idea?

2 Replies

Avatar

Level 10

I'm not sure what you do with your MemberDTO object but it look like you're trying to assign it to a byte variable.

The coercion error is basically saying that it can't fit the content of a memberDTO into a type 'byte'.

Jasmin

Avatar

Former Community Member

The memberDTO is the return object from the operation, and it assign to memberDTO object in process.  Everything works fine if It works alone (don't route this to another operation). The thing I don't understand is that if I route it to another operation, the operation that return memberDTO will be throw the  coercion error. 

Thanks,