gpt4 book ai didi

java - Apache Archiva 2.0 Jetty WebAppContext :Failed startup of context o. e.j.w.WebAppContext

转载 作者:行者123 更新时间:2023-11-30 09:11:25 26 4
gpt4 key购买 nike

我正在尝试创建一个 Apache Archiva 2.0 实例。我可以在家里的盒子(Ubuntu 13)上从命令行成功运行独立程序:archiva2.0/bin/archiva console...但是,在我工作的 Redhat 6 盒子上,Archiva 无法启动 Spring webapp 上下文。我只知道 very basics about Spring 。以下是我认为相关的日志/文件。如果我遗漏了什么,请在评论中告诉我,我很乐意更新。

Archiva 控制台输出:

2014-02-28 06:18:09,935 [WrapperSimpleAppMain] INFO org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler [] - Shutting down ExecutorService 'springScheduler'
2014-02-28 06:18:09,935 [WrapperSimpleAppMain] INFO org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor [] - Shutting down ExecutorService
2014-02-28 06:18:09,935 [WrapperSimpleAppMain] ERROR org.springframework.web.context.ContextLoader [] - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'archivaUiServices': Cannot resolve reference to bean 'authenticationInterceptor#rest' while setting bean property 'providers' with key 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationInterceptor#rest': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.apache.archiva.redback.users.UserManager org.apache.archiva.redback.rest.services.interceptors.AuthenticationInterceptor.userManager; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userManager#archiva': ....etc...

Tanuki 服务包装器日志:

INFO | jvm 1 | 2014/02/28 06:18:02 | 2014-02-28 06:18:02.785:INFO:/:Initializing Spring root WebApplicationContext
INFO | jvm 1 | 2014/02/28 06:18:09 | 2014-02-28 06:18:09.944:WARN:oejw.WebAppContext:Failed startup of context o.e.j.w.WebAppContext{/,file:/devSpace/lib/apache-archiva-2.0.0/apps/archiva/},/devSpace/lib/apache-archiva-2.0.0/apps/archiva
INFO | jvm 1 | 2014/02/28 06:18:09 | org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'archivaUiServices': Cannot resolve reference to bean 'authenticationInterceptor#rest' while setting bean property 'providers' with key 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationInterceptor#rest': Injection of autowired dependencies failed;

archiva2.0/contexts/archiva.xml:

<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Set name="contextPath">/</Set>
<Set name="war"><SystemProperty name="jetty.home" default="."/>/apps/archiva</Set>
<Set name="extractWAR">false</Set>
<Set name="copyWebDir">false</Set>
</Configure>

archiva2.0/apps/archiva/WEB-INF/classes/META-INF/spring-context.xml

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-3.0.xsd"
default-lazy-init="true">
<context:annotation-config/>
<context:component-scan base-package="org.apache.archiva.web.api"/>
<util:properties id="archivaRuntimeProperties" location="classpath:application.properties" />
<bean id="jcr-repository" class="org.apache.jackrabbit.core.RepositoryImpl" destroy-method="shutdown" lazy-init="true">
<constructor-arg ref="jcr-config"/>
</bean>
<bean id="jcr-config" class="org.apache.archiva.metadata.repository.jcr.ArchivaJcrRepositoryConfig" factory-method="create">
<constructor-arg value="${appserver.base}/conf/repository.xml"/>
<constructor-arg value="${appserver.base}/data/jcr"/>
</bean>
</beans>

最佳答案

这是某些环境下的已知问题:MRM-1807

您可以通过在安装目录或基本目录下添加一个正确的文件作为 conf/archiva.xml 来解决这个问题,例如:http://s.apache.org/default-archiva.xml

关于java - Apache Archiva 2.0 Jetty WebAppContext :Failed startup of context o. e.j.w.WebAppContext,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22095723/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com