com.atlassian.crucible.spi.services.PatchAnchorFailedException: Unable to anchor patch [CR-25-patch-0.txt] to repository [BiitMercurial]: Crucible tried to anchor your patch to 'BiitMercurial', but did not find any matching paths.

Atlassian JIRA | Kah Loun Foong [Atlassian] | 3 years ago
  1. 0

    h3.Steps to reproduce: # Open a Project # Add a new file (example, test.sh) anywhere within the project # Create a pre-commit review with Mercurial (our chosen version control system) by selecting the file -> Mercurial -> Commit -> Crucible Pre-Commit-Review. # Add a comment and commit to the default project in Mercurial. This fails with the following error in IntelliJ: {noformat} com.atlassian.theplugin.commons.remoteapi.RemoteApiException: Server returned HTTP 500 (Internal Server Error) Reason: Message: Unable to anchor patch [CR-25-patch-0.txt] to repository [BiitMercurial]: Crucible tried to anchor your patch to 'BiitMercurial', but did not find any matching paths. at com.atlassian.theplugin.commons.remoteapi.rest.AbstractHttpSession.buildExceptionText(AbstractHttpSession.java:639) at com.atlassian.theplugin.commons.remoteapi.rest.AbstractHttpSession.retrievePostResponseInternalImpl(AbstractHttpSession.java:458) at com.atlassian.theplugin.commons.remoteapi.rest.AbstractHttpSession.retrievePostResponseInternal(AbstractHttpSession.java:373) {noformat} FishEye log: {noformat} 2013-08-26 15:49:26,334 DEBUG [btpool0-12 ] fisheye ProfilingServletFilter-logRequest - end request POST /rest-service/auth-v1/login?userName=admin&password=XXXX sessionid=4c6nkowhlnx3dse9jesa1tqi 2013-08-26 15:49:26,341 DEBUG [btpool0-12 ] fisheye ProfilingServletFilter-logRequest - start request POST /rest-service/reviews-v1 sessionid=4c6nkowhlnx3dse9jesa1tqi 2013-08-26 15:49:26,806 DEBUG [btpool0-12 ] fisheye RepositoryHandle-acquire - acquire engine on BiitMercurial, count=1 2013-08-26 15:49:26,807 WARN [btpool0-12 ] fisheye TxHelper-rollbackTxIfNotCommitted - Rolled back transaction started from: -> com.atlassian.fisheye.spi.impl.DefaultTxTemplate.execute(DefaultTxTemplate.java:122) -> com.atlassian.fisheye.spi.impl.DefaultTxTemplate.execute(DefaultTxTemplate.java:114) -> sun.reflect.GeneratedMethodAccessor167.invoke(Unknown Source) -> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) -> java.lang.reflect.Method.invoke(Method.java:597) 2013-08-26 15:49:26,808 ERROR [btpool0-12 ] com.atlassian.plugins.rest.common.error.jersey.ThrowableExceptionMapper ThrowableExceptionMapper-toResponse - Uncaught exception thrown by REST service com.atlassian.crucible.spi.services.PatchAnchorFailedException: Unable to anchor patch [CR-25-patch-0.txt] to repository [BiitMercurial]: Crucible tried to anchor your patch to 'BiitMercurial', but did not find any matching paths. at com.atlassian.crucible.spi.impl.DefaultReviewService.doSearchAndSetAnchor(DefaultReviewService.java:300) at com.atlassian.crucible.spi.impl.DefaultReviewService.tryAnchorPatch(DefaultReviewService.java:279) at com.atlassian.crucible.spi.impl.DefaultReviewService.access$400(DefaultReviewService.java:142) at com.atlassian.crucible.spi.impl.DefaultReviewService$7.doInTransaction(DefaultReviewService.java:675) at com.atlassian.crucible.spi.impl.DefaultReviewService$7.doInTransaction(DefaultReviewService.java:661) at com.atlassian.fisheye.spi.impl.DefaultTxTemplate.execute(DefaultTxTemplate.java:126) at com.atlassian.fisheye.spi.impl.DefaultTxTemplate.execute(DefaultTxTemplate.java:114) at sun.reflect.GeneratedMethodAccessor167.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) {noformat} Tested uploading the patch file manually to the same review in the UI able to anchor to the repository BiitMercurial. Tested REST API to add the patch file but unable to reproduce the same error in the log. The patch is able to anchor to the repository but not added in the list of file in the review.

    Atlassian JIRA | 3 years ago | Kah Loun Foong [Atlassian]
    com.atlassian.crucible.spi.services.PatchAnchorFailedException: Unable to anchor patch [CR-25-patch-0.txt] to repository [BiitMercurial]: Crucible tried to anchor your patch to 'BiitMercurial', but did not find any matching paths.
  2. 0

    h3.Steps to reproduce: # Open a Project # Add a new file (example, test.sh) anywhere within the project # Create a pre-commit review with Mercurial (our chosen version control system) by selecting the file -> Mercurial -> Commit -> Crucible Pre-Commit-Review. # Add a comment and commit to the default project in Mercurial. This fails with the following error in IntelliJ: {noformat} com.atlassian.theplugin.commons.remoteapi.RemoteApiException: Server returned HTTP 500 (Internal Server Error) Reason: Message: Unable to anchor patch [CR-25-patch-0.txt] to repository [BiitMercurial]: Crucible tried to anchor your patch to 'BiitMercurial', but did not find any matching paths. at com.atlassian.theplugin.commons.remoteapi.rest.AbstractHttpSession.buildExceptionText(AbstractHttpSession.java:639) at com.atlassian.theplugin.commons.remoteapi.rest.AbstractHttpSession.retrievePostResponseInternalImpl(AbstractHttpSession.java:458) at com.atlassian.theplugin.commons.remoteapi.rest.AbstractHttpSession.retrievePostResponseInternal(AbstractHttpSession.java:373) {noformat} FishEye log: {noformat} 2013-08-26 15:49:26,334 DEBUG [btpool0-12 ] fisheye ProfilingServletFilter-logRequest - end request POST /rest-service/auth-v1/login?userName=admin&password=XXXX sessionid=4c6nkowhlnx3dse9jesa1tqi 2013-08-26 15:49:26,341 DEBUG [btpool0-12 ] fisheye ProfilingServletFilter-logRequest - start request POST /rest-service/reviews-v1 sessionid=4c6nkowhlnx3dse9jesa1tqi 2013-08-26 15:49:26,806 DEBUG [btpool0-12 ] fisheye RepositoryHandle-acquire - acquire engine on BiitMercurial, count=1 2013-08-26 15:49:26,807 WARN [btpool0-12 ] fisheye TxHelper-rollbackTxIfNotCommitted - Rolled back transaction started from: -> com.atlassian.fisheye.spi.impl.DefaultTxTemplate.execute(DefaultTxTemplate.java:122) -> com.atlassian.fisheye.spi.impl.DefaultTxTemplate.execute(DefaultTxTemplate.java:114) -> sun.reflect.GeneratedMethodAccessor167.invoke(Unknown Source) -> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) -> java.lang.reflect.Method.invoke(Method.java:597) 2013-08-26 15:49:26,808 ERROR [btpool0-12 ] com.atlassian.plugins.rest.common.error.jersey.ThrowableExceptionMapper ThrowableExceptionMapper-toResponse - Uncaught exception thrown by REST service com.atlassian.crucible.spi.services.PatchAnchorFailedException: Unable to anchor patch [CR-25-patch-0.txt] to repository [BiitMercurial]: Crucible tried to anchor your patch to 'BiitMercurial', but did not find any matching paths. at com.atlassian.crucible.spi.impl.DefaultReviewService.doSearchAndSetAnchor(DefaultReviewService.java:300) at com.atlassian.crucible.spi.impl.DefaultReviewService.tryAnchorPatch(DefaultReviewService.java:279) at com.atlassian.crucible.spi.impl.DefaultReviewService.access$400(DefaultReviewService.java:142) at com.atlassian.crucible.spi.impl.DefaultReviewService$7.doInTransaction(DefaultReviewService.java:675) at com.atlassian.crucible.spi.impl.DefaultReviewService$7.doInTransaction(DefaultReviewService.java:661) at com.atlassian.fisheye.spi.impl.DefaultTxTemplate.execute(DefaultTxTemplate.java:126) at com.atlassian.fisheye.spi.impl.DefaultTxTemplate.execute(DefaultTxTemplate.java:114) at sun.reflect.GeneratedMethodAccessor167.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) {noformat} Tested uploading the patch file manually to the same review in the UI able to anchor to the repository BiitMercurial. Tested REST API to add the patch file but unable to reproduce the same error in the log. The patch is able to anchor to the repository but not added in the list of file in the review.

    Atlassian JIRA | 3 years ago | Kah Loun Foong [Atlassian]
    com.atlassian.crucible.spi.services.PatchAnchorFailedException: Unable to anchor patch [CR-25-patch-0.txt] to repository [BiitMercurial]: Crucible tried to anchor your patch to 'BiitMercurial', but did not find any matching paths.

    Root Cause Analysis

    1. com.atlassian.crucible.spi.services.PatchAnchorFailedException

      Unable to anchor patch [CR-25-patch-0.txt] to repository [BiitMercurial]: Crucible tried to anchor your patch to 'BiitMercurial', but did not find any matching paths.

      at com.atlassian.crucible.spi.impl.DefaultReviewService.doSearchAndSetAnchor()
    2. com.atlassian.crucible
      DefaultReviewService$7.doInTransaction
      1. com.atlassian.crucible.spi.impl.DefaultReviewService.doSearchAndSetAnchor(DefaultReviewService.java:300)
      2. com.atlassian.crucible.spi.impl.DefaultReviewService.tryAnchorPatch(DefaultReviewService.java:279)
      3. com.atlassian.crucible.spi.impl.DefaultReviewService.access$400(DefaultReviewService.java:142)
      4. com.atlassian.crucible.spi.impl.DefaultReviewService$7.doInTransaction(DefaultReviewService.java:675)
      5. com.atlassian.crucible.spi.impl.DefaultReviewService$7.doInTransaction(DefaultReviewService.java:661)
      5 frames
    3. com.atlassian.fisheye
      DefaultTxTemplate.execute
      1. com.atlassian.fisheye.spi.impl.DefaultTxTemplate.execute(DefaultTxTemplate.java:126)
      2. com.atlassian.fisheye.spi.impl.DefaultTxTemplate.execute(DefaultTxTemplate.java:114)
      2 frames
    4. Java RT
      DelegatingMethodAccessorImpl.invoke
      1. sun.reflect.GeneratedMethodAccessor167.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2 frames