org.ektorp.DocumentNotFoundException breaks java.io.Serializable?

58 Views Asked by At

I am having trouble with org.ektorp.DocumentNotFoundException in a multi-tiered application (EJB container).

DocumentNotFoundException does declare a serialVersionUID, but contains a private member of class JsonNode, which in my case has the implementation class of com.fasterxml.jackson.databind.node.ObjectNode. Neither JsonNode nor ObjectNode implement Serializable, so when I try to pass a DocumentNotFoundException over the wire to a client, I get a NotSerializableException. The original exception is never seen by the client.

Is DocumentNotFoundException breaking the rules of java.io.Serializable (inherited from java.lang.Throwable)?

Is there a workaround other than catching DocumentNotFoundException everywhere possible and throwing a different Exception class that is fully Serializable?

0

There are 0 best solutions below