-
Notifications
You must be signed in to change notification settings - Fork 39
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
"Property is null" 500 response/error #94
Comments
What's the code that you ran? On Tue, Jul 21, 2015, 12:48 AM Mike Jensen [email protected] wrote:
|
The code that I originally produced this from is proprietary and pretty complicated. However I was able to create a smaller example which reproduces this: |
You have run into limitations in Alternator due to its internal use of DynamoDB version 1 functionality. More advanced DynamoDB version 2 functionality, such as your query expression string, are NOT supported. Alternator maps V2 requests into equivalent V1 structures, runs V1 emulation logic, and then maps V1 results to V2 structures. The "null" property in question is the HashKey field and value for the query. I was able to trace the location of the "property value is null" error by copying your example logic into a new Unit test method in the AlternatorQueryTest in the com.michelboudreau.testv2 package in a temporary local branch of the Alternator GitHub project. I also set this constant to 'false' in the AlternatorTest base class to allow breakpoint debugging inside Alternator's code:
If you still wish to use Alternator for development of your project, you will need to change how you define queries. For examples of V2-to-V1 compatible queries, see the com.michelboudreau.testv2.AlternatorQueryTest Junit test class and its AlternatorTest base class: |
Thanks for the info and continual help @rrutt ...sorry it took me so long to msg back. I was able to update most of our code to work within these restrictions. I am very happy to be able to use this library for much more robust unit testing. However I do think this would be a nice improvement in the library (though it also seems like it might be a lot of work). If you want you can close this issue, or feel free to keep it open as a possible improvement. |
I keep getting the error when querying that "property is null":
[qtp1519508707-24 - /] DEBUG o.e.jetty.server.HttpConnection - org.eclipse.jetty.server.HttpConnection$CommitCallback@664886e5 generate: DONE ([p=128,l=128,c=8192,r=0],[p=210,l=210,c=8192,r=0],true)@END [Test worker] DEBUG o.a.h.i.conn.DefaultClientConnection - Receiving response: HTTP/1.1 500 Server Error [Test worker] DEBUG org.apache.http.headers - << HTTP/1.1 500 Server Error [Test worker] DEBUG org.apache.http.headers - << Content-Type: text/plain; charset=ISO-8859-1 [Test worker] DEBUG org.apache.http.headers - << Content-Length: 210 [Test worker] DEBUG org.apache.http.headers - << Server: Jetty(9.0.7.v20131107) [qtp1519508707-24 - /] DEBUG o.s.w.s.m.a.AnnotationMethodHandlerAdapter - Written [{"__type":"com.amazonaws.dynamodb.v20111205#InternalServerErrorException","message":"The following Errors occured: property value is null.\n (Service: null; Status Code: 0; Error Code: null; Request ID: null)"}] as "text/plain;charset=ISO-8859-1" using [org.springframework.http.converter.StringHttpMessageConverter@7c8169f5] [Test worker] DEBUG c.a.http.impl.client.SdkHttpClient - Connection can be kept alive indefinitely [qtp1519508707-24 - /] DEBUG o.s.web.servlet.DispatcherServlet - Null ModelAndView returned to DispatcherServlet with name 'org.springframework.web.servlet.DispatcherServlet-2a793ae0': assuming HandlerAdapter completed request handling [qtp1519508707-24 - /] DEBUG o.s.web.servlet.DispatcherServlet - Successfully completed request [Test worker] DEBUG com.amazonaws.requestId - x-amzn-RequestId: not available [qtp1519508707-24 - /] DEBUG org.eclipse.jetty.server.Server - RESPONSE / 500 handled=true [Test worker] DEBUG org.apache.http.wire - << "{"__type":"com.amazonaws.dynamodb.v20111205#InternalServerErrorException","message":"The following Errors occured: property value is null.\n (Service: null; Status Code: 0; Error Code: null; Request ID: null)"}" [qtp1519508707-24] DEBUG org.eclipse.jetty.http.HttpParser - reset HttpParser{s=END,267 of 267}
Any ideas what property it may be referencing? I pretty confident this is a bug in Alternator since the code works flawlessly against amazon's local dynamo instance.
The text was updated successfully, but these errors were encountered: