brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (BROOKLYN-120) Warning in REST server: "JsonGenerationException: Null key for a Map" in HighAvailabilitySummary
Date Wed, 19 Jul 2017 14:37:01 GMT

    [ https://issues.apache.org/jira/browse/BROOKLYN-120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16093174#comment-16093174
] 

ASF GitHub Bot commented on BROOKLYN-120:
-----------------------------------------

Github user asfgit closed the pull request at:

    https://github.com/apache/brooklyn-server/pull/766


> Warning in REST server: "JsonGenerationException: Null key for a Map" in HighAvailabilitySummary
> ------------------------------------------------------------------------------------------------
>
>                 Key: BROOKLYN-120
>                 URL: https://issues.apache.org/jira/browse/BROOKLYN-120
>             Project: Brooklyn
>          Issue Type: Bug
>            Reporter: Aled Sage
>            Priority: Minor
>
> After running a live-test that involved rebinding the brooklyn server, I saw this in
the log file (but I can't reproduce it):
> {noformat}
> 2015-01-15 23:09:14,846 WARN  b.r.u.j.ErrorAndToStringUnknownTypeSerializer [brooklyn-jetty-server-8082-qtp281110571-4750]:
Standard serialization not possible for class brooklyn.rest.domain.HighAvailabilitySummary
(HighAvailabilitySummary{ownId='EiPdKNAc',
>  links={}})
> org.codehaus.jackson.JsonGenerationException: Null key for a Map not allowed in JSON
(use a converting NullKeySerializer?)
>         at org.codehaus.jackson.map.ser.impl.FailingSerializer.serialize(FailingSerializer.java:34)
~[jackson-mapper-asl-1.9.13.jar:1.9.13]
>         at org.codehaus.jackson.map.ser.std.MapSerializer.serializeFields(MapSerializer.java:237)
~[jackson-mapper-asl-1.9.13.jar:1.9.13]
>         at org.codehaus.jackson.map.ser.std.MapSerializer.serialize(MapSerializer.java:186)
~[jackson-mapper-asl-1.9.13.jar:1.9.13]
>         at org.codehaus.jackson.map.ser.std.MapSerializer.serialize(MapSerializer.java:23)
~[jackson-mapper-asl-1.9.13.jar:1.9.13]
>         at org.codehaus.jackson.map.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:446)
~[jackson-mapper-asl-1.9.13.jar:1.9.13]
>         at org.codehaus.jackson.map.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:150)
~[jackson-mapper-asl-1.9.13.jar:1.9.13]
>         at org.codehaus.jackson.map.ser.BeanSerializer.serialize(BeanSerializer.java:112)
~[jackson-mapper-asl-1.9.13.jar:1.9.13]
>         at org.codehaus.jackson.map.ser.StdSerializerProvider._serializeValue(StdSerializerProvider.java:610)
[jackson-mapper-asl-1.9.13.jar:1.9.13]
>         at brooklyn.rest.util.json.ConfigurableSerializerProvider._serializeValue(ConfigurableSerializerProvider.java:68)
~[brooklyn-rest-server-0.7.0-SNAPSHOT.jar:0.7.0-SNAPSHOT]
>         at org.codehaus.jackson.map.ser.StdSerializerProvider.serializeValue(StdSerializerProvider.java:256)
[jackson-mapper-asl-1.9.13.jar:1.9.13]
>         at org.codehaus.jackson.map.ObjectMapper.writeValue(ObjectMapper.java:1613) [jackson-mapper-asl-1.9.13.jar:1.9.13]
>         at org.codehaus.jackson.jaxrs.JacksonJsonProvider.writeTo(JacksonJsonProvider.java:559)
[jackson-jaxrs-1.9.13.jar:1.9.13]
>         at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:302)
[jersey-server-1.18.1.jar:1.18.1]
>         at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1510)
[jersey-server-1.18.1.jar:1.18.1]
>         at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)
[jersey-server-1.18.1.jar:1.18.1]
>         at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409)
[jersey-server-1.18.1.jar:1.18.1]
>         at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409)
[jersey-servlet-1.18.1.jar:1.18.1]
>         at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:540)
[jersey-servlet-1.18.1.jar:1.18.1]
>         at com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:909)
[jersey-servlet-1.18.1.jar:1.18.1]
>         at com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:857)
[jersey-servlet-1.18.1.jar:1.18.1]
>         at com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:811)
[jersey-servlet-1.18.1.jar:1.18.1]
>         at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1338)
[jetty-servlet-8.1.4.v20120524.jar:8.1.4.v20120524]
>         at brooklyn.rest.filter.HaMasterCheckFilter.doFilter(HaMasterCheckFilter.java:64)
[brooklyn-rest-server-0.7.0-SNAPSHOT.jar:0.7.0-SNAPSHOT]
>         at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1338)
[jetty-servlet-8.1.4.v20120524.jar:8.1.4.v20120524]
>         at brooklyn.rest.filter.LoggingFilter.doFilter(LoggingFilter.java:88) [brooklyn-rest-server-0.7.0-SNAPSHOT.jar:0.7.0-SNAPSHOT]
>         at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1338)
[jetty-servlet-8.1.4.v20120524.jar:8.1.4.v20120524]
>         at brooklyn.rest.filter.BrooklynPropertiesSecurityFilter.doFilter(BrooklynPropertiesSecurityFilter.java:122)
[brooklyn-rest-server-0.7.0-SNAPSHOT.jar:0.7.0-SNAPSHOT]
>         at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1338)
[jetty-servlet-8.1.4.v20120524.jar:8.1.4.v20120524]
>         at brooklyn.rest.filter.RequestTaggingFilter.doFilter(RequestTaggingFilter.java:48)
[brooklyn-rest-server-0.7.0-SNAPSHOT.jar:0.7.0-SNAPSHOT]
>         at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1338)
[jetty-servlet-8.1.4.v20120524.jar:8.1.4.v20120524]
>         at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:484)
[jetty-servlet-8.1.4.v20120524.jar:8.1.4.v20120524]
>         at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
[jetty-server-8.1.4.v20120524.jar:8.1.4.v20120524]
>         at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
[jetty-security-8.1.4.v20120524.jar:8.1.4.v20120524]
>         at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
[jetty-server-8.1.4.v20120524.jar:8.1.4.v20120524]
>         at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065)
[jetty-server-8.1.4.v20120524.jar:8.1.4.v20120524]
>         at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413)
[jetty-servlet-8.1.4.v20120524.jar:8.1.4.v20120524]
>         at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
[jetty-server-8.1.4.v20120524.jar:8.1.4.v20120524]
>         at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)
[jetty-server-8.1.4.v20120524.jar:8.1.4.v20120524]
>         at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
[jetty-server-8.1.4.v20120524.jar:8.1.4.v20120524]
>         at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
[jetty-server-8.1.4.v20120524.jar:8.1.4.v20120524]
>         at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
[jetty-server-8.1.4.v20120524.jar:8.1.4.v20120524]
>         at org.eclipse.jetty.server.Server.handle(Server.java:350) [jetty-server-8.1.4.v20120524.jar:8.1.4.v20120524]
>         at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)
[jetty-server-8.1.4.v20120524.jar:8.1.4.v20120524]
>         at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:890)
[jetty-server-8.1.4.v20120524.jar:8.1.4.v20120524]
>         at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:944)
[jetty-server-8.1.4.v20120524.jar:8.1.4.v20120524]
>         at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:630) [jetty-http-8.1.4.v20120524.jar:8.1.4.v20120524]
>         at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230) [jetty-http-8.1.4.v20120524.jar:8.1.4.v20120524]
>         at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77)
[jetty-server-8.1.4.v20120524.jar:8.1.4.v20120524]
>         at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:620)
[jetty-io-8.1.4.v20120524.jar:8.1.4.v20120524]
>         at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:46)
[jetty-io-8.1.4.v20120524.jar:8.1.4.v20120524]
>         at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:603)
[jetty-util-8.1.4.v20120524.jar:8.1.4.v20120524]
>         at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:538)
[jetty-util-8.1.4.v20120524.jar:8.1.4.v20120524]
>         at java.lang.Thread.run(Thread.java:745) [na:1.8.0_25]
> {noformat}
> It suggests to me a couple of problems:
> 1. that `HighAvailabilitySummary` is being created with a null key in its nodes map (I
presume?).
> 2. that we need to guard against this when creating the `HighAvailabilitySummary` object.
> I wonder if (1) is just transient - that we polled while the server was still coming
up. It happened within 2 seconds of us seeing the log for "Rebind complete (MASTER)", and
the log for "Started Brooklyn console at http://Aleds-MacBook-Pro.local:8082/".
> For (2), I am presuming it is `HighAvailabilitySummary.nodes` because the log warning
says its about that class, and the exception says it's a "Null key for a Map". In that class,
the only field of type map that could have a null value is `nodes`.
> The call was just being done by the web-console, so no harm done. If it had happened
for a customer's REST client then the consequences would have been worse.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message