Artifactory 配置启动失败
Artifactory Configuration Fails To Start
我们在 Ubuntu 16.04 上安装了 Artifactory v6.20.1 运行。安装是通过 apt-get 管理的。有人不小心 运行 升级到 v7。不幸的是,这破坏了我们的一些工具,所以我们需要恢复。
我们执行了全新安装,将其更新为使用本地 PostgreSQL 数据库,一切正常。我们有 Artifactory 的每晚备份,因此我们从前一晚的备份中执行了系统导入。此时一切似乎仍然正常运行 - 可以看到我们所有的工件和以前的配置设置 - 系统似乎恢复正常。
然后我们重新启动了系统以应用一些系统级别的更改(内核更新),一切都很顺利。重启后 Artifactory 将不再启动。我们在日志中看到的错误是...
2020-08-07 16:33:12,906 [art-init] [ERROR] (o.a.c.CentralConfigServiceImpl:757) - Could not load configuration due to: Failed to read object from stream
java.lang.RuntimeException: Failed to read object from stream
at org.artifactory.jaxb.JaxbHelper.read(JaxbHelper.java:131)
at org.artifactory.jaxb.JaxbHelper.readConfig(JaxbHelper.java:66)
at org.artifactory.descriptor.reader.CentralConfigReader.readAndConvert(CentralConfigReader.java:76)
at org.artifactory.descriptor.reader.CentralConfigReader.read(CentralConfigReader.java:58)
at org.artifactory.config.CentralConfigServiceImpl.getCentralConfigDescriptorCache(CentralConfigServiceImpl.java:737)
at org.artifactory.config.CentralConfigServiceImpl.access[=10=]0(CentralConfigServiceImpl.java:110)
at org.artifactory.config.CentralConfigServiceImpl.call(CentralConfigServiceImpl.java:166)
at org.artifactory.config.CentralConfigServiceImpl.call(CentralConfigServiceImpl.java:162)
at org.artifactory.storage.db.security.service.VersioningCacheImpl.get(VersioningCacheImpl.java:86)
at org.artifactory.config.CentralConfigServiceImpl.getDescriptor(CentralConfigServiceImpl.java:398)
at org.artifactory.config.CentralConfigServiceImpl.getDescriptor(CentralConfigServiceImpl.java:106)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:205)
at com.sun.proxy.$Proxy169.getDescriptor(Unknown Source)
at org.artifactory.security.access.ArtifactoryAccessClientConfigStore.getAccessClientSettings(ArtifactoryAccessClientConfigStore.java:635)
at org.artifactory.security.access.ArtifactoryAccessClientConfigStore.lambda$getAccessServerSettings(ArtifactoryAccessClientConfigStore.java:597)
at com.google.common.cache.LocalCache$LocalManualCache.load(LocalCache.java:4876)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3529)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2278)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2155)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2045)
at com.google.common.cache.LocalCache.get(LocalCache.java:3951)
at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4871)
at org.artifactory.security.access.ArtifactoryAccessClientConfigStore.getAccessServerSettings(ArtifactoryAccessClientConfigStore.java:581)
at org.artifactory.security.access.ArtifactoryAccessClientConfigStore.newClientBuilder(ArtifactoryAccessClientConfigStore.java:137)
at org.artifactory.security.access.AccessServiceImpl.buildAccessClient(AccessServiceImpl.java:355)
at org.artifactory.security.access.AccessServiceImpl.bootstrapAccessClient(AccessServiceImpl.java:1254)
at org.artifactory.security.access.AccessServiceImpl.initAccessService(AccessServiceImpl.java:339)
at org.artifactory.security.access.AccessServiceImpl.initAccessClientIfNeeded(AccessServiceImpl.java:328)
at org.artifactory.security.access.AccessServiceImpl.init(AccessServiceImpl.java:321)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:295)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
at org.artifactory.storage.fs.lock.aop.LockingAdvice.invoke(LockingAdvice.java:76)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
at com.sun.proxy.$Proxy183.init(Unknown Source)
at org.artifactory.spring.ArtifactoryApplicationContext.refresh(ArtifactoryApplicationContext.java:274)
at org.artifactory.spring.ArtifactoryApplicationContext.<init>(ArtifactoryApplicationContext.java:154)
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 org.artifactory.webapp.servlet.ArtifactoryContextConfigListener.configure(ArtifactoryContextConfigListener.java:211)
at org.artifactory.webapp.servlet.ArtifactoryContextConfigListener.access0(ArtifactoryContextConfigListener.java:67)
at org.artifactory.webapp.servlet.ArtifactoryContextConfigListener.run(ArtifactoryContextConfigListener.java:92)
Caused by: javax.xml.bind.UnmarshalException: null
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:335)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.createUnmarshalException(UnmarshallerImpl.java:578)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:264)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:229)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:157)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:125)
at org.artifactory.jaxb.JaxbHelper.read(JaxbHelper.java:129)
... 55 common frames omitted
Caused by: org.xml.sax.SAXParseException: cvc-elt.4.3: Type 'xs:string' is not validly derived from the type definition, 'IDREF', of element 'repositoryRef'.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:396)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:284)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:453)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3231)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.getAndCheckXsiType(XMLSchemaValidator.java:2557)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1936)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:741)
at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorHandlerImpl.startElement(ValidatorHandlerImpl.java:568)
at com.sun.xml.bind.v2.runtime.unmarshaller.ValidatingUnmarshaller.startElement(ValidatingUnmarshaller.java:101)
at com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java:168)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:374)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2784)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:258)
... 59 common frames omitted
2020-08-07 16:33:12,913 [art-init] [ERROR] (o.a.w.s.ArtifactoryContextConfigListener:96) - Application could not be initialized: null
java.lang.reflect.InvocationTargetException: null
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 org.artifactory.webapp.servlet.ArtifactoryContextConfigListener.configure(ArtifactoryContextConfigListener.java:211)
at org.artifactory.webapp.servlet.ArtifactoryContextConfigListener.access0(ArtifactoryContextConfigListener.java:67)
at org.artifactory.webapp.servlet.ArtifactoryContextConfigListener.run(ArtifactoryContextConfigListener.java:92)
Caused by: org.springframework.beans.factory.BeanInitializationException: Failed to initialize bean 'org.artifactory.security.access.AccessService'.; nested exception is com.google.common.util.concurrent.UncheckedExecutionException: java.lang.NullPointerException
at org.artifactory.spring.ArtifactoryApplicationContext.refresh(ArtifactoryApplicationContext.java:276)
at org.artifactory.spring.ArtifactoryApplicationContext.<init>(ArtifactoryApplicationContext.java:154)
... 7 common frames omitted
Caused by: com.google.common.util.concurrent.UncheckedExecutionException: java.lang.NullPointerException
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2051)
at com.google.common.cache.LocalCache.get(LocalCache.java:3951)
at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4871)
at org.artifactory.security.access.ArtifactoryAccessClientConfigStore.getAccessServerSettings(ArtifactoryAccessClientConfigStore.java:581)
at org.artifactory.security.access.ArtifactoryAccessClientConfigStore.newClientBuilder(ArtifactoryAccessClientConfigStore.java:137)
at org.artifactory.security.access.AccessServiceImpl.buildAccessClient(AccessServiceImpl.java:355)
at org.artifactory.security.access.AccessServiceImpl.bootstrapAccessClient(AccessServiceImpl.java:1254)
at org.artifactory.security.access.AccessServiceImpl.initAccessService(AccessServiceImpl.java:339)
at org.artifactory.security.access.AccessServiceImpl.initAccessClientIfNeeded(AccessServiceImpl.java:328)
at org.artifactory.security.access.AccessServiceImpl.init(AccessServiceImpl.java:321)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:295)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
at org.artifactory.storage.fs.lock.aop.LockingAdvice.invoke(LockingAdvice.java:76)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
at com.sun.proxy.$Proxy183.init(Unknown Source)
at org.artifactory.spring.ArtifactoryApplicationContext.refresh(ArtifactoryApplicationContext.java:274)
... 8 common frames omitted
Caused by: java.lang.NullPointerException: null
at org.artifactory.security.access.ArtifactoryAccessClientConfigStore.getAccessClientSettings(ArtifactoryAccessClientConfigStore.java:635)
at org.artifactory.security.access.ArtifactoryAccessClientConfigStore.lambda$getAccessServerSettings(ArtifactoryAccessClientConfigStore.java:597)
at com.google.common.cache.LocalCache$LocalManualCache.load(LocalCache.java:4876)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3529)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2278)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2155)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2045)
... 31 common frames omitted
我猜测这意味着 artifactory.config.latest.xml
中存在某种错误,但这些日志条目甚至没有包含足够的信息来告诉我那。我无法共享该文件的全部内容,因为我们在那里有一些内部内容。我确实查看了错误中引用的 <repositoryRef>
元素,但没有发现任何异常。我找不到 XSD XML 文件引用来进行验证检查。
如有任何信息或想法,我们将不胜感激。谢谢...
Artifactory 配置似乎已迁移到 v7。尝试用经过验证的 xml(适用于 v6 的配置)替换配置。
要做到这一点,只需将单词 latest
更改为 import
以表示 artifactory.config.latest.xml
。阅读更多 here
我们在 Ubuntu 16.04 上安装了 Artifactory v6.20.1 运行。安装是通过 apt-get 管理的。有人不小心 运行 升级到 v7。不幸的是,这破坏了我们的一些工具,所以我们需要恢复。
我们执行了全新安装,将其更新为使用本地 PostgreSQL 数据库,一切正常。我们有 Artifactory 的每晚备份,因此我们从前一晚的备份中执行了系统导入。此时一切似乎仍然正常运行 - 可以看到我们所有的工件和以前的配置设置 - 系统似乎恢复正常。
然后我们重新启动了系统以应用一些系统级别的更改(内核更新),一切都很顺利。重启后 Artifactory 将不再启动。我们在日志中看到的错误是...
2020-08-07 16:33:12,906 [art-init] [ERROR] (o.a.c.CentralConfigServiceImpl:757) - Could not load configuration due to: Failed to read object from stream
java.lang.RuntimeException: Failed to read object from stream
at org.artifactory.jaxb.JaxbHelper.read(JaxbHelper.java:131)
at org.artifactory.jaxb.JaxbHelper.readConfig(JaxbHelper.java:66)
at org.artifactory.descriptor.reader.CentralConfigReader.readAndConvert(CentralConfigReader.java:76)
at org.artifactory.descriptor.reader.CentralConfigReader.read(CentralConfigReader.java:58)
at org.artifactory.config.CentralConfigServiceImpl.getCentralConfigDescriptorCache(CentralConfigServiceImpl.java:737)
at org.artifactory.config.CentralConfigServiceImpl.access[=10=]0(CentralConfigServiceImpl.java:110)
at org.artifactory.config.CentralConfigServiceImpl.call(CentralConfigServiceImpl.java:166)
at org.artifactory.config.CentralConfigServiceImpl.call(CentralConfigServiceImpl.java:162)
at org.artifactory.storage.db.security.service.VersioningCacheImpl.get(VersioningCacheImpl.java:86)
at org.artifactory.config.CentralConfigServiceImpl.getDescriptor(CentralConfigServiceImpl.java:398)
at org.artifactory.config.CentralConfigServiceImpl.getDescriptor(CentralConfigServiceImpl.java:106)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:205)
at com.sun.proxy.$Proxy169.getDescriptor(Unknown Source)
at org.artifactory.security.access.ArtifactoryAccessClientConfigStore.getAccessClientSettings(ArtifactoryAccessClientConfigStore.java:635)
at org.artifactory.security.access.ArtifactoryAccessClientConfigStore.lambda$getAccessServerSettings(ArtifactoryAccessClientConfigStore.java:597)
at com.google.common.cache.LocalCache$LocalManualCache.load(LocalCache.java:4876)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3529)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2278)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2155)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2045)
at com.google.common.cache.LocalCache.get(LocalCache.java:3951)
at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4871)
at org.artifactory.security.access.ArtifactoryAccessClientConfigStore.getAccessServerSettings(ArtifactoryAccessClientConfigStore.java:581)
at org.artifactory.security.access.ArtifactoryAccessClientConfigStore.newClientBuilder(ArtifactoryAccessClientConfigStore.java:137)
at org.artifactory.security.access.AccessServiceImpl.buildAccessClient(AccessServiceImpl.java:355)
at org.artifactory.security.access.AccessServiceImpl.bootstrapAccessClient(AccessServiceImpl.java:1254)
at org.artifactory.security.access.AccessServiceImpl.initAccessService(AccessServiceImpl.java:339)
at org.artifactory.security.access.AccessServiceImpl.initAccessClientIfNeeded(AccessServiceImpl.java:328)
at org.artifactory.security.access.AccessServiceImpl.init(AccessServiceImpl.java:321)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:295)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
at org.artifactory.storage.fs.lock.aop.LockingAdvice.invoke(LockingAdvice.java:76)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
at com.sun.proxy.$Proxy183.init(Unknown Source)
at org.artifactory.spring.ArtifactoryApplicationContext.refresh(ArtifactoryApplicationContext.java:274)
at org.artifactory.spring.ArtifactoryApplicationContext.<init>(ArtifactoryApplicationContext.java:154)
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 org.artifactory.webapp.servlet.ArtifactoryContextConfigListener.configure(ArtifactoryContextConfigListener.java:211)
at org.artifactory.webapp.servlet.ArtifactoryContextConfigListener.access0(ArtifactoryContextConfigListener.java:67)
at org.artifactory.webapp.servlet.ArtifactoryContextConfigListener.run(ArtifactoryContextConfigListener.java:92)
Caused by: javax.xml.bind.UnmarshalException: null
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:335)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.createUnmarshalException(UnmarshallerImpl.java:578)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:264)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:229)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:157)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:125)
at org.artifactory.jaxb.JaxbHelper.read(JaxbHelper.java:129)
... 55 common frames omitted
Caused by: org.xml.sax.SAXParseException: cvc-elt.4.3: Type 'xs:string' is not validly derived from the type definition, 'IDREF', of element 'repositoryRef'.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:396)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:284)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:453)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3231)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.getAndCheckXsiType(XMLSchemaValidator.java:2557)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1936)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:741)
at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorHandlerImpl.startElement(ValidatorHandlerImpl.java:568)
at com.sun.xml.bind.v2.runtime.unmarshaller.ValidatingUnmarshaller.startElement(ValidatingUnmarshaller.java:101)
at com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java:168)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:374)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2784)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:258)
... 59 common frames omitted
2020-08-07 16:33:12,913 [art-init] [ERROR] (o.a.w.s.ArtifactoryContextConfigListener:96) - Application could not be initialized: null
java.lang.reflect.InvocationTargetException: null
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 org.artifactory.webapp.servlet.ArtifactoryContextConfigListener.configure(ArtifactoryContextConfigListener.java:211)
at org.artifactory.webapp.servlet.ArtifactoryContextConfigListener.access0(ArtifactoryContextConfigListener.java:67)
at org.artifactory.webapp.servlet.ArtifactoryContextConfigListener.run(ArtifactoryContextConfigListener.java:92)
Caused by: org.springframework.beans.factory.BeanInitializationException: Failed to initialize bean 'org.artifactory.security.access.AccessService'.; nested exception is com.google.common.util.concurrent.UncheckedExecutionException: java.lang.NullPointerException
at org.artifactory.spring.ArtifactoryApplicationContext.refresh(ArtifactoryApplicationContext.java:276)
at org.artifactory.spring.ArtifactoryApplicationContext.<init>(ArtifactoryApplicationContext.java:154)
... 7 common frames omitted
Caused by: com.google.common.util.concurrent.UncheckedExecutionException: java.lang.NullPointerException
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2051)
at com.google.common.cache.LocalCache.get(LocalCache.java:3951)
at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4871)
at org.artifactory.security.access.ArtifactoryAccessClientConfigStore.getAccessServerSettings(ArtifactoryAccessClientConfigStore.java:581)
at org.artifactory.security.access.ArtifactoryAccessClientConfigStore.newClientBuilder(ArtifactoryAccessClientConfigStore.java:137)
at org.artifactory.security.access.AccessServiceImpl.buildAccessClient(AccessServiceImpl.java:355)
at org.artifactory.security.access.AccessServiceImpl.bootstrapAccessClient(AccessServiceImpl.java:1254)
at org.artifactory.security.access.AccessServiceImpl.initAccessService(AccessServiceImpl.java:339)
at org.artifactory.security.access.AccessServiceImpl.initAccessClientIfNeeded(AccessServiceImpl.java:328)
at org.artifactory.security.access.AccessServiceImpl.init(AccessServiceImpl.java:321)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:295)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
at org.artifactory.storage.fs.lock.aop.LockingAdvice.invoke(LockingAdvice.java:76)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
at com.sun.proxy.$Proxy183.init(Unknown Source)
at org.artifactory.spring.ArtifactoryApplicationContext.refresh(ArtifactoryApplicationContext.java:274)
... 8 common frames omitted
Caused by: java.lang.NullPointerException: null
at org.artifactory.security.access.ArtifactoryAccessClientConfigStore.getAccessClientSettings(ArtifactoryAccessClientConfigStore.java:635)
at org.artifactory.security.access.ArtifactoryAccessClientConfigStore.lambda$getAccessServerSettings(ArtifactoryAccessClientConfigStore.java:597)
at com.google.common.cache.LocalCache$LocalManualCache.load(LocalCache.java:4876)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3529)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2278)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2155)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2045)
... 31 common frames omitted
我猜测这意味着 artifactory.config.latest.xml
中存在某种错误,但这些日志条目甚至没有包含足够的信息来告诉我那。我无法共享该文件的全部内容,因为我们在那里有一些内部内容。我确实查看了错误中引用的 <repositoryRef>
元素,但没有发现任何异常。我找不到 XSD XML 文件引用来进行验证检查。
如有任何信息或想法,我们将不胜感激。谢谢...
Artifactory 配置似乎已迁移到 v7。尝试用经过验证的 xml(适用于 v6 的配置)替换配置。
要做到这一点,只需将单词 latest
更改为 import
以表示 artifactory.config.latest.xml
。阅读更多 here