Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-18299

JsonSyntaxException attempting to create Webhook capability

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.14.0
    • Fix Version/s: 3.15.0
    • Component/s: Webhooks
    • Labels:

      Description

      Attempting to create either a Webhook:Repository or Webhook:Global capability fails with an error "Operation failed as server could not be contacted".

      2018-12-11 16:25:32,838+0000 ERROR [qtp283782253-64] admin com.softwarementors.extjs.djn.router.processor.standard.json.JsonRequestProcessor - (Controlled) server error: Failed attempt to convert from a json string to java method parameters. Method='capability_Capability.create', Json string='[{"id":"NX.coreui.model.Capability-1","typeId":"webhook.repository","notes":"","enabled":true,"properties":{"repository":"maven-releases","names":["asset","component"],"url":"http://requestbin.fullcontact.com/17pq6qh1","secret":""}}]', ExpectedTypes='org.sonatype.nexus.coreui.internal.capability.CapabilityXO' for Method 'capability_Capability.create'
      com.softwarementors.extjs.djn.gson.JsonException: Failed attempt to convert from a json string to java method parameters. Method='capability_Capability.create', Json string='[{"id":"NX.coreui.model.Capability-1","typeId":"webhook.repository","notes":"","enabled":true,"properties":{"repository":"maven-releases","names":["asset","component"],"url":"http://requestbin.fullcontact.com/17pq6qh1","secret":""}}]', ExpectedTypes='org.sonatype.nexus.coreui.internal.capability.CapabilityXO'
       at com.softwarementors.extjs.djn.gson.JsonException.forFailedConversionFromJsonStringToMethodParameters(JsonException.java:62)
       at com.softwarementors.extjs.djn.router.processor.standard.json.JsonRequestProcessor.jsonDataToMethodParameters(JsonRequestProcessor.java:273)
       at com.softwarementors.extjs.djn.router.processor.standard.json.JsonRequestProcessor.getIndividualRequestParameters(JsonRequestProcessor.java:255)
       at com.softwarementors.extjs.djn.router.processor.standard.json.JsonRequestProcessor.processIndividualRequest(JsonRequestProcessor.java:494)
       at com.softwarementors.extjs.djn.router.processor.standard.json.JsonRequestProcessor.processIndividualRequestsInThisThread(JsonRequestProcessor.java:150)
       at com.softwarementors.extjs.djn.router.processor.standard.json.JsonRequestProcessor.process(JsonRequestProcessor.java:133)
       at com.softwarementors.extjs.djn.router.RequestRouter.processJsonRequest(RequestRouter.java:83)
       at com.softwarementors.extjs.djn.servlet.DirectJNgineServlet.processRequest(DirectJNgineServlet.java:632)
       at com.softwarementors.extjs.djn.servlet.DirectJNgineServlet.doPost(DirectJNgineServlet.java:595)
       at org.sonatype.nexus.extdirect.internal.ExtDirectServlet.doPost(ExtDirectServlet.java:155)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
       at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:286)
       at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:276)
       at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:181)
       at com.google.inject.servlet.DynamicServletPipeline.service(DynamicServletPipeline.java:71)
       at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:85)
       at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:112)
       at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
       at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
       at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
       at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
       at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
       at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
       at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
       at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
       at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
       at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
       at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
       at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
       at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
       at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
       at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
       at org.sonatype.nexus.security.SecurityFilter.executeChain(SecurityFilter.java:85)
       at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
       at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
       at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
       at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
       at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
       at org.sonatype.nexus.security.SecurityFilter.doFilterInternal(SecurityFilter.java:101)
       at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
       at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
       at com.sonatype.nexus.licensing.internal.LicensingRedirectFilter.doFilter(LicensingRedirectFilter.java:108)
       at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
       at com.codahale.metrics.servlet.AbstractInstrumentedFilter.doFilter(AbstractInstrumentedFilter.java:97)
       at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
       at org.sonatype.nexus.internal.web.ErrorPageFilter.doFilter(ErrorPageFilter.java:68)
       at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
       at org.sonatype.nexus.internal.web.EnvironmentFilter.doFilter(EnvironmentFilter.java:101)
       at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
       at org.sonatype.nexus.internal.web.HeaderPatternFilter.doFilter(HeaderPatternFilter.java:98)
       at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
       at com.google.inject.servlet.DynamicFilterPipeline.dispatch(DynamicFilterPipeline.java:104)
       at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:135)
       at org.sonatype.nexus.bootstrap.osgi.DelegatingFilter.doFilter(DelegatingFilter.java:73)
       at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1634)
       at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
       at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
       at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
       at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
       at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
       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.HandlerWrapper.handle(HandlerWrapper.java:132)
       at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:175)
       at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)
       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)
      Caused by: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected STRING but was BEGIN_ARRAY
       at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:182)
       at com.google.gson.Gson.fromJson(Gson.java:810)
       at com.google.gson.Gson.fromJson(Gson.java:875)
       at com.softwarementors.extjs.djn.router.processor.standard.json.JsonRequestProcessor.jsonToJavaObject(JsonRequestProcessor.java:365)
       at com.softwarementors.extjs.djn.router.processor.standard.json.JsonRequestProcessor.getMethodParameters(JsonRequestProcessor.java:315)
       at com.softwarementors.extjs.djn.router.processor.standard.json.JsonRequestProcessor.jsonDataToMethodParameters(JsonRequestProcessor.java:269)
       ... 86 common frames omitted
      Caused by: java.lang.IllegalStateException: Expected STRING but was BEGIN_ARRAY
       at com.google.gson.internal.bind.JsonTreeReader.nextString(JsonTreeReader.java:154)
       at com.google.gson.internal.bind.TypeAdapters$13.read(TypeAdapters.java:358)
       at com.google.gson.internal.bind.TypeAdapters$13.read(TypeAdapters.java:346)
       at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40)
       at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:187)
       at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:145)
       at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:94)
       at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:178)
       ... 91 common frames omitted

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dbradicich Damian Bradicich
                Reporter:
                cseney Cassandra Seney
                CC:
                Sergey Zhukov
                Last Updated By:
                Peter Lynch
                Team:
                NXRM - Tron
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response: