1

I installed Apache Archiva as a Web-Application on Tomcat 7 ( howto ). But i get following error:

SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'registry#commons-configuration' defined in null: Could not resolve placeholder 'appserver.base'
    at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:268)
    at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:75)
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:553)
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:527)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:362)
    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4887)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5381)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:657)
    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1636)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)


The troubleshooting of archiva and tomcat does not help and I do not understand the error above. Has anyone ever had this error? What does it mean and how can I solve the problem?

Thank you very much

Ahmad Azwar Anas
  • 1,289
  • 13
  • 22
Roland
  • 169
  • 2
  • 4

2 Answers2

2

Have a look here http://archiva.apache.org/docs/1.4-M4/adminguide/webapp.html Especially the line export CATALINA_OPTS="-Dappserver.home=$CATALINA_HOME -Dappserver.base=$CATALINA_HOME" HTH

Kalle Richter
  • 8,008
  • 26
  • 77
  • 177
Olivier Lamy
  • 2,280
  • 1
  • 14
  • 12
  • i defined the environment variable CATALINA_OPTS with "-Dappserver.home=$CATALINA_HOME -Dappserver.base=$CATALINA_HOME" but i have still the problem – Roland Jun 05 '13 at 10:36
1

On Debian tomcat7 package unpack to several dirs:

CATALINA_HOME=/usr/share/tomcat7
CATALINA_BASE=/var/lib/tomcat7

If you look into catalina.sh, you will see import of setenv.sh.

Right way is define this system properties into /var/lib/tomcat7/setenv.sh, like this:

CATALINA_OPTS="$CATALINA_OPTS -Dappserver.home=$CATALINA_HOME -Dappserver.base=$CATALINA_HOME"
Grigory K
  • 1,301
  • 10
  • 10