Uploaded image for project: 'Crucible'
  1. Crucible
  2. CRUC-6582

Creating pre-commit with IntelliJ on a new file throws 500 Internal Server Error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 3.9.1, 3.10.0
    • 2.10.4, 3.0.3
    • None
    • None

    Description

      Steps to reproduce:

      1. Open a Project
      2. Add a new file (example, test.sh) anywhere within the project
      3. Create a pre-commit review with Mercurial (our chosen version control system) by selecting the file -> Mercurial -> Commit -> Crucible Pre-Commit-Review.
      4. Add a comment and commit to the default project in Mercurial.

      This fails with the following error in IntelliJ:

      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)
      

      FishEye log:

      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)
      

      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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              klfoong Foong (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: