Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-7890

JSON-related IT failures when upgrading sling.servlets to 2.1.34

    XMLWordPrintableJSON

    Details

      Description

      With the following change in the sling starter

      diff --git a/src/main/provisioning/sling.txt b/src/main/provisioning/sling.txt
      index 0f76c0b..4904fc3 100644
      --- a/src/main/provisioning/sling.txt
      +++ b/src/main/provisioning/sling.txt
      @@ -62,7 +62,7 @@
           org.apache.sling/org.apache.sling.resourceresolver/1.6.6
           org.apache.sling/org.apache.sling.serviceusermapper/1.4.0
           org.apache.sling/org.apache.sling.serviceuser.webconsole/1.0.0
      -    org.apache.sling/org.apache.sling.servlets.get/2.1.30
      +    org.apache.sling/org.apache.sling.servlets.get/2.1.34
           org.apache.sling/org.apache.sling.servlets.post/2.3.26
           org.apache.sling/org.apache.sling.servlets.resolver/2.4.22
           org.apache.sling/org.apache.sling.xss/2.0.12
      

      I get multiple IT failures, and the root cause seems top be

      java.lang.ClassCastException: org.apache.johnzon.core.JsonObjectImpl cannot be cast to javax.json.JsonArray
      	at org.apache.sling.servlets.get.impl.util.JsonToText.valueToString(JsonToText.java:164)
      	at org.apache.sling.servlets.get.impl.util.JsonToText.prettyPrint(JsonToText.java:209)
      	at org.apache.sling.servlets.get.impl.VersionInfoServlet.doGet(VersionInfoServlet.java:124)
      	at org.apache.sling.api.servlets.SlingSafeMethodsServlet.mayService(SlingSafeMethodsServlet.java:266)
      	at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:342)
      	at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:374)
      	at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:552)
      	at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:44)
      	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:82)
      	at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:282)
      	at org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:49)
      	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:82)
      	at org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:107)
      	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72)
      	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78)
      	at org.apache.sling.launchpad.testservices.filters.TestFilter.doFilter(TestFilter.java:47)
      	at org.apache.sling.launchpad.testservices.filters.NoPropertyFilter.doFilter(NoPropertyFilter.java:25)
      	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72)
      	at org.apache.sling.launchpad.testservices.filters.TestFilter.doFilter(TestFilter.java:47)
      	at org.apache.sling.launchpad.testservices.filters.SlingFilter.doFilter(SlingFilter.java:25)
      	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72)
      	at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:131)
      	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72)
      	at org.apache.sling.engine.impl.SlingRequestProcessorImpl.doProcessRequest(SlingRequestProcessorImpl.java:151)
      	at org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:234)
      	at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:120)
      	at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:86)
      	at org.apache.sling.junit.impl.servlet.TestLogServlet$TestNameLoggingFilter.doFilter(TestLogServlet.java:257)
      	at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
      	at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:81)
      	at org.apache.felix.http.sslfilter.internal.SslFilter.doFilter(SslFilter.java:96)
      	at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
      	at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:81)
      	at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:131)
      	at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
      	at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:81)
      	at org.apache.sling.engine.impl.log.RequestLoggerFilter.doFilter(RequestLoggerFilter.java:72)
      	at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
      	at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:81)
      	at org.apache.sling.engine.impl.parameters.RequestParameterSupportConfigurer.doFilter(RequestParameterSupportConfigurer.java:63)
      	at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
      	at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:81)
      	at org.apache.felix.http.base.internal.dispatch.Dispatcher$1.doFilter(Dispatcher.java:146)
      	at org.apache.felix.http.base.internal.whiteboard.WhiteboardManager.invokePreprocessors(WhiteboardManager.java:1000)
      	at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:91)
      	at org.apache.felix.http.base.internal.dispatch.DispatcherServlet.service(DispatcherServlet.java:49)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
      	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1317)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1219)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
      	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:219)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
      	at org.eclipse.jetty.server.Server.handle(Server.java:531)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:352)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)
      	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:281)
      	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)
      	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
      	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:762)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:680)
      	at java.lang.Thread.run(Thread.java:748)

      .

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jebailey Jason E Bailey
                Reporter:
                rombert Robert Munteanu
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: