Apache Archiva 2.0 Jetty WebAppContext:上下文o.e.j.w.WebAppContext的启动失败

时间:2014-02-28 12:50:13

标签: java spring jetty embedded-jetty archiva

我正试图站起来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.ThreadPoolTask​​Scheduler [] - 关闭ExecutorService'springScheduler'   2014-02-28 06:18:09,935 [WrapperSimpleAppMain] INFO org.springframework.scheduling.concurrent.ThreadPoolTask​​Executor [] - 关闭ExecutorService
  2014-02-28 06:18:09,935 [WrapperSimpleAppMain] ERROR org.springframework.web.context.ContextLoader [] - 上下文初始化失败   org.springframework.beans.factory.BeanCreationException:创建名为'archivaUiServices'的bean时出错:在使用键1设置bean属性'providers'时,无法解析对bean'authenticationInterceptor#rest'的引用;嵌套异常是org.springframework.beans.factory.BeanCreationException:创建名为'authenticationInterceptor#rest'的bean时出错:注入自动连接的依赖项失败;嵌套异常是org.springframework.beans.factory.BeanCreationException:无法自动装配字段:private org.apache.archiva.redback.users.UserManager org.apache.archiva.redback.rest.services.interceptors.AuthenticationInterceptor.userManager;嵌套异常是org.springframework.beans.factory.BeanCreationException:创建名为'userManager#archiva'的bean时出错:....等...

Tanuki Service Wrapper日志:

  

INFO | jvm 1 | 2014/02/28 06:18:02 | 2014-02-28 06:18:02.785:INFO:/:初始化Spring root WebApplicationContext
  信息| jvm 1 | 2014/02/28 06:18:09 | 2014-02-28 06:18:09.944:警告:oejw.WebAppContext:上下文启动失败oejwWebAppContext {/,文件:/devSpace/lib/apache-archiva-2.0.0/apps/archiva /},/ devSpace / LIB / Apache的archiva-2.0.0 /应用/ archiva
  信息| jvm 1 | 2014/02/28 06:18:09 | org.springframework.beans.factory.BeanCreationException:创建名为'archivaUiServices'的bean时出错:在使用键1设置bean属性'providers'时,无法解析对bean'authenticationInterceptor#rest'的引用;嵌套异常是org.springframework.beans.factory.BeanCreationException:创建名为'authenticationInterceptor#rest'的bean时出错:注册自动装配的依赖项失败;

archiva2.0 /上下文/ 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 /应用/ archiva / WEB-INF /类/ META-INF /弹簧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>

1 个答案:

答案 0 :(得分:2)

在某些环境下,这是一个已知问题:MRM-1807

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