-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem serializing Response when deployed to AWS Lambda #26
Comments
Hi @davidmco65
If 1. and 2. does not apply in your case: can you send me some code + dependencies, please. |
Also: |
Here are my dependencies in my pom.xml file: My DTO is a Pojo:
` Do I really need the @XmlRootElement if I'm really only interested in Json response body? I can test through API GW Test function, but can't through cURL.. just get "Missing Authentication Header" error. Thanks for your help! |
Maven, I see. I remember having some issues with maven and jrestless or rather jersey in an uber-jar... Are you configuring the maven shade plugin as follows:
See https://github.com/bbilger/jrestless-examples/blob/master/pom.xml#L48 |
Sorry @davidmco65, I was short on time today. Let me know if it works. |
Hi Bjorn,
Thank you for your help! Your previous message about the configuration
of the Maven Shade plugin did the trick! Thanks so much for your
valuable library and all of the time you've obviously put into it. It
will be the basis of all of our services going forward.
Regards,
David
…On 1/20/2017 10:33 AM, Björn Bilger wrote:
Sorry @davidmco65 <https://github.com/davidmco65>, I was short on time
today.
http://stackoverflow.com/questions/29107376/jersey-problems-with-maven-shade-plugin
looks exactly like your issue => try to configure maven-shade as
suggested above.
You also don't need to exclude |org.glassfish.jersey.containers| in
jersestless 0.4.0, anymore (see #14
<#14>)
You also don't need to use ***@***.***" if you don't need XML
(using it has the advantage that you can return both JSON and XML)
If you cannot access it via curl, then you probably didn't set up
APIGW properly.
Let me know if it works.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#26 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AQH5S4NdlMM10qIamVhdYNDHNbv-8ba2ks5rUO_WgaJpZM4LoV11>.
|
I am happy to help! |
The filter allows you to use the very same lambda function with different APIGW resources without changing any code. Let's say you have one APIGW resource configured as "/v1/{proxy+}" and one configured as "/v2/{proxy+}" and both invoke the very same lambda function. With this filter in place, your JAX-RS resources don't need to be mapped to "/v1" or "/v2". So they are agnostic to it. Note: In general this filter makes sense only if you map one endpoint to a lambda function.
Hi, I'm having an issue when I've deployed my Lambda to AWS and hooked it up to API Gateway.
I use the API Gateway Test functionality to test the Lambda. It makes the call, the code executes, but when I do the Response.ok()... I get the following messages in my CloudWatch log:
org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor aroundWriteTo
SEVERE: MessageBodyWriter not found for media type=application/json, type=class com...
From what I've read, there's a problem with the glassfish jersey media implementation. So I'd like to just switch over to Jackson's implementation. Is this something you've run into or done in the past?
Thanks,
David
The text was updated successfully, but these errors were encountered: