mboudreau / Alternator

A mock DynamoDB that runs locally for testing purposes - DEPRECATED, PLEASE USE DYNAMODB LOCAL: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.html
Apache License 2.0
78 stars 39 forks source link

Unable to marshall request to JSON: null #23

Closed statelessness closed 12 years ago

statelessness commented 12 years ago

Hi,

First of all, thanks for your library. I think this should have been provided by Amazon since begining.

I've just started to use Alternator today. Previously I've been running my tests with an AWS account. The problem is that when I try to add a new item to a table, I get tle following exception: com.amazonaws.AmazonClientException: Unable to marshall request to JSON: null.

I'm using DynamoDB mapper and have my classes properly annotated

I don't know if this is a problem with my code or bug.

The stack trace is:

15:57:22.207 [main] DEBUG com.amazonaws.request - Sending Request: POST http://localhost:9090/ / Headers: (X-Amz-Target: DynamoDB_20111205.UpdateItem, Content-Length: 726, Content-Type: application/x-amz-json-1.0, ) 15:57:25.519 [main] DEBUG o.a.h.i.c.t.ThreadSafeClientConnManager - Get connection: {}->http://localhost:9090, timeout = 50000 15:57:25.519 [main] DEBUG o.a.h.i.conn.tsccm.ConnPoolByRoute - [{}->http://localhost:9090] total kept alive: 1, total issued: 0, total allocated: 1 out of 50 15:57:25.519 [main] DEBUG o.a.h.i.conn.tsccm.ConnPoolByRoute - Getting free connection [{}->http://localhost:9090][null] 15:57:25.519 [main] DEBUG o.a.h.impl.client.DefaultHttpClient - Stale connection check 15:57:25.519 [main] DEBUG o.a.h.c.protocol.RequestAddCookies - CookieSpec selected: best-match 15:57:25.519 [main] DEBUG o.a.h.c.protocol.RequestAuthCache - Auth cache not set in the context 15:57:25.519 [main] DEBUG o.a.h.c.p.RequestTargetAuthentication - Target auth state: UNCHALLENGED 15:57:25.519 [main] DEBUG o.a.h.c.p.RequestProxyAuthentication - Proxy auth state: UNCHALLENGED 15:57:25.519 [main] DEBUG o.a.h.impl.client.DefaultHttpClient - Attempt 1 to execute request 15:57:25.519 [main] DEBUG o.a.h.i.conn.DefaultClientConnection - Sending request: POST / HTTP/1.1 15:57:25.519 [main] DEBUG org.apache.http.wire - >> "POST / HTTP/1.1[\r][\n]" 15:57:25.519 [main] DEBUG org.apache.http.wire - >> "Host: localhost:9090[\r][\n]" 15:57:25.519 [main] DEBUG org.apache.http.wire - >> "X-Amz-Target: DynamoDB_20111205.UpdateItem[\r][\n]" 15:57:25.519 [main] DEBUG org.apache.http.wire - >> "User-Agent: aws-sdk-java/1.3.10 Windows_XP/5.1 Java_HotSpot(TM)_Client_VM/17.1-b03 com.amazonaws.services.dynamodb.datamodeling.DynamoDBMapper/1.3.10[\r][\n]" 15:57:25.519 [main] DEBUG org.apache.http.wire - >> "Content-Type: application/x-amz-json-1.0[\r][\n]" 15:57:25.519 [main] DEBUG org.apache.http.wire - >> "Content-Length: 726[\r][\n]" 15:57:25.519 [main] DEBUG org.apache.http.wire - >> "Connection: Keep-Alive[\r][\n]" 15:57:25.519 [main] DEBUG org.apache.http.wire - >> "[\r][\n]" 15:57:25.519 [main] DEBUG org.apache.http.headers - >> POST / HTTP/1.1 15:57:25.519 [main] DEBUG org.apache.http.headers - >> Host: localhost:9090 15:57:25.519 [main] DEBUG org.apache.http.headers - >> X-Amz-Target: DynamoDB_20111205.UpdateItem 15:57:25.519 [main] DEBUG org.apache.http.headers - >> User-Agent: aws-sdk-java/1.3.10 Windows_XP/5.1 Java_HotSpot(TM)_Client_VM/17.1-b03 com.amazonaws.services.dynamodb.datamodeling.DynamoDBMapper/1.3.10 15:57:25.519 [main] DEBUG org.apache.http.headers - >> Content-Type: application/x-amz-json-1.0 15:57:25.519 [main] DEBUG org.apache.http.headers - >> Content-Length: 726 15:57:25.519 [main] DEBUG org.apache.http.headers - >> Connection: Keep-Alive 15:57:25.519 [main] DEBUG org.apache.http.wire - >> "{"TableName":"accounts-projects","Key":{"HashKeyElement":{"S":"clientIdWithNoDetails"}},"AttributeUpdates":{"grantTypes":{"Value":{"S":"[]"},"Action":"PUT"},"scope":{"Value":{"S":"[]"},"Action":"PUT"},"redirectUris":{"Value":{"S":"[]"},"Action":"PUT"},"refreshTokenValiditySeconds":{"Value":{"N":"0"},"Action":"PUT"},"accessTokenValiditySeconds":{"Value":{"N":"0"},"Action":"PUT"},"resourceIds":{"Value":{"S":"[]"},"Action":"PUT"},"created":{"Value":{"N":"1337781442004"},"Action":"PUT"},"updated":{"Value":{"N":"1337781442004"},"Action":"PUT"},"description":{"Action":"DELETE"},"profileId":{"Action":"DELETE"},"name":{"Action":"DELETE"},"roles":{"Value":{"S":"[]"},"Action":"PUT"},"secret":{"Action":"DELETE"}},"Expected":{}}" 15:57:25.535 [qtp26788115-22] DEBUG org.eclipse.jetty.http.HttpParser - filled 1049/1049 15:57:25.535 [qtp26788115-22 - /] DEBUG org.eclipse.jetty.server.Server - REQUEST / on AsyncHttpConnection@dd874,g=HttpGenerator{s=0,h=-1,b=-1,c=-1},p=HttpParser{s=2,l=10,c=726},r=4 15:57:25.535 [qtp26788115-22 - /] DEBUG o.e.j.server.handler.ContextHandler - scope null||/ @ o.e.j.s.ServletContextHandler{/,null} 15:57:25.535 [qtp26788115-22 - /] DEBUG o.e.j.server.handler.ContextHandler - context=||/ @ o.e.j.s.ServletContextHandler{/,null} 15:57:25.535 [qtp26788115-22 - /] DEBUG org.eclipse.jetty.server.session - sessionManager=org.eclipse.jetty.server.session.HashSessionManager@11563a2 15:57:25.535 [qtp26788115-22 - /] DEBUG org.eclipse.jetty.server.session - session=null 15:57:25.535 [qtp26788115-22 - /] DEBUG o.e.jetty.servlet.ServletHandler - servlet |/|null -> org.springframework.web.servlet.DispatcherServlet-14116828 15:57:25.535 [qtp26788115-22 - /] DEBUG o.e.jetty.servlet.ServletHandler - chain=null 15:57:25.535 [qtp26788115-22 - /] DEBUG o.s.web.servlet.DispatcherServlet - DispatcherServlet with name 'org.springframework.web.servlet.DispatcherServlet-14116828' processing POST request for [/] 15:57:25.535 [qtp26788115-22 - /] DEBUG o.s.w.s.m.a.DefaultAnnotationHandlerMapping - Mapping [/] to HandlerExecutionChain with handler [com.michelboudreau.alternator.AlternatorDBController@1f489d9] and 1 interceptor 15:57:25.535 [qtp26788115-22 - /] DEBUG o.s.w.b.a.s.HandlerMethodInvoker - Invoking request handler method: public java.lang.String com.michelboudreau.alternator.AlternatorDBController.alternatorDBController(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) 15:57:25.566 [qtp26788115-22 - /] DEBUG c.m.a.validation.ValidatorUtils - Invoking validator [com.michelboudreau.alternator.validators.TableNameValidator@45acb5] 15:57:25.566 [qtp26788115-22 - /] DEBUG c.m.a.validation.ValidatorUtils - Invoking validator [com.michelboudreau.alternator.validators.KeyValidator@4dc00a] 15:57:25.566 [qtp26788115-22 - /] DEBUG c.m.a.validation.ValidatorUtils - Invoking validator [com.michelboudreau.alternator.validators.PrimaryKeyValidator@7ae011] 15:57:25.566 [qtp26788115-22 - /] DEBUG o.s.w.s.m.a.AnnotationMethodHandlerExceptionResolver - Resolving exception from handler [com.michelboudreau.alternator.AlternatorDBController@1f489d9]: com.amazonaws.AmazonClientException: Unable to marshall request to JSON: null 15:57:25.566 [qtp26788115-22 - /] DEBUG o.s.w.s.m.a.ResponseStatusExceptionResolver - Resolving exception from handler [com.michelboudreau.alternator.AlternatorDBController@1f489d9]: com.amazonaws.AmazonClientException: Unable to marshall request to JSON: null 15:57:25.566 [qtp26788115-22 - /] DEBUG o.s.w.s.m.s.DefaultHandlerExceptionResolver - Resolving exception from handler [com.michelboudreau.alternator.AlternatorDBController@1f489d9]: com.amazonaws.AmazonClientException: Unable to marshall request to JSON: null 15:57:25.598 [qtp26788115-22 - /] DEBUG o.s.web.servlet.DispatcherServlet - Could not complete request com.amazonaws.AmazonClientException: Unable to marshall request to JSON: null at com.amazonaws.services.dynamodb.model.transform.UpdateItemResultMarshaller.marshall(UpdateItemResultMarshaller.java:41) ~[classes/:na] at com.michelboudreau.alternator.AlternatorDBHandler.handle(AlternatorDBHandler.java:54) ~[classes/:na] at com.michelboudreau.alternator.AlternatorDBController.alternatorDBController(AlternatorDBController.java:32) ~[classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_22] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_22] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_22] at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_22] at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176) ~[spring-web-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:436) ~[spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:424) ~[spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923) ~[spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852) ~[spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) [spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789) [spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) [servlet-api-2.5.jar:2.5] at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) [servlet-api-2.5.jar:2.5] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:565) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:479) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1031) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:965) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.server.Server.handle(Server.java:344) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:452) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:894) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:948) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:851) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:606) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:46) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:603) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:538) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at java.lang.Thread.run(Thread.java:662) [na:1.6.0_22] Caused by: java.lang.NullPointerException: null at com.amazonaws.services.dynamodb.model.transform.UpdateItemResultMarshaller.marshall(UpdateItemResultMarshaller.java:22) ~[classes/:na] ... 36 common frames omitted 15:57:25.598 [qtp26788115-22 - /] DEBUG o.e.jetty.servlet.ServletHandler - org.springframework.web.util.NestedServletException: Request processing failed; nested exception is com.amazonaws.AmazonClientException: Unable to marshall request to JSON: null at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:894) ~[spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789) ~[spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) ~[servlet-api-2.5.jar:2.5] at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) ~[servlet-api-2.5.jar:2.5] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:565) ~[jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:479) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1031) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:965) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.server.Server.handle(Server.java:344) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:452) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:894) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:948) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:851) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:606) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:46) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:603) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:538) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at java.lang.Thread.run(Thread.java:662) [na:1.6.0_22] Caused by: com.amazonaws.AmazonClientException: Unable to marshall request to JSON: null at com.amazonaws.services.dynamodb.model.transform.UpdateItemResultMarshaller.marshall(UpdateItemResultMarshaller.java:41) ~[classes/:na] at com.michelboudreau.alternator.AlternatorDBHandler.handle(AlternatorDBHandler.java:54) ~[classes/:na] at com.michelboudreau.alternator.AlternatorDBController.alternatorDBController(AlternatorDBController.java:32) ~[classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_22] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_22] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_22] at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_22] at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176) ~[spring-web-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:436) ~[spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:424) ~[spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923) ~[spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852) ~[spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) ~[spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE] ... 24 common frames omitted Caused by: java.lang.NullPointerException: null at com.amazonaws.services.dynamodb.model.transform.UpdateItemResultMarshaller.marshall(UpdateItemResultMarshaller.java:22) ~[classes/:na] ... 36 common frames omitted 15:57:25.598 [qtp26788115-22 - /] WARN o.e.jetty.servlet.ServletHandler - / com.amazonaws.AmazonClientException: Unable to marshall request to JSON: null at com.amazonaws.services.dynamodb.model.transform.UpdateItemResultMarshaller.marshall(UpdateItemResultMarshaller.java:41) ~[classes/:na] at com.michelboudreau.alternator.AlternatorDBHandler.handle(AlternatorDBHandler.java:54) ~[classes/:na] at com.michelboudreau.alternator.AlternatorDBController.alternatorDBController(AlternatorDBController.java:32) ~[classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_22] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_22] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_22] at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_22] at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176) ~[spring-web-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:436) ~[spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:424) ~[spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923) ~[spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852) ~[spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) ~[spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789) ~[spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) ~[servlet-api-2.5.jar:2.5] at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) ~[servlet-api-2.5.jar:2.5] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:565) ~[jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:479) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1031) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:965) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.server.Server.handle(Server.java:344) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:452) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:894) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:948) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:851) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:606) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:46) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:603) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:538) [jetty-all-server-7.6.3.v20120416.jar:7.6.3.v20120416] at java.lang.Thread.run(Thread.java:662) [na:1.6.0_22] Caused by: java.lang.NullPointerException: null at com.amazonaws.services.dynamodb.model.transform.UpdateItemResultMarshaller.marshall(UpdateItemResultMarshaller.java:22) ~[classes/:na] ... 36 common frames omitted

Best regards,

tnbred commented 12 years ago

Yes this is an issue we're having too, it should be fixed as soon as we have some time to look into it.

Best,

mboudreau commented 12 years ago

Thanks for the feedback, I totally agree that this should of been provided by Amazon, but I'm hoping that eventually we can work with Amazon on this project.

It's funny because we just found this exact error ourselves this morning. For now, we're just using cloberring to make it work for now since we're on a tight deadline and can't fix this issue right away.

It would be greatly appreciated if you could take a whack at making it work. If not, I'll probably get to it this weekend.

Cheers!

mboudreau commented 12 years ago

Actually, this took precedent because we had things dependent on this to work. @tnbredillet was kind enough to provide a fix.

Hope this helps and please let us know of any other issues.

Cheers.

statelessness commented 12 years ago

I've just tested with version 0.2.3. The problem persists.

I don't know if it could be related, but my code is invoking the mapper's save method for a non existing item. However from the stack trace I can see that Alternator client is invoking UpdateItem instead of PutItem.

KR,

mboudreau commented 12 years ago

Interesting. Thanks for the feedback, we'll look into it.

tnbred commented 12 years ago

Thanks for your feedback, Actually if you use the normal mapper.save you have two saving behavior : -UPDATE ( by default if nothing is specified that is what your are using - that's an UpdateItemRequest) -CLOBBER (that's a PutItemRequest )

I just pushed version 0.2.4 this should be fixed. Let me know if it persists.