1
votes

I upgraded artifactory from 5.4.6 to 5.6.3 and I got the following exception.

How can I solve this issue?

2017-12-19 15:14:09,495 [art-init] [ERROR] (o.a.c.ConvertersManagerImpl:216) - Conversion failed. You should analyze the error and retry launching Artifactory. Error is: HTTP response status 401:{"errors":[{"code":"UNAUTHORIZED","detail":"Failed to get cached permissions: ma.glasnost.orika.MappingException: exception while creating object factory for org.jfrog.access.server.model.PermissionImpl","message":"HTTP 401 Unauthorized"}]}
2017-12-19 15:14:09,503 [art-init] [ERROR] (o.a.w.s.ArtifactoryContextConfigListener:99) - Application could not be initialized: HTTP response status 401:{"errors":[{"code":"UNAUTHORIZED","detail":"Failed to get cached permissions: ma.glasnost.orika.MappingException: exception while creating object factory for org.jfrog.access.server.model.PermissionImpl","message":"HTTP 401 Unauthorized"}]}
java.lang.reflect.InvocationTargetException: null
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_131]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_131]
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_131]
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_131]
    at org.artifactory.webapp.servlet.ArtifactoryContextConfigListener.configure(ArtifactoryContextConfigListener.java:224) ~[artifactory-web-application-5.6.3.jar:na]
    at org.artifactory.webapp.servlet.ArtifactoryContextConfigListener.access$2(ArtifactoryContextConfigListener.java:186) ~[artifactory-web-application-5.6.3.jar:na]
    at org.artifactory.webapp.servlet.ArtifactoryContextConfigListener$1.run(ArtifactoryContextConfigListener.java:95) ~[artifactory-web-application-5.6.3.jar:na]
Caused by: java.lang.RuntimeException: HTTP response status 401:{"errors":[{"code":"UNAUTHORIZED","detail":"Failed to get cached permissions: ma.glasnost.orika.MappingException: exception while creating object factory for org.jfrog.access.server.model.PermissionImpl","message":"HTTP 401 Unauthorized"}]}
    at org.artifactory.converter.ConvertersManagerImpl.handleException(ConvertersManagerImpl.java:223) ~[artifactory-common-5.6.3.jar:na]
    at org.artifactory.converter.ConvertersManagerImpl.serviceConvert(ConvertersManagerImpl.java:171) ~[artifactory-common-5.6.3.jar:na]
    at org.artifactory.spring.ArtifactoryApplicationContext.refresh(ArtifactoryApplicationContext.java:232) ~[artifactory-core-5.6.3.jar:na]
    at org.artifactory.spring.ArtifactoryApplicationContext.<init>(ArtifactoryApplicationContext.java:120) ~[artifactory-core-5.6.3.jar:na]
    ... 7 common frames omitted
Caused by: org.jfrog.access.client.AccessClientHttpException: HTTP response status 401:{"errors":[{"code":"UNAUTHORIZED","detail":"Failed to get cached permissions: ma.glasnost.orika.MappingException: exception while creating object factory for org.jfrog.access.server.model.PermissionImpl","message":"HTTP 401 Unauthorized"}]}
    at org.jfrog.access.client.http.AccessHttpClient.createRestResponse(AccessHttpClient.java:133) ~[access-client-core-3.0.4.jar:na]
    at org.jfrog.access.client.http.AccessHttpClient.restCall(AccessHttpClient.java:108) ~[access-client-core-3.0.4.jar:na]
    at org.jfrog.access.client.imports.ImportClientImpl.importSecurityEntities(ImportClientImpl.java:38) ~[access-client-core-3.0.4.jar:na]
    at org.artifactory.security.access.AccessServiceImpl.importSecurityEntities(AccessServiceImpl.java:952) ~[artifactory-core-5.6.3.jar:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_131]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_131]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_131]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_131]
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) ~[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201) ~[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
    at com.sun.proxy.$Proxy425.importSecurityEntities(Unknown Source) ~[na:na]
    at org.artifactory.security.SecurityServiceImpl.importSecurityData(SecurityServiceImpl.java:2476) ~[artifactory-core-5.6.3.jar:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_131]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_131]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_131]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_131]
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) ~[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) ~[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) ~[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
    at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) ~[spring-tx-4.1.5.RELEASE.jar:4.1.5.RELEASE]
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281) ~[spring-tx-4.1.5.RELEASE.jar:4.1.5.RELEASE]
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) ~[spring-tx-4.1.5.RELEASE.jar:4.1.5.RELEASE]
    at org.artifactory.storage.fs.lock.aop.LockingAdvice.invoke(LockingAdvice.java:76) ~[artifactory-storage-common-5.6.3.jar:na]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) ~[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
    at com.sun.proxy.$Proxy424.importSecurityData(Unknown Source) ~[na:na]
    at org.artifactory.security.access.emigrate.AccessSecurityEmigratorImpl.emigrate(AccessSecurityEmigratorImpl.java:53) ~[artifactory-core-5.6.3.jar:na]
    at org.artifactory.security.SecurityServiceImpl.convert(SecurityServiceImpl.java:321) ~[artifactory-core-5.6.3.jar:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_131]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_131]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_131]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_131]
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) ~[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201) ~[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
    at com.sun.proxy.$Proxy424.convert(Unknown Source) ~[na:na]
    at org.artifactory.converter.ConvertersManagerImpl.serviceConvert(ConvertersManagerImpl.java:167) ~[artifactory-common-5.6.3.jar:na]
    ... 9 common frames omitted
1
The error you are seeing is due to Artifactory not being able to communicate with the Access Server - which can be caused by several reasons... most commonly check that you upgraded the access.war file and not just the artifactory.war file if this is a standalone installation. Also removing the adminToken from the artifactory.config.xml (and renaming it to artifactory.config.import.xml to have the change reflected during startup) to rescue you from situations where you switched keys in access. - danf
Thank you, but it doesn't work. I use my own tomcat (8.0.48) installation. The etc folder looks like this: artifactory.config.20170910.090525.yml artifactory.config.bootstrap.1.xml artifactory.config.bootstrap.2.xml artifactory.config.bootstrap.xml artifactory.properties artifactory.system.properties binarystore.xml db.properties export.security.1513700285735.xml logback.original.xml logback.xml logback.xml.back mimetypes.xml plugins security security.20170910.085830.xml ui - marco
@danf I dont get any token. This ist from the access request.log 2017-12-20T04:20:22.631+0100|127.0.0.1|anonymous|GET|localhost:8081/access/api/v1/system/ping|200|0|202|JFrog Access Java Client/3.0.4 2017-12-20T04:20:22.686+0100|127.0.0.1|anonymous|GET|localhost:8081/access/api/v1/cert/root|200|0|36|JFrog Access Java Client/3.0.4 2017-12-20T04:20:23.048+0100|127.0.0.1|anonymous|POST|localhost:8081/access/api/v1/oauth/token|401|159|174|JFrog Access Java Client/3.0.4 - marco

1 Answers

4
votes

Thank you Marco for this information. We (JFrog) would like to further investigate this matter over an online meeting, please reach out to us at [email protected] and share with us what times (several) would work for you to start the session (including timezone). Make sure to send us a reference to this stackoverflow discussion. Once we get the email, we will send you the meeting details.