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

Nexus 2 ArrayIndexOutOfBoundsException when parsing POM on upload

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.14.3, 2.14.11
    • Fix Version/s: None
    • Component/s: Maven
    • Labels:

      Description

      Deploy fails when parsing (large) pom due to ArrayIndexOutOfBoundsException:

      jvm 1    | 2018-11-22 17:04:32,388-0400 ERROR [esh-1-thread-10] admin org.sonatype.nexus.index.events.IndexerManagerEventInspector - Could not maintain index for repository releases!
      jvm 1    | java.lang.ArrayIndexOutOfBoundsException: 8213
      jvm 1    | 	at org.codehaus.plexus.util.xml.pull.MXParser.parsePI(MXParser.java:2502)
      jvm 1    | 	at org.codehaus.plexus.util.xml.pull.MXParser.nextImpl(MXParser.java:1283)
      jvm 1    | 	at org.codehaus.plexus.util.xml.pull.MXParser.next(MXParser.java:1131)
      jvm 1    | 	at org.codehaus.plexus.util.xml.Xpp3DomBuilder.build(Xpp3DomBuilder.java:192)
      jvm 1    | 	at org.codehaus.plexus.util.xml.Xpp3DomBuilder.build(Xpp3DomBuilder.java:77)
      jvm 1    | 	at org.codehaus.plexus.util.xml.Xpp3DomBuilder.build(Xpp3DomBuilder.java:40)
      jvm 1    | 	at org.apache.maven.index.ArtifactContext$ModelReader.readPomInputStream(ArtifactContext.java:247)
      jvm 1    | 	at org.apache.maven.index.ArtifactContext$ModelReader.readModel(ArtifactContext.java:212)
      jvm 1    | 	at org.apache.maven.index.locator.ArtifactLocator.locate(ArtifactLocator.java:59)
      jvm 1    | 	at org.apache.maven.index.DefaultArtifactContextProducer.getArtifactContext(DefaultArtifactContextProducer.java:87)
      jvm 1    | 	at org.sonatype.nexus.index.mindexer.NexusArtifactContextProducer.getArtifactContext(NexusArtifactContextProducer.java:65)
      jvm 1    | 	at org.sonatype.nexus.index.DefaultIndexerManager.addItemToIndex(DefaultIndexerManager.java:763)
      jvm 1    | 	at org.sonatype.nexus.index.DefaultIndexerManager.access$800(DefaultIndexerManager.java:188)
      jvm 1    | 	at org.sonatype.nexus.index.DefaultIndexerManager$5.run(DefaultIndexerManager.java:739)
      jvm 1    | 	at org.sonatype.nexus.index.DefaultIndexerManager.sharedSingle(DefaultIndexerManager.java:2320)
      jvm 1    | 	at org.sonatype.nexus.index.DefaultIndexerManager.addItemToIndex(DefaultIndexerManager.java:733)
      jvm 1    | 	at org.sonatype.nexus.index.events.IndexerManagerEventInspector.inspectForIndexerManager(IndexerManagerEventInspector.java:94)
      jvm 1    | 	at org.sonatype.nexus.index.events.IndexerManagerEventInspector.on(IndexerManagerEventInspector.java:73)
      jvm 1    | 	at sun.reflect.GeneratedMethodAccessor37.invoke(Unknown Source)
      jvm 1    | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      jvm 1    | 	at java.lang.reflect.Method.invoke(Method.java:498)
      jvm 1    | 	at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
      jvm 1    | 	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
      jvm 1    | 	at com.google.common.eventbus.AsyncEventBus.access$001(AsyncEventBus.java:34)
      jvm 1    | 	at com.google.common.eventbus.AsyncEventBus$1.run(AsyncEventBus.java:117)
      jvm 1    | 	at org.sonatype.nexus.threads.MDCAwareRunnable.run(MDCAwareRunnable.java:41)
      jvm 1    | 	at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120)
      jvm 1    | 	at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108)
      jvm 1    | 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      jvm 1    | 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      jvm 1    | 	at java.lang.Thread.run(Thread.java:748)
      jvm 1    | 2018-11-22 17:05:43,658-0400 INFO  [qtp963770833-91] admin org.sonatype.nexus.configuration.application.DefaultNexusConfiguration - Applying Nexus Configuration due to changes in [Releases] made by admin...
      jvm 1    | 2018-11-22 17:05:58,780-0400 WARN  [qtp963770833-90] admin org.sonatype.nexus.rest.artifact.ArtifactContentPlexusResource - 8213
      jvm 1    | java.lang.ArrayIndexOutOfBoundsException: 8213
      jvm 1    | 	at org.codehaus.plexus.util.xml.pull.MXParser.parsePI(MXParser.java:2502)
      jvm 1    | 	at org.codehaus.plexus.util.xml.pull.MXParser.nextImpl(MXParser.java:1283)
      jvm 1    | 	at org.codehaus.plexus.util.xml.pull.MXParser.next(MXParser.java:1131)
      jvm 1    | 	at org.sonatype.nexus.rest.artifact.PomArtifactManager.parsePom(PomArtifactManager.java:205)
      jvm 1    | 	at org.sonatype.nexus.rest.artifact.PomArtifactManager.getArtifactCoordinateFromTempPomFile(PomArtifactManager.java:102)
      jvm 1    | 	at org.sonatype.nexus.rest.artifact.AbstractArtifactPlexusResource.upload(AbstractArtifactPlexusResource.java:326)
      jvm 1    | 	at org.sonatype.plexus.rest.resource.RestletResource.upload(RestletResource.java:350)
      jvm 1    | 	at org.sonatype.plexus.rest.resource.RestletResource.acceptRepresentation(RestletResource.java:250)
      jvm 1    | 	at org.sonatype.nexus.rest.NexusRestletResource.acceptRepresentation(NexusRestletResource.java:70)
      jvm 1    | 	at org.restlet.resource.Resource.post(Resource.java:688)
      jvm 1    | 	at org.restlet.resource.Resource.handlePost(Resource.java:537)
      jvm 1    | 	at org.restlet.Finder.handle(Finder.java:357)
      jvm 1    | 	at org.restlet.Filter.doHandle(Filter.java:150)
      jvm 1    | 	at org.restlet.Filter.handle(Filter.java:195)
      jvm 1    | 	at org.restlet.Router.handle(Router.java:504)
      jvm 1    | 	at org.restlet.Filter.doHandle(Filter.java:150)
      jvm 1    | 	at org.restlet.Filter.handle(Filter.java:195)
      jvm 1    | 	at org.restlet.Filter.doHandle(Filter.java:150)
      jvm 1    | 	at org.sonatype.plexus.rest.RetargetableRestlet.doHandle(RetargetableRestlet.java:36)
      jvm 1    | 	at org.restlet.Filter.handle(Filter.java:195)
      jvm 1    | 	at org.restlet.Filter.doHandle(Filter.java:150)
      jvm 1    | 	at org.restlet.Filter.handle(Filter.java:195)
      jvm 1    | 	at org.restlet.Filter.doHandle(Filter.java:150)
      jvm 1    | 	at org.restlet.Filter.handle(Filter.java:195)
      jvm 1    | 	at org.restlet.Filter.doHandle(Filter.java:150)
      jvm 1    | 	at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:130)
      jvm 1    | 	at org.restlet.Filter.handle(Filter.java:195)
      jvm 1    | 	at org.restlet.Filter.doHandle(Filter.java:150)
      jvm 1    | 	at org.restlet.Filter.handle(Filter.java:195)
      jvm 1    | 	at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124)
      jvm 1    | 	at com.noelios.restlet.application.ApplicationHelper.handle(ApplicationHelper.java:112)
      jvm 1    | 	at org.restlet.Application.handle(Application.java:341)
      jvm 1    | 	at org.restlet.Filter.doHandle(Filter.java:150)
      jvm 1    | 	at org.restlet.Filter.handle(Filter.java:195)
      jvm 1    | 	at org.restlet.Router.handle(Router.java:504)
      jvm 1    | 	at org.restlet.Filter.doHandle(Filter.java:150)
      jvm 1    | 	at org.restlet.Filter.handle(Filter.java:195)
      jvm 1    | 	at org.restlet.Router.handle(Router.java:504)
      jvm 1    | 	at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124)
      jvm 1    | 	at org.restlet.Component.handle(Component.java:676)
      jvm 1    | 	at org.restlet.Server.handle(Server.java:331)
      jvm 1    | 	at com.noelios.restlet.ServerHelper.handle(ServerHelper.java:68)
      jvm 1    | 	at com.noelios.restlet.http.HttpServerHelper.handle(HttpServerHelper.java:147)
      jvm 1    | 	at com.noelios.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:881)
      jvm 1    | 	at org.sonatype.nexus.restlet1x.internal.RestletServlet.service(RestletServlet.java:93)
      jvm 1    | 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
      jvm 1    | 	at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:297)
      jvm 1    | 	at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:281)
      jvm 1    | 	at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:186)
      jvm 1    | 	at com.google.inject.servlet.AbstractServletPipeline.service(AbstractServletPipeline.java:65)
      jvm 1    | 	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:85)
      jvm 1    | 	at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
      jvm 1    | 	at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
      jvm 1    | 	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
      jvm 1    | 	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
      jvm 1    | 	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:112)
      jvm 1    | 	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
      jvm 1    | 	at com.google.inject.servlet.AbstractFilterPipeline.dispatch(AbstractFilterPipeline.java:100)
      jvm 1    | 	at org.sonatype.nexus.web.internal.NexusGuiceFilter$MultiFilterChain.doFilter(NexusGuiceFilter.java:82)
      jvm 1    | 	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:89)
      jvm 1    | 	at com.sonatype.nexus.analytics.internal.RestRequestCollector.doFilter(RestRequestCollector.java:81)
      jvm 1    | 	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
      jvm 1    | 	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
      jvm 1    | 	at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
      jvm 1    | 	at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
      jvm 1    | 	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
      jvm 1    | 	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
      jvm 1    | 	at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
      jvm 1    | 	at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
      jvm 1    | 	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
      jvm 1    | 	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
      jvm 1    | 	at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
      jvm 1    | 	at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
      jvm 1    | 	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
      jvm 1    | 	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
      jvm 1    | 	at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
      jvm 1    | 	at org.sonatype.nexus.web.internal.SecurityFilter.executeChain(SecurityFilter.java:90)
      jvm 1    | 	at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
      jvm 1    | 	at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
      jvm 1    | 	at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
      jvm 1    | 	at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
      jvm 1    | 	at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
      jvm 1    | 	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
      jvm 1    | 	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
      jvm 1    | 	at com.google.inject.servlet.AbstractFilterPipeline.dispatch(AbstractFilterPipeline.java:100)
      jvm 1    | 	at org.sonatype.nexus.web.internal.NexusGuiceFilter$MultiFilterChain.doFilter(NexusGuiceFilter.java:82)
      jvm 1    | 	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:89)
      jvm 1    | 	at com.google.inject.servlet.AbstractFilterPipeline.dispatch(AbstractFilterPipeline.java:100)
      jvm 1    | 	at org.sonatype.nexus.web.internal.NexusGuiceFilter$MultiFilterChain.doFilter(NexusGuiceFilter.java:82)
      jvm 1    | 	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:89)
      jvm 1    | 	at com.sonatype.nexus.licensing.internal.LicensingRedirectFilter.doFilter(LicensingRedirectFilter.java:135)
      jvm 1    | 	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
      jvm 1    | 	at com.google.inject.servlet.AbstractFilterPipeline.dispatch(AbstractFilterPipeline.java:100)
      jvm 1    | 	at org.sonatype.nexus.web.internal.NexusGuiceFilter$MultiFilterChain.doFilter(NexusGuiceFilter.java:82)
      jvm 1    | 	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:89)
      jvm 1    | 	at com.yammer.metrics.web.WebappMetricsFilter.doFilter(WebappMetricsFilter.java:76)
      jvm 1    | 	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
      jvm 1    | 	at org.sonatype.nexus.web.internal.CommonHeadersFilter.doFilter(CommonHeadersFilter.java:69)
      jvm 1    | 	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
      jvm 1    | 	at org.sonatype.nexus.web.internal.ErrorPageFilter.doFilter(ErrorPageFilter.java:71)
      jvm 1    | 	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
      jvm 1    | 	at org.sonatype.nexus.web.internal.BaseUrlHolderFilter.doFilter(BaseUrlHolderFilter.java:66)
      jvm 1    | 	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
      jvm 1    | 	at org.sonatype.nexus.web.internal.HeaderPatternFilter.doFilter(HeaderPatternFilter.java:96)
      jvm 1    | 	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
      jvm 1    | 	at com.google.inject.servlet.AbstractFilterPipeline.dispatch(AbstractFilterPipeline.java:100)
      jvm 1    | 	at org.sonatype.nexus.web.internal.NexusGuiceFilter$MultiFilterChain.doFilter(NexusGuiceFilter.java:82)
      jvm 1    | 	at org.sonatype.nexus.web.internal.NexusGuiceFilter$MultiFilterPipeline.dispatch(NexusGuiceFilter.java:56)
      jvm 1    | 	at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:133)
      jvm 1    | 	at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:130)
      jvm 1    | 	at com.google.inject.servlet.GuiceFilter$Context.call(GuiceFilter.java:203)
      jvm 1    | 	at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:130)
      jvm 1    | 	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1476)
      jvm 1    | 	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501)
      jvm 1    | 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
      jvm 1    | 	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
      jvm 1    | 	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
      jvm 1    | 	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
      jvm 1    | 	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429)
      jvm 1    | 	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
      jvm 1    | 	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
      jvm 1    | 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
      jvm 1    | 	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
      jvm 1    | 	at com.yammer.metrics.jetty.InstrumentedHandler.handle(InstrumentedHandler.java:200)
      jvm 1    | 	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
      jvm 1    | 	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
      jvm 1    | 	at org.eclipse.jetty.server.Server.handle(Server.java:370)
      jvm 1    | 	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
      jvm 1    | 	at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)
      jvm 1    | 	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)
      jvm 1    | 	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
      jvm 1    | 	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
      jvm 1    | 	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
      jvm 1    | 	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)
      jvm 1    | 	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)
      jvm 1    | 	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
      jvm 1    | 	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
      jvm 1    | 	at java.lang.Thread.run(Thread.java:748)
      

      Reproduce

      To reproduce, select the default "releases" Maven 2 hosted repository in Nexus 2, and then select the Upload tab.

      Choose Gav Definition: From POM and choose the pom.xml attached to this ticket. Click Upload Artifact(s) button. You get an error message in the UI and the logged error as above.

      Diagnosis

      Looks to be related/caused by https://issues.apache.org/jira/browse/MNG-6216 and https://github.com/codehaus-plexus/plexus-utils/issues/22 and an update is needed to plexus-util 3.1.0

      Workaround

      Nexus 3 does not have this problem as of the fix version for NEXUS-18196

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              huk-coburg-01 Christian Haeussler
              Last Updated By:
              Hardeep Nagra Hardeep Nagra
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title