Jax-ws exception serialization failure

68
September 13, 2017, at 10:23 PM

I'm facing an issues which I cannot find a solution too (or I'm tackling the wrong way). When certain exceptions are generated from my service it appears the serialization is failing. This results in getting a wrapped exception which is a pain as calling clients receive a poor error and I imagine I'm loosing useful info from the original exception.

In the bellow example its an S3 bucket access issue, but I have had similar problems with some SQL exceptions.

It would be useful if I could keep my services for intervening directly. The ideal would be to add some custom exception serialization code.

> com.amazonaws.services.simpleworkflow.flow.DataConverterException:
> Failure serializing
> "com.sun.xml.internal.ws.fault.ServerSOAPFaultException: Client
> received SOAP Fault from server: Access Denied (Service: Amazon S3;
> Status Code: 403; Error Code: AccessDenied; Request ID: AAAAAAAAAAAA)
> Please see the server log to find more detail regarding exact cause of
> the failure." of type "class
> com.sun.xml.internal.ws.fault.ServerSOAPFaultException" when mapping
> key "null" at
> com.amazonaws.services.simpleworkflow.flow.JsonDataConverter.throwDataConverterException(JsonDataConverter.java:90)
> at
> com.amazonaws.services.simpleworkflow.flow.JsonDataConverter.toData(JsonDataConverter.java:78)
> at
> com.amazonaws.services.simpleworkflow.flow.pojo.POJOActivityImplementation.throwActivityFailureException(POJOActivityImplementation.java:102)
> at
> com.amazonaws.services.simpleworkflow.flow.pojo.POJOActivityImplementation.execute(POJOActivityImplementation.java:67)
> at
> com.amazonaws.services.simpleworkflow.flow.generic.ActivityImplementationBase.execute(ActivityImplementationBase.java:46)
> at
> com.amazonaws.services.simpleworkflow.flow.worker.SynchronousActivityTaskPoller.execute(SynchronousActivityTaskPoller.java:196)
> at
> com.amazonaws.services.simpleworkflow.flow.worker.ActivityTaskPoller$2.run(ActivityTaskPoller.java:92)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:748) Caused by:
> com.fasterxml.jackson.databind.JsonMappingException: Type id handling
> not implemented for type org.w3c.dom.Node (by serializer of type
> com.fasterxml.jackson.databind.ext.DOMSerializer) (through reference
> chain:
> com.sun.xml.internal.ws.fault.ServerSOAPFaultException["fault"]) at
> com.fasterxml.jackson.databind.SerializerProvider.mappingException(SerializerProvider.java:1084)
> at
> com.fasterxml.jackson.databind.JsonSerializer.serializeWithType(JsonSerializer.java:159)
> at
> com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:695)
> at
> com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:675)
> at
> com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeWithType(BeanSerializerBase.java:566)
> at
> com.fasterxml.jackson.databind.ser.impl.TypeWrappedSerializer.serialize(TypeWrappedSerializer.java:32)
> at
> com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:130)
> at
> com.fasterxml.jackson.databind.ObjectMapper._configAndWriteValue(ObjectMapper.java:3559)
> at
> com.fasterxml.jackson.databind.ObjectMapper.writeValueAsString(ObjectMapper.java:2927)
> at
> com.amazonaws.services.simpleworkflow.flow.JsonDataConverter.toData(JsonDataConverter.java:72)
> ... 8 more

Thanks for any suggestions

READ ALSO
JOOQ how to get a value from a table record and convert to timestamp

JOOQ how to get a value from a table record and convert to timestamp

I have a table with integer values on how often something should occur:

51
hadoop reducer progress 100% but doesn't end

hadoop reducer progress 100% but doesn't end

I'm running one hadoop job with 16 reduce tasks(hadoop-1

56
JPA inserting header and detail data

JPA inserting header and detail data

I'm new to JPA I want to insert detail data using entitymanagerpersist() here is the header snippet

67
Reduce Google Cloud Endpoints request response header size

Reduce Google Cloud Endpoints request response header size

I'm using a Google Cloud App Engine and Google Cloud Endpoints API for my backend for an Android appThis is all in Java

73