{"action":"created","issue":{"url":"https://api.github.com/repos/SoftInstigate/restheart/issues/200","repository_url":"https://api.github.com/repos/SoftInstigate/restheart","labels_url":"https://api.github.com/repos/SoftInstigate/restheart/issues/200/labels{/name}","comments_url":"https://api.github.com/repos/SoftInstigate/restheart/issues/200/comments","events_url":"https://api.github.com/repos/SoftInstigate/restheart/issues/200/events","html_url":"https://github.com/SoftInstigate/restheart/issues/200","id":216025327,"number":200,"title":"java.lang.NullPointerException when using XHR request","user":{"login":"cyf992002","id":1211963,"avatar_url":"https://avatars2.githubusercontent.com/u/1211963?v=3","gravatar_id":"","url":"https://api.github.com/users/cyf992002","html_url":"https://github.com/cyf992002","followers_url":"https://api.github.com/users/cyf992002/followers","following_url":"https://api.github.com/users/cyf992002/following{/other_user}","gists_url":"https://api.github.com/users/cyf992002/gists{/gist_id}","starred_url":"https://api.github.com/users/cyf992002/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyf992002/subscriptions","organizations_url":"https://api.github.com/users/cyf992002/orgs","repos_url":"https://api.github.com/users/cyf992002/repos","events_url":"https://api.github.com/users/cyf992002/events{/privacy}","received_events_url":"https://api.github.com/users/cyf992002/received_events","type":"User","site_admin":false},"labels":[{"id":148409747,"url":"https://api.github.com/repos/SoftInstigate/restheart/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-03-22T11:05:48Z","updated_at":"2017-03-24T02:07:00Z","closed_at":"2017-03-24T02:07:00Z","body":"When I use  XMLHttpRequest object to request http://a:a@15.19.249.25:8080/db/_schemas/Organization, I sometimes get \r\nNullPointerException in the response.\r\n{\r\n\"_exceptions\": [\r\n  {\r\n\"exception\": \"java.lang.NullPointerException\"\r\n}\r\n],\r\n\"http status code\": 500,\r\n\"http status description\": \"Internal Server Error\",\r\n\"message\": \"Error handling the request, see log for more information\"\r\n}\r\n\r\n\r\nHere's log I captured \r\n java.lang.NullPointerException: null\r\n        at org.restheart.handlers.schema.JsonSchemaTransformer.unescapeSchema(JsonSchemaTransformer.java:160)\r\n        at org.restheart.handlers.schema.JsonSchemaTransformer.transform(JsonSchemaTransformer.java:57)\r\n        at org.restheart.handlers.metadata.TransformerHandler.lambda$transform$0(TransformerHandler.java:93)\r\n        at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)\r\n        at java.util.stream.ReferencePipeline$Head.forEachOrdered(ReferencePipeline.java:590)\r\n        at org.restheart.handlers.metadata.TransformerHandler.transform(TransformerHandler.java:92)\r\n        at org.restheart.handlers.metadata.TransformerHandler.handleRequest(TransformerHandler.java:69)\r\n        at org.restheart.handlers.PipedHttpHandler.next(PipedHttpHandler.java:136)\r\n        at org.restheart.handlers.document.GetDocumentHandler.handleRequest(GetDocumentHandler.java:170)\r\n        at org.restheart.handlers.PipedHttpHandler.next(PipedHttpHandler.java:136)\r\n        at org.restheart.handlers.metadata.AbstractTransformerMetadataHandler.handleRequest(AbstractTransformerMetadataHandler.java:63)\r\n        at org.restheart.handlers.RequestDispacherHandler.handleRequest(RequestDispacherHandler.java:468)\r\n        at org.restheart.handlers.injectors.CollectionPropsInjectorHandler.handleRequest(CollectionPropsInjectorHandler.java:98)\r\n        at org.restheart.handlers.PipedHttpHandler.next(PipedHttpHandler.java:136)\r\n        at org.restheart.handlers.injectors.DbPropsInjectorHandler.handleRequest(DbPropsInjectorHandler.java:92)\r\n        at org.restheart.handlers.PipedHttpHandler.next(PipedHttpHandler.java:136)\r\n        at org.restheart.handlers.injectors.AccountInjectorHandler.handleRequest(AccountInjectorHandler.java:56)\r\n        at org.restheart.handlers.PipedHttpHandler.next(PipedHttpHandler.java:136)\r\n        at org.restheart.security.handlers.AccessManagerHandler.handleRequest(AccessManagerHandler.java:55)\r\n        at org.restheart.handlers.PipedHttpHandler.next(PipedHttpHandler.java:136)\r\n        at org.restheart.security.handlers.AuthTokenInjecterHandler.handleRequest(AuthTokenInjecterHandler.java:70)\r\n        at org.restheart.handlers.PipedHttpHandler.next(PipedHttpHandler.java:136)\r\n        at org.restheart.security.handlers.AuthenticationCallHandler.handleRequest(AuthenticationCallHandler.java:54)\r\n        at org.restheart.handlers.PipedHttpHandler.next(PipedHttpHandler.java:136)\r\n        at org.restheart.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:55)\r\n        at org.restheart.handlers.PipedHttpHandler.next(PipedHttpHandler.java:136)\r\n        at org.restheart.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:61)\r\n        at org.restheart.handlers.PipedHttpHandler.next(PipedHttpHandler.java:136)\r\n        at org.restheart.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:85)\r\n        at org.restheart.handlers.PipedHttpHandler.next(PipedHttpHandler.java:136)\r\n        at org.restheart.security.handlers.SecurityHandler.handleRequest(SecurityHandler.java:50)\r\n        at org.restheart.security.handlers.SecurityHandlerDispacher.handleRequest(SecurityHandlerDispacher.java:60)\r\n        at org.restheart.handlers.PipedHttpHandler.next(PipedHttpHandler.java:136)\r\n        at org.restheart.handlers.injectors.BodyInjectorHandler.handleRequest(BodyInjectorHandler.java:109)\r\n        at org.restheart.handlers.PipedHttpHandler.next(PipedHttpHandler.java:136)\r\n        at org.restheart.handlers.OptionsHandler.handleRequest(OptionsHandler.java:58)\r\n        at org.restheart.handlers.PipedHttpHandler.next(PipedHttpHandler.java:136)\r\n        at org.restheart.handlers.injectors.RequestContextInjectorHandler.handleRequest(RequestContextInjectorHandler.java:647)\r\n        at org.restheart.handlers.PipedHttpHandler.next(PipedHttpHandler.java:136)\r\n        at org.restheart.security.handlers.CORSHandler.handleRequest(CORSHandler.java:88)\r\n        at org.restheart.handlers.RequestLoggerHandler.handleRequest(RequestLoggerHandler.java:87)\r\n        at org.restheart.handlers.PipedHttpHandler.handleRequest(PipedHttpHandler.java:89)\r\n        at io.undertow.server.handlers.PathHandler.handleRequest(PathHandler.java:94)\r\n        at io.undertow.server.handlers.HttpContinueAcceptingHandler.handleRequest(HttpContinueAcceptingHandler.java:78)\r\n        at org.restheart.handlers.ErrorHandler.handleRequest(ErrorHandler.java:69)\r\n        at io.undertow.server.handlers.encoding.EncodingHandler.handleRequest(EncodingHandler.java:72)\r\n        at org.restheart.handlers.GzipEncodingHandler.handleRequest(GzipEncodingHandler.java:74)\r\n        at io.undertow.server.Connectors.executeRootHandler(Connectors.java:210)\r\n        at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:809)\r\n        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\r\n        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\r\n        at java.lang.Thread.run(Thread.java:745)\r\n"},"comment":{"url":"https://api.github.com/repos/SoftInstigate/restheart/issues/comments/288913237","html_url":"https://github.com/SoftInstigate/restheart/issues/200#issuecomment-288913237","issue_url":"https://api.github.com/repos/SoftInstigate/restheart/issues/200","id":288913237,"user":{"login":"cyf992002","id":1211963,"avatar_url":"https://avatars2.githubusercontent.com/u/1211963?v=3","gravatar_id":"","url":"https://api.github.com/users/cyf992002","html_url":"https://github.com/cyf992002","followers_url":"https://api.github.com/users/cyf992002/followers","following_url":"https://api.github.com/users/cyf992002/following{/other_user}","gists_url":"https://api.github.com/users/cyf992002/gists{/gist_id}","starred_url":"https://api.github.com/users/cyf992002/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyf992002/subscriptions","organizations_url":"https://api.github.com/users/cyf992002/orgs","repos_url":"https://api.github.com/users/cyf992002/repos","events_url":"https://api.github.com/users/cyf992002/events{/privacy}","received_events_url":"https://api.github.com/users/cyf992002/received_events","type":"User","site_admin":false},"created_at":"2017-03-24T02:07:00Z","updated_at":"2017-03-24T02:07:00Z","body":"Close issue, thanks everyone."}}
{"actor":{"display_login":"cyf992002"}}