java.lang.IllegalArgumentException: Illegal group reference

Sonatype JIRA | Deleted User | 7 years ago
  1. 0

    Maintaining a Nexus installation at our site I received an from a user who complained that he no longer has sufficient rights to update artifacts. I don't know the error message the user received but from the logs (see below) I guess the problem is that the artifact and/or group name accidently contains a $ character that will result in an exception. Maybe Nexus should properly quote/escape artifact and group names or come up with useful waring or both. .thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:522) 2009-06-16 08:34:25 ERROR [qtp0-449 ] - org.mortbay.log - /content/groups/public/com/example/${foo.name}/${foo.version}/${foo.name}-${foo.version}.pom java.lang.IllegalArgumentException: Illegal group reference at java.util.regex.Matcher.appendReplacement(Matcher.java:713) at java.util.regex.Matcher.replaceAll(Matcher.java:813) at java.lang.String.replaceAll(String.java:2190) at org.sonatype.nexus.security.filter.authz.NexusTargetMappingAuthorizationFilter.getResourceStorePath(NexusTargetMappingAuthorizationFilter.java:95) at org.sonatype.nexus.security.filter.authz.NexusTargetMappingAuthorizationFilter.getResourceStoreRequest(NexusTargetMappingAuthorizationFilter.java:116) at org.sonatype.nexus.security.filter.authz.NexusTargetMappingAuthorizationFilter.isAccessAllowed(NexusTargetMappingAuthorizationFilter.java:189) at org.jsecurity.web.filter.AccessControlFilter.onPreHandle(AccessControlFilter.java:145) at org.jsecurity.web.filter.PathMatchingFilter.preHandle(PathMatchingFilter.java:175) at org.jsecurity.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:129) at org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180) at org.jsecurity.web.servlet.FilterChainWrapper.doFilter(FilterChainWrapper.java:57) at org.jsecurity.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:105) at org.jsecurity.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:135) at org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180) at org.jsecurity.web.servlet.FilterChainWrapper.doFilter(FilterChainWrapper.java:57) at org.jsecurity.web.servlet.JSecurityFilter.doFilterInternal(JSecurityFilter.java:382) at org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1115) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:361) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:864) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:533) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:207) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:522)

    Sonatype JIRA | 7 years ago | Deleted User
    java.lang.IllegalArgumentException: Illegal group reference
  2. 0

    Maintaining a Nexus installation at our site I received an from a user who complained that he no longer has sufficient rights to update artifacts. I don't know the error message the user received but from the logs (see below) I guess the problem is that the artifact and/or group name accidently contains a $ character that will result in an exception. Maybe Nexus should properly quote/escape artifact and group names or come up with useful waring or both. .thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:522) 2009-06-16 08:34:25 ERROR [qtp0-449 ] - org.mortbay.log - /content/groups/public/com/example/${foo.name}/${foo.version}/${foo.name}-${foo.version}.pom java.lang.IllegalArgumentException: Illegal group reference at java.util.regex.Matcher.appendReplacement(Matcher.java:713) at java.util.regex.Matcher.replaceAll(Matcher.java:813) at java.lang.String.replaceAll(String.java:2190) at org.sonatype.nexus.security.filter.authz.NexusTargetMappingAuthorizationFilter.getResourceStorePath(NexusTargetMappingAuthorizationFilter.java:95) at org.sonatype.nexus.security.filter.authz.NexusTargetMappingAuthorizationFilter.getResourceStoreRequest(NexusTargetMappingAuthorizationFilter.java:116) at org.sonatype.nexus.security.filter.authz.NexusTargetMappingAuthorizationFilter.isAccessAllowed(NexusTargetMappingAuthorizationFilter.java:189) at org.jsecurity.web.filter.AccessControlFilter.onPreHandle(AccessControlFilter.java:145) at org.jsecurity.web.filter.PathMatchingFilter.preHandle(PathMatchingFilter.java:175) at org.jsecurity.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:129) at org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180) at org.jsecurity.web.servlet.FilterChainWrapper.doFilter(FilterChainWrapper.java:57) at org.jsecurity.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:105) at org.jsecurity.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:135) at org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180) at org.jsecurity.web.servlet.FilterChainWrapper.doFilter(FilterChainWrapper.java:57) at org.jsecurity.web.servlet.JSecurityFilter.doFilterInternal(JSecurityFilter.java:382) at org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1115) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:361) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:864) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:533) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:207) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:522)

    Sonatype JIRA | 7 years ago | Deleted User
    java.lang.IllegalArgumentException: Illegal group reference
  3. 0

    {code} 2009-10-23 01:32:04 INFO [qtp-9293149-603] - o.s.n.s.f.a.NexusSe~ - Successfully authenticated user [gluck] from IP Address 64.95.112.232 2009-10-23 01:44:38 ERROR [qtp-9293149-623] - org.mortbay.log - /content/repositories/plexus-snapshots/javax/el/el-api/2.1.2-SNAPSHOT/el-api-2.1.2-SNAPSHOT.pom org.jsecurity.session.InvalidSessionException: java.lang.IllegalStateException at org.jsecurity.web.session.WebSession.setAttribute(WebSession.java:154) at org.jsecurity.session.ProxiedSession.setAttribute(ProxiedSession.java:149) at org.jsecurity.web.DefaultWebSecurityManager.bind(DefaultWebSecurityManager.java:243) at org.jsecurity.web.DefaultWebSecurityManager.bind(DefaultWebSecurityManager.java:235) at org.jsecurity.mgt.DefaultSecurityManager.getSubject(DefaultSecurityManager.java:418) at org.jsecurity.mgt.DefaultSecurityManager.getSubject(DefaultSecurityManager.java:424) at org.jsecurity.web.servlet.JSecurityFilter.doFilterInternal(JSecurityFilter.java:367) at org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1148) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:387) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:864) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520) Caused by: java.lang.IllegalStateException at org.mortbay.jetty.servlet.AbstractSessionManager$Session.setAttribute(AbstractSessionManager.java:1054) at org.jsecurity.web.session.WebSession.setAttribute(WebSession.java:152) ... 23 more 2009-10-23 02:43:33 ERROR [qtp-9293149-679] - org.mortbay.log - /content/repositories/plexus-releases/${project/groupId}/persistence/${project.version}/persistence-${project.version}.pom java.lang.IllegalArgumentException: Illegal group reference at java.util.regex.Matcher.appendReplacement(Matcher.java:713) at java.util.regex.Matcher.replaceAll(Matcher.java:813) at java.lang.String.replaceAll(String.java:2189) at org.sonatype.nexus.security.filter.authz.NexusTargetMappingAuthorizationFilter.getResourceStorePath(NexusTargetMappingAuthorizationFilter.java:70) at org.sonatype.nexus.security.filter.authz.NexusTargetMappingAuthorizationFilter.getResourceStoreRequest(NexusTargetMappingAuthorizationFilter.java:91) at org.sonatype.nexus.security.filter.authz.NexusTargetMappingAuthorizationFilter.isAccessAllowed(NexusTargetMappingAuthorizationFilter.java:150) at org.jsecurity.web.filter.AccessControlFilter.onPreHandle(AccessControlFilter.java:145) at org.jsecurity.web.filter.PathMatchingFilter.preHandle(PathMatchingFilter.java:175) at org.jsecurity.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:129) at org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180) at org.jsecurity.web.servlet.FilterChainWrapper.doFilter(FilterChainWrapper.java:57) at org.jsecurity.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:105) at org.jsecurity.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:135) at org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180) at org.jsecurity.web.servlet.FilterChainWrapper.doFilter(FilterChainWrapper.java:57) at org.jsecurity.web.servlet.JSecurityFilter.doFilterInternal(JSecurityFilter.java:382) at org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1148) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:387) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:864) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520) {code}

    Sonatype JIRA | 7 years ago | Rich Seddon
    java.lang.IllegalArgumentException: Illegal group reference
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Java String ReplaceAll and ReplaceFirst Fails at $ Symbol at Replacement Text

    Stack Overflow | 4 years ago | kamaci
    java.lang.IllegalArgumentException: Illegal group reference
  6. 0

    Tech 1.0 Blog: JAVA: illegal group reference

    priyankgandhi.com | 1 year ago
    java.lang.IllegalArgumentException: Illegal group reference

  1. treanz 1 times, last 5 months ago
  2. Larten 2 times, last 9 months ago
8 unregistered visitors
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.IllegalArgumentException

    Illegal group reference

    at java.util.regex.Matcher.appendReplacement()
  2. Java RT
    String.replaceAll
    1. java.util.regex.Matcher.appendReplacement(Matcher.java:713)
    2. java.util.regex.Matcher.replaceAll(Matcher.java:813)
    3. java.lang.String.replaceAll(String.java:2190)
    3 frames
  3. Nexus Core
    NexusTargetMappingAuthorizationFilter.isAccessAllowed
    1. org.sonatype.nexus.security.filter.authz.NexusTargetMappingAuthorizationFilter.getResourceStorePath(NexusTargetMappingAuthorizationFilter.java:95)
    2. org.sonatype.nexus.security.filter.authz.NexusTargetMappingAuthorizationFilter.getResourceStoreRequest(NexusTargetMappingAuthorizationFilter.java:116)
    3. org.sonatype.nexus.security.filter.authz.NexusTargetMappingAuthorizationFilter.isAccessAllowed(NexusTargetMappingAuthorizationFilter.java:189)
    3 frames
  4. org.jsecurity.web
    OncePerRequestFilter.doFilter
    1. org.jsecurity.web.filter.AccessControlFilter.onPreHandle(AccessControlFilter.java:145)
    2. org.jsecurity.web.filter.PathMatchingFilter.preHandle(PathMatchingFilter.java:175)
    3. org.jsecurity.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:129)
    4. org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180)
    5. org.jsecurity.web.servlet.FilterChainWrapper.doFilter(FilterChainWrapper.java:57)
    6. org.jsecurity.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:105)
    7. org.jsecurity.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:135)
    8. org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180)
    9. org.jsecurity.web.servlet.FilterChainWrapper.doFilter(FilterChainWrapper.java:57)
    10. org.jsecurity.web.servlet.JSecurityFilter.doFilterInternal(JSecurityFilter.java:382)
    11. org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180)
    11 frames
  5. Jetty Server
    SelectChannelEndPoint.run
    1. org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1115)
    2. org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:361)
    3. org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    4. org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
    5. org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
    6. org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
    7. org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
    8. org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    9. org.mortbay.jetty.Server.handle(Server.java:324)
    10. org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534)
    11. org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:864)
    12. org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:533)
    13. org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:207)
    14. org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403)
    15. org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
    15 frames
  6. Jetty Util
    QueuedThreadPool$PoolThread.run
    1. org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:522)
    1 frame