{"action":"opened","issue":{"url":"https://api.github.com/repos/katharsis-project/katharsis-core/issues/345","repository_url":"https://api.github.com/repos/katharsis-project/katharsis-core","labels_url":"https://api.github.com/repos/katharsis-project/katharsis-core/issues/345/labels{/name}","comments_url":"https://api.github.com/repos/katharsis-project/katharsis-core/issues/345/comments","events_url":"https://api.github.com/repos/katharsis-project/katharsis-core/issues/345/events","html_url":"https://github.com/katharsis-project/katharsis-core/issues/345","id":162321781,"number":345,"title":"Setting a relationship causes a NullPointerException exception","user":{"login":"evarga","id":1093227,"avatar_url":"https://avatars.githubusercontent.com/u/1093227?v=3","gravatar_id":"","url":"https://api.github.com/users/evarga","html_url":"https://github.com/evarga","followers_url":"https://api.github.com/users/evarga/followers","following_url":"https://api.github.com/users/evarga/following{/other_user}","gists_url":"https://api.github.com/users/evarga/gists{/gist_id}","starred_url":"https://api.github.com/users/evarga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evarga/subscriptions","organizations_url":"https://api.github.com/users/evarga/orgs","repos_url":"https://api.github.com/users/evarga/repos","events_url":"https://api.github.com/users/evarga/events{/privacy}","received_events_url":"https://api.github.com/users/evarga/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-06-26T10:25:40Z","updated_at":"2016-06-26T10:25:40Z","closed_at":null,"body":"This issue may be easily reproduced using the _Spring Boot Simple Example_ project (see [Katharsis Examples](https://github.com/katharsis-project/katharsis-examples)). Here are the steps:\r\n\r\n1. Start MongoDB on your local host using the default port number.\r\n2. Start the Spring Boot Simple Example program as instructed in the README.md file.\r\n3. Issue the following curl command from a separate shell: \r\n`curl -v -X PATCH -H \"Content-Type: application/vnd.api+json\" -H \"Accept: application/vnd.api+json\" --data '{\"data\":{\"type\":\"projects\",\"id\":\"123\"}}' http://localhost:8080/api/tasks/1/relationships/project`\r\n\r\nYou will notice the following reported exception in the console, and the returned HTTP status code is `500 Internal Server Error`:\r\n```\r\nio.katharsis.invoker.KatharsisInvokerException: com.fasterxml.jackson.databind.JsonMappingException: [no message for java.lang.NullPointerException]\r\n\tat io.katharsis.spring.KatharsisFilterV2.invoke(KatharsisFilterV2.java:104) ~[katharsis-spring-2.4.0.jar:na]\r\n\tat io.katharsis.spring.KatharsisFilterV2.doFilter(KatharsisFilterV2.java:81) ~[katharsis-spring-2.4.0.jar:na]\r\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [tomcat-embed-core-8.0.30.jar:8.0.30]\r\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [tomcat-embed-core-8.0.30.jar:8.0.30]\r\n\tat org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) [spring-web-4.2.4.RELEASE.jar:4.2.4.RELEASE]\r\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.2.4.RELEASE.jar:4.2.4.RELEASE]\r\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [tomcat-embed-core-8.0.30.jar:8.0.30]\r\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [tomcat-embed-core-8.0.30.jar:8.0.30]\r\n\tat org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:87) [spring-web-4.2.4.RELEASE.jar:4.2.4.RELEASE]\r\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.2.4.RELEASE.jar:4.2.4.RELEASE]\r\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [tomcat-embed-core-8.0.30.jar:8.0.30]\r\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [tomcat-embed-core-8.0.30.jar:8.0.30]\r\n\tat org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77) [spring-web-4.2.4.RELEASE.jar:4.2.4.RELEASE]\r\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.2.4.RELEASE.jar:4.2.4.RELEASE]\r\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [tomcat-embed-core-8.0.30.jar:8.0.30]\r\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [tomcat-embed-core-8.0.30.jar:8.0.30]\r\n\tat org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:121) [spring-web-4.2.4.RELEASE.jar:4.2.4.RELEASE]\r\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.2.4.RELEASE.jar:4.2.4.RELEASE]\r\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [tomcat-embed-core-8.0.30.jar:8.0.30]\r\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [tomcat-embed-core-8.0.30.jar:8.0.30]\r\n\tat org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) [tomcat-embed-core-8.0.30.jar:8.0.30]\r\n\tat org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [tomcat-embed-core-8.0.30.jar:8.0.30]\r\n\tat org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) [tomcat-embed-core-8.0.30.jar:8.0.30]\r\n\tat org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) [tomcat-embed-core-8.0.30.jar:8.0.30]\r\n\tat org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-embed-core-8.0.30.jar:8.0.30]\r\n\tat org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [tomcat-embed-core-8.0.30.jar:8.0.30]\r\n\tat org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:521) [tomcat-embed-core-8.0.30.jar:8.0.30]\r\n\tat org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096) [tomcat-embed-core-8.0.30.jar:8.0.30]\r\n\tat org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674) [tomcat-embed-core-8.0.30.jar:8.0.30]\r\n\tat org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500) [tomcat-embed-core-8.0.30.jar:8.0.30]\r\n\tat org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456) [tomcat-embed-core-8.0.30.jar:8.0.30]\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_65]\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_65]\r\n\tat org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.0.30.jar:8.0.30]\r\n\tat java.lang.Thread.run(Thread.java:745) [na:1.8.0_65]\r\nCaused by: com.fasterxml.jackson.databind.JsonMappingException: [no message for java.lang.NullPointerException]\r\n\tat com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:141) ~[jackson-databind-2.6.5.jar:2.6.5]\r\n\tat com.fasterxml.jackson.databind.ObjectMapper.writeValue(ObjectMapper.java:2383) ~[jackson-databind-2.6.5.jar:2.6.5]\r\n\tat com.fasterxml.jackson.core.base.GeneratorBase.writeObject(GeneratorBase.java:324) ~[jackson-core-2.6.5.jar:2.6.5]\r\n\tat com.fasterxml.jackson.core.JsonGenerator.writeObjectField(JsonGenerator.java:1415) ~[jackson-core-2.6.5.jar:2.6.5]\r\n\tat io.katharsis.jackson.serializer.BaseResponseSerializer.serializeSingle(BaseResponseSerializer.java:91) ~[katharsis-core-2.4.0.jar:na]\r\n\tat io.katharsis.jackson.serializer.BaseResponseSerializer.writeResponseWithResources(BaseResponseSerializer.java:77) ~[katharsis-core-2.4.0.jar:na]\r\n\tat io.katharsis.jackson.serializer.BaseResponseSerializer.serialize(BaseResponseSerializer.java:44) ~[katharsis-core-2.4.0.jar:na]\r\n\tat io.katharsis.jackson.serializer.BaseResponseSerializer.serialize(BaseResponseSerializer.java:22) ~[katharsis-core-2.4.0.jar:na]\r\n\tat com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:130) ~[jackson-databind-2.6.5.jar:2.6.5]\r\n\tat com.fasterxml.jackson.databind.ObjectMapper._configAndWriteValue(ObjectMapper.java:3559) ~[jackson-databind-2.6.5.jar:2.6.5]\r\n\tat com.fasterxml.jackson.databind.ObjectMapper.writeValue(ObjectMapper.java:2893) ~[jackson-databind-2.6.5.jar:2.6.5]\r\n\tat io.katharsis.spring.KatharsisFilterV2.dispatchRequest(KatharsisFilterV2.java:158) ~[katharsis-spring-2.4.0.jar:na]\r\n\tat io.katharsis.spring.KatharsisFilterV2.invoke(KatharsisFilterV2.java:102) ~[katharsis-spring-2.4.0.jar:na]\r\n\t... 34 common frames omitted\r\nCaused by: java.lang.NullPointerException: null\r\n\tat io.katharsis.jackson.serializer.ContainerSerializer.serialize(ContainerSerializer.java:66) ~[katharsis-core-2.4.0.jar:na]\r\n\tat io.katharsis.jackson.serializer.ContainerSerializer.serialize(ContainerSerializer.java:42) ~[katharsis-core-2.4.0.jar:na]\r\n\tat com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:130) ~[jackson-databind-2.6.5.jar:2.6.5]\r\n\t... 46 common frames omitted \r\n```"}}
{"actor":{"display_login":"evarga"}}