You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Mansour Al Akeel <ma...@gmail.com> on 2013/03/21 02:16:03 UTC
Error with logback
I am getting this error. I tried to dig deeper, but couldn't find what
is going on. This is the contents of my applicationContext.xml in the
web-app :
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:configurator="http://cocoon.apache.org/schema/configurator"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-2.5.xsd
http://cocoon.apache.org/schema/configurator
http://cocoon.apache.org/schema/configurator/cocoon-configurator-1.0.1.xsd">
<configurator:settings runningMode="dev" />
<bean name="org.apache.cocoon.spring.configurator.logback"
class="org.apache.cocoon.spring.configurator.logback.LogbackConfigurator"
scope="singleton">
<property name="resource" value="/WEB-INF/logback.xml" />
</bean>
</beans>
This is the error message:
2013-03-20 21:10:59.499::WARN: Nested in
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name
'org.apache.cocoon.spring.configurator.logback' defined in
ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation
of init method failed; nested exception is
java.lang.NullPointerException:
java.lang.NullPointerException
at org.apache.cocoon.spring.configurator.logback.LogbackConfigurator.afterPropertiesSet(LogbackConfigurator.java:63)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:605)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:925)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:472)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:540)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:135)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:510)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
at org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:110)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Error with logback
Posted by Francesco Chicchiriccò <il...@apache.org>.
On 21/03/2013 02:16, Mansour Al Akeel wrote:
> I am getting this error. I tried to dig deeper, but couldn't find what
> is going on. This is the contents of my applicationContext.xml in the
> web-app :
>
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:util="http://www.springframework.org/schema/util"
> xmlns:configurator="http://cocoon.apache.org/schema/configurator"
> xsi:schemaLocation="http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
> http://www.springframework.org/schema/util
> http://www.springframework.org/schema/util/spring-util-2.5.xsd
>
> http://cocoon.apache.org/schema/configurator
> http://cocoon.apache.org/schema/configurator/cocoon-configurator-1.0.1.xsd">
> <configurator:settings runningMode="dev" />
> <bean name="org.apache.cocoon.spring.configurator.logback"
> class="org.apache.cocoon.spring.configurator.logback.LogbackConfigurator"
> scope="singleton">
> <property name="resource" value="/WEB-INF/logback.xml" />
> </bean>
> </beans>
This should be
<bean name="org.apache.cocoon.spring.configurator.logback"
class="org.apache.cocoon.spring.configurator.logback.LogbackConfigurator"
scope="singleton">
<property name="settings"
ref="org.apache.cocoon.configuration.Settings"/>
<property name="resource" value="/WEB-INF/logback.xml"/>
</bean>
i.e. the reference for the settings property is missing.
Moreover, please check that logback.xml is effectively under /WEB-INF:
normally it should be found under /WEB-INF/classes
For a full example take a look at
https://github.com/ilgrosso/cocoon3EmptyProject/blob/COCOON3-105/mywebapp/src/main/webapp/WEB-INF/applicationContext.xml
Regards.
--
Francesco Chicchiriccò
ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org