java.lang.NullPointerException

Sonatype JIRA | Rich Seddon | 5 years ago
  1. 0

    When deploying an artifact with a POM with no parent or version (see attached) Nexus fails with an "unexpected error" message in the UI and the following stack trace in the logs: {noformat} 2011-09-28 09:49:47 WARN [-1778998154-428] - o.s.n.r.a.ArtifactC~ - java.lang.NullPointerException at java.util.regex.Matcher.getTextLength(Matcher.java:1140) at java.util.regex.Matcher.reset(Matcher.java:291) at java.util.regex.Matcher.<init>(Matcher.java:211) at java.util.regex.Pattern.matcher(Pattern.java:888) at org.apache.maven.index.artifact.VersionUtils.isSnapshot(VersionUtils.java:55) at org.sonatype.nexus.rest.artifact.AbstractArtifactPlexusResource.getResourceStoreRequest(AbstractArtifactPlexusResource.java:110) at org.sonatype.nexus.rest.artifact.AbstractArtifactPlexusResource.upload(AbstractArtifactPlexusResource.java:413) at org.sonatype.plexus.rest.resource.RestletResource.upload(RestletResource.java:361) at org.sonatype.plexus.rest.resource.RestletResource.acceptRepresentation(RestletResource.java:257) at org.sonatype.nexus.rest.NexusRestletResource.acceptRepresentation(NexusRestletResource.java:77) at org.restlet.resource.Resource.post(Resource.java:688) at org.restlet.resource.Resource.handlePost(Resource.java:537) at org.restlet.Finder.handle(Finder.java:357) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Router.handle(Router.java:504) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Router.handle(Router.java:504) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Filter.doHandle(Filter.java:150) ... {noformat} We should put a guard in for this.

    Sonatype JIRA | 5 years ago | Rich Seddon
    java.lang.NullPointerException
  2. 0

    When deploying an artifact with a POM with no parent or version (see attached) Nexus fails with an "unexpected error" message in the UI and the following stack trace in the logs: {noformat} 2011-09-28 09:49:47 WARN [-1778998154-428] - o.s.n.r.a.ArtifactC~ - java.lang.NullPointerException at java.util.regex.Matcher.getTextLength(Matcher.java:1140) at java.util.regex.Matcher.reset(Matcher.java:291) at java.util.regex.Matcher.<init>(Matcher.java:211) at java.util.regex.Pattern.matcher(Pattern.java:888) at org.apache.maven.index.artifact.VersionUtils.isSnapshot(VersionUtils.java:55) at org.sonatype.nexus.rest.artifact.AbstractArtifactPlexusResource.getResourceStoreRequest(AbstractArtifactPlexusResource.java:110) at org.sonatype.nexus.rest.artifact.AbstractArtifactPlexusResource.upload(AbstractArtifactPlexusResource.java:413) at org.sonatype.plexus.rest.resource.RestletResource.upload(RestletResource.java:361) at org.sonatype.plexus.rest.resource.RestletResource.acceptRepresentation(RestletResource.java:257) at org.sonatype.nexus.rest.NexusRestletResource.acceptRepresentation(NexusRestletResource.java:77) at org.restlet.resource.Resource.post(Resource.java:688) at org.restlet.resource.Resource.handlePost(Resource.java:537) at org.restlet.Finder.handle(Finder.java:357) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Router.handle(Router.java:504) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Router.handle(Router.java:504) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Filter.doHandle(Filter.java:150) ... {noformat} We should put a guard in for this.

    Sonatype JIRA | 5 years ago | Rich Seddon
    java.lang.NullPointerException
  3. 0

    Unbalanced parens cause NullPointerException

    GitHub | 4 years ago | yayitswei
    java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    NullPointerException in util/name-from-uri

    GitHub | 3 years ago | alexkalderimis
    java.lang.NullPointerException
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NullPointerException

    No message provided

    at java.util.regex.Matcher.getTextLength()
  2. Java RT
    Pattern.matcher
    1. java.util.regex.Matcher.getTextLength(Matcher.java:1140)
    2. java.util.regex.Matcher.reset(Matcher.java:291)
    3. java.util.regex.Matcher.<init>(Matcher.java:211)
    4. java.util.regex.Pattern.matcher(Pattern.java:888)
    4 frames
  3. Maven :: Indexer Artifact Utils
    VersionUtils.isSnapshot
    1. org.apache.maven.index.artifact.VersionUtils.isSnapshot(VersionUtils.java:55)
    1 frame
  4. Nexus Core
    AbstractArtifactPlexusResource.upload
    1. org.sonatype.nexus.rest.artifact.AbstractArtifactPlexusResource.getResourceStoreRequest(AbstractArtifactPlexusResource.java:110)
    2. org.sonatype.nexus.rest.artifact.AbstractArtifactPlexusResource.upload(AbstractArtifactPlexusResource.java:413)
    2 frames
  5. ${project.groupId}:${project.artifactId}
    RestletResource.acceptRepresentation
    1. org.sonatype.plexus.rest.resource.RestletResource.upload(RestletResource.java:361)
    2. org.sonatype.plexus.rest.resource.RestletResource.acceptRepresentation(RestletResource.java:257)
    2 frames
  6. Nexus Core
    NexusRestletResource.acceptRepresentation
    1. org.sonatype.nexus.rest.NexusRestletResource.acceptRepresentation(NexusRestletResource.java:77)
    1 frame
  7. org.restlet.resource
    Resource.handlePost
    1. org.restlet.resource.Resource.post(Resource.java:688)
    2. org.restlet.resource.Resource.handlePost(Resource.java:537)
    2 frames
  8. org.restlet
    Filter.doHandle
    1. org.restlet.Finder.handle(Finder.java:357)
    2. org.restlet.Filter.doHandle(Filter.java:150)
    3. org.restlet.Filter.handle(Filter.java:195)
    4. org.restlet.Router.handle(Router.java:504)
    5. org.restlet.Filter.doHandle(Filter.java:150)
    6. org.restlet.Filter.handle(Filter.java:195)
    7. org.restlet.Router.handle(Router.java:504)
    8. org.restlet.Filter.doHandle(Filter.java:150)
    9. org.restlet.Filter.handle(Filter.java:195)
    10. org.restlet.Filter.doHandle(Filter.java:150)
    10 frames