sonatype / nexus-public

Sonatype Nexus Repository Open-source codebase mirror
https://www.sonatype.com/products/repository-oss-download
Eclipse Public License 1.0
1.94k stars 570 forks source link

Nexus 2.72.0 groovy method getBlobStoreManager in BlobStoreApiImpl is missing #485

Open Koeppchen opened 2 weeks ago

Koeppchen commented 2 weeks ago

Error Message was: 2024-10-08 16:41:54,947+0200 WARN [quartz-9-thread-2] *SYSTEM org.sonatype.nexus.quartz.internal.task.QuartzTaskJob - Task 87b67c5c-a2e5-4146-ba19-45b2812a80c0 : 'test' [script] execution failure javax.script.ScriptException: javax.script.ScriptException: groovy.lang.MissingMethodException: No signature of method: org.sonatype.nexus.internal.provisioning.BlobStoreApiImpl.getBlobStoreManager() is applicable for argument types: () values: [] at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:158)

I have excuted this as a task to have a better reproducability. Script code was: println blobStore.getBlobStoreManager()

With 3.71.0 the output was the following: org.sonatype.nexus.repository.internal.blobstore.BlobStoreManagerImpl$$EnhancerByGuice$$254f2c13@679a1472 this means a BlobStoreManager Object was available.

Koeppchen commented 2 weeks ago

Root cause is that components/nexus-core/src/main/java/org/sonatype/nexus/internal/provisioning/BlobStoreApiImpl.groovy was replaced by a Java Implementation see: https://github.com/sonatype/nexus-public/compare/release-3.71.0-06...release-3.72.0-04#diff-90dc894c5b83eff1b4e12f6dc276c902588253b22ee1b41fe6069c34ee31f54c In the Java Implementation the field blobStoreManager was made private. As a workaround i have accessed the private field to get the BlobStoreManager, but this is not a solution i am happy with. I would love to have a way to be able to get the instance of BlobStoreManager.