Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-6364

BlobStoreFixtureProvider should configure a default 'secret' value if none specified

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.7.2, 1.8.0
    • run
    • None

    Description

      When BlobStoreFixtureProvider constructs a S3DataStore then currently it does not configure the "secret" property. This causes issue with Tika command as it tries to convert the blobId to references which result in NPE as secret is null

      11:56:35.915 [main] ERROR o.a.j.core.data.AbstractDataStore - Failed to hash identifier using MAC (Message Authentication Code) algorithm.
      java.lang.NullPointerException: null
              at org.apache.jackrabbit.core.data.CachingDataStore.getOrCreateReferenceKey(CachingDataStore.java:685) ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.core.data.AbstractDataStore.getReferenceKey(AbstractDataStore.java:141) ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.core.data.AbstractDataStore.getReferenceFromIdentifier(AbstractDataStore.java:100) ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.core.data.AbstractDataRecord.getReference(AbstractDataRecord.java:60) [oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore.getReference(DataStoreBlobStore.java:306) [oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT]
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_66]
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_66]
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_66]
              at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_66]
      

      To avoid such a behaviour the BlobStoreFixtureProvider should set "secret" to some random value if its not set already

      Attachments

        Issue Links

          Activity

            People

              chetanm Chetan Mehrotra
              chetanm Chetan Mehrotra
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: