Monday, August 31, 2015

artifactory error on deploy

I occasionally got these errors in artifactory.log when i tried to deploy an artifact manually after configuring it.

2015-08-31 11:24:15,138 [http-nio-8081-exec-4] [ERROR] (o.a.r.c.e.GlobalExceptionMapper:46) - null
java.lang.NullPointerException: null
        at org.artifactory.repo.virtual.VirtualRepo.remoteRepositoryByRemoteOrCacheKey(VirtualRepo.java:277) ~[artifactory-core-4.0.1.jar:na]
        at org.artifactory.repo.virtual.VirtualRepo.localOrCachedRepositoryByKey(VirtualRepo.java:252) ~[artifactory-core-4.0.1.jar:na]
        at org.artifactory.repo.service.RepositoryServiceImpl.localOrCachedRepoDescriptorByKey(RepositoryServiceImpl.java:1425) ~[artifactory-core-4.0.1.jar:na]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_60]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_60]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_60]

        at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_60]

I solved  this by making sure that the  disk in  storage.properties file is correct
and making sure that the user has permission to allow it to deploy to the repo for example libs-release-local.