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

500 error thrown if script is uploaded that already exists

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.15.2, 3.34.0
    • Fix Version/s: None
    • Component/s: REST, Scripting
    • Story Points:
      1
    • Notability:
      3

      Description

      If you upload a script using a name of an existing script an 500 error response is returned, and a scary looking stack trace is logged.

      Expected: Uploading a script using a name that already exist should return a 409 (conflict) response code, and a message indicating what the problem is.

      2019-02-06 09:52:01,732-0600 WARN [qtp1878281728-67] admin org.sonatype.nexus.siesta.internal.UnexpectedExceptionMapper - (ID 1c90c56c-bdae-41c1-8a7f-b4f5a5b0c821) Unexpected exception: com.orientechnologies.orient.core.storage.ORecordDuplicatedException: Cannot index record #86:0: found duplicated key 'helloWorld' in index 'script_name_idx' previously assigned to the record #85:0
      DB name="config" INDEX=script_name_idx RID=#85:0
      com.orientechnologies.orient.core.storage.ORecordDuplicatedException: Cannot index record #86:0: found duplicated key 'helloWorld' in index 'script_name_idx' previously assigned to the record #85:0
      DB name="config"
      at com.orientechnologies.orient.core.index.OIndexUnique$1.validate(OIndexUnique.java:47)
      at com.orientechnologies.orient.core.index.OIndexUnique$1.validate(OIndexUnique.java:37)
      at com.orientechnologies.orient.core.index.sbtree.local.OSBTree.put(OSBTree.java:855)
      at com.orientechnologies.orient.core.index.sbtree.local.OSBTree.validatedPut(OSBTree.java:261)
      at com.orientechnologies.orient.core.index.engine.OSBTreeIndexEngine.validatedPut(OSBTreeIndexEngine.java:169)
      at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.doValidatedPutIndexValue(OAbstractPaginatedStorage.java:2519)
      at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.validatedPutIndexValue(OAbstractPaginatedStorage.java:2488)
      at com.orientechnologies.orient.core.index.OIndexUnique.put(OIndexUnique.java:82)
      at com.orientechnologies.orient.core.index.OIndexUnique.put(OIndexUnique.java:35)
      at com.orientechnologies.orient.core.index.OIndexAbstract.putInSnapshot(OIndexAbstract.java:956)
      at com.orientechnologies.orient.core.index.OIndexAbstract.applyIndexTxEntry(OIndexAbstract.java:790)
      at com.orientechnologies.orient.core.index.OIndexAbstract.addTxOperation(OIndexAbstract.java:762)

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            rseddon Rich Seddon
            Last Updated By:
            Mahendra Surani Mahendra Surani
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Date of First Response:

                tigCommentSecurity.panel-title