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

Don't log error stack traces when Nx is in read-only mode

    Details

    • Type: Improvement
    • Status: New
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.0.0
    • Fix Version/s: None
    • Component/s: Logging
    • Labels:
      None
    • Environment:
      Nexus 3.30.0

      Description

      When Nexus is in read-only mode and you perform something like uploading a component or deleteing a component, you will receive an error message with a stack trace like this in the log:

      2021-03-23 12:07:03,879+0100 ERROR [qtp1673174785-4519] userid org.sonatype.nexus.coreui.UploadResource - Unable to perform upload to repository raw-repo-hosted
      com.orientechnologies.common.concur.lock.OModificationOperationProhibitedException: Modification requests are prohibited
      DB name="component"
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      at com.orientechnologies.orient.core.storage.impl.local.paginated.atomicoperations.OAtomicOperationsManager.throwFreezeExceptionIfNeeded(OAtomicOperationsManager.java:358)
      at com.orientechnologies.orient.core.storage.impl.local.paginated.atomicoperations.OAtomicOperationsManager.startAtomicOperation(OAtomicOperationsManager.java:197)
      at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.startStorageTx(OAbstractPaginatedStorage.java:3910)
      at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.commit(OAbstractPaginatedStorage.java:1799)
      ...

      As Nexus is in read-only mode this is expected and therefore I don't think a stack tarce should be logged. It pollutes the log. An error message should be sufficient. Possibly the message shouldn't even be logged as error but only as warning or similar.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            ahammar Anders Hammar
            Last Updated By:
            Joe Tom Joe Tom
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                tigCommentSecurity.panel-title