cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From FreddyFlint <andrew.fl...@btinternet.com>
Subject Null pointer when using Cocoon
Date Sun, 23 Mar 2008 10:47:07 GMT

Hi all

Am new to cocoon and think have managed to install it correctly and
everything but get the following error when I start tomcat

FYI

Am using Tomcat 5.1.17, Java 1.5


Logging Error: Unknown error writing event.
java.lang.NullPointerException
        at
org.apache.commons.lang.exception.ExceptionUtils.getCauseUsingMethodN
ame(ExceptionUtils.java:220)
        at
org.apache.commons.lang.exception.ExceptionUtils.getCause(ExceptionUt
ils.java:142)
        at
org.apache.commons.lang.exception.ExceptionUtils.getCause(ExceptionUt
ils.java:126)
        at
org.apache.commons.lang.exception.ExceptionUtils.getRootCause(Excepti
onUtils.java:167)
        at
org.apache.cocoon.util.log.CocoonLogFormatter.formatPatternRun(Cocoon
LogFormatter.java:174)
        at
org.apache.cocoon.util.log.ExtensiblePatternFormatter.format(Extensib
lePatternFormatter.java:248)
        at
org.apache.log.output.AbstractOutputTarget.format(AbstractOutputTarge
t.java:113)
        at
org.apache.log.output.AbstractOutputTarget.doProcessEvent(AbstractOut
putTarget.java:72)
        at
org.apache.log.output.AbstractTarget.processEvent(AbstractTarget.java
:108)
        at org.apache.log.Logger.fireEvent(Logger.java:632)
        at org.apache.log.Logger.output(Logger.java:607)
        at org.apache.log.Logger.output(Logger.java:590)
        at org.apache.log.Logger.info(Logger.java:168)
        at
org.apache.avalon.framework.logger.LogKitLogger.info(LogKitLogger.jav
a:78)
        at
org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet.ja
va:1416)
        at
org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:499)
        at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
java:1105)
        at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:93
2)
        at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
t.java:3917)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4
201)
        at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:759)
        at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:73
9)
        at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)

        at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.jav
a:904)
        at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.j
ava:867)
        at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474
)
        at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
        at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
:310)
        at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:119)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)

        at
org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)

        at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442
)
        at
org.apache.catalina.core.StandardService.start(StandardService.java:4
50)
        at
org.apache.catalina.core.StandardServer.start(StandardServer.java:709
)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
[Full GC 39900K->26547K(260160K), 0.2327466 secs]
trying to register database
trying to register database
Logging Error: Unknown error writing event.
java.lang.NullPointerException
        at
org.apache.commons.lang.exception.ExceptionUtils.getCauseUsingMethodN
ame(ExceptionUtils.java:220)
        at
org.apache.commons.lang.exception.ExceptionUtils.getCause(ExceptionUt
ils.java:142)
        at
org.apache.commons.lang.exception.ExceptionUtils.getCause(ExceptionUt
ils.java:126)
        at
org.apache.commons.lang.exception.ExceptionUtils.getRootCause(Excepti
onUtils.java:167)
        at
org.apache.cocoon.util.log.CocoonLogFormatter.formatPatternRun(Cocoon
LogFormatter.java:174)
        at
org.apache.cocoon.util.log.ExtensiblePatternFormatter.format(Extensib
lePatternFormatter.java:248)
        at
org.apache.log.output.AbstractOutputTarget.format(AbstractOutputTarge
t.java:113)
        at
org.apache.log.output.AbstractOutputTarget.doProcessEvent(AbstractOut
putTarget.java:72)
        at
org.apache.log.output.AbstractTarget.processEvent(AbstractTarget.java
:108)
        at org.apache.log.Logger.fireEvent(Logger.java:632)
        at org.apache.log.Logger.output(Logger.java:607)
        at org.apache.log.Logger.output(Logger.java:590)
        at org.apache.log.Logger.info(Logger.java:168)
        at
org.apache.avalon.framework.logger.LogKitLogger.info(LogKitLogger.jav
a:78)
        at
org.apache.cocoon.components.thread.DefaultRunnableManager.printPoolI
nfo(DefaultRunnableManager.java:717)
        at
org.apache.cocoon.components.thread.DefaultRunnableManager.createPool
(DefaultRunnableManager.java:691)
        at
org.apache.cocoon.components.thread.DefaultRunnableManager.configThre
adPool(DefaultRunnableManager.java:601)
        at
org.apache.cocoon.components.thread.DefaultRunnableManager.configure(
DefaultRunnableManager.java:152)
        at
org.apache.avalon.framework.container.ContainerUtil.configure(Contain
erUtil.java:201)
        at
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInst
ance(DefaultComponentFactory.java:289)
        at
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.init
ialize(ThreadSafeComponentHandler.java:108)
        at
org.apache.avalon.excalibur.component.ExcaliburComponentManager.looku
p(ExcaliburComponentManager.java:278)
        at
org.apache.cocoon.components.CocoonComponentManager.lookup(CocoonComp
onentManager.java:354)
        at
org.apache.avalon.framework.service.WrapperServiceManager.lookup(Wrap
perServiceManager.java:68)
        at
org.apache.cocoon.components.flow.ContinuationsManagerImpl.configure(
ContinuationsManagerImpl.java:174)
        at
org.apache.avalon.framework.container.ContainerUtil.configure(Contain
erUtil.java:201)
        at
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInst
ance(DefaultComponentFactory.java:289)
        at
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.init
ialize(ThreadSafeComponentHandler.java:108)
        at
org.apache.avalon.excalibur.component.ExcaliburComponentManager.initi
alize(ExcaliburComponentManager.java:524)
        at
org.apache.cocoon.components.CocoonComponentManager.initialize(Cocoon
ComponentManager.java:583)
        at
org.apache.avalon.framework.container.ContainerUtil.initialize(Contai
nerUtil.java:244)
        at org.apache.cocoon.Cocoon.initialize(Cocoon.java:345)
        at
org.apache.avalon.framework.container.ContainerUtil.initialize(Contai
nerUtil.java:244)
        at
org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet.ja
va:1429)
        at
org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:499)
        at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
java:1105)
        at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:93
2)
        at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
t.java:3917)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4
201)
        at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:759)
        at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:73
9)
        at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)

        at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.jav
a:904)
        at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.j
ava:867)
        at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474
)
        at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
        at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
:310)
        at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:119)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)

        at
org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)

        at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442
)
        at
org.apache.catalina.core.StandardService.start(StandardService.java:4
50)
        at
org.apache.catalina.core.StandardServer.start(StandardServer.java:709
)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Logging Error: Unknown error writing event.
java.lang.NullPointerException
        at
org.apache.commons.lang.exception.ExceptionUtils.getCauseUsingMethodN
ame(ExceptionUtils.java:220)
        at
org.apache.commons.lang.exception.ExceptionUtils.getCause(ExceptionUt
ils.java:142)
        at
org.apache.commons.lang.exception.ExceptionUtils.getCause(ExceptionUt
ils.java:126)
        at
org.apache.commons.lang.exception.ExceptionUtils.getRootCause(Excepti
onUtils.java:167)
        at
org.apache.cocoon.util.log.CocoonLogFormatter.formatPatternRun(Cocoon
LogFormatter.java:174)
        at
org.apache.cocoon.util.log.ExtensiblePatternFormatter.format(Extensib
lePatternFormatter.java:248)
        at
org.apache.log.output.AbstractOutputTarget.format(AbstractOutputTarge
t.java:113)
        at
org.apache.log.output.AbstractOutputTarget.doProcessEvent(AbstractOut
putTarget.java:72)
        at
org.apache.log.output.AbstractTarget.processEvent(AbstractTarget.java
:108)
        at org.apache.log.Logger.fireEvent(Logger.java:632)
        at org.apache.log.Logger.output(Logger.java:607)
        at org.apache.log.Logger.output(Logger.java:590)
        at org.apache.log.Logger.info(Logger.java:168)
        at
org.apache.avalon.framework.logger.LogKitLogger.info(LogKitLogger.jav
a:78)
        at
org.apache.cocoon.components.thread.DefaultRunnableManager.printPoolI
nfo(DefaultRunnableManager.java:730)
        at
org.apache.cocoon.components.thread.DefaultRunnableManager.createPool
(DefaultRunnableManager.java:691)
        at
org.apache.cocoon.components.thread.DefaultRunnableManager.configThre
adPool(DefaultRunnableManager.java:601)
        at
org.apache.cocoon.components.thread.DefaultRunnableManager.configure(
DefaultRunnableManager.java:152)
        at
org.apache.avalon.framework.container.ContainerUtil.configure(Contain
erUtil.java:201)
        at
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInst
ance(DefaultComponentFactory.java:289)
        at
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.init
ialize(ThreadSafeComponentHandler.java:108)
        at
org.apache.avalon.excalibur.component.ExcaliburComponentManager.looku
p(ExcaliburComponentManager.java:278)
        at
org.apache.cocoon.components.CocoonComponentManager.lookup(CocoonComp
onentManager.java:354)
        at
org.apache.avalon.framework.service.WrapperServiceManager.lookup(Wrap
perServiceManager.java:68)
        at
org.apache.cocoon.components.flow.ContinuationsManagerImpl.configure(
ContinuationsManagerImpl.java:174)
        at
org.apache.avalon.framework.container.ContainerUtil.configure(Contain
erUtil.java:201)
        at
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInst
ance(DefaultComponentFactory.java:289)
        at
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.init
ialize(ThreadSafeComponentHandler.java:108)
        at
org.apache.avalon.excalibur.component.ExcaliburComponentManager.initi
alize(ExcaliburComponentManager.java:524)
        at
org.apache.cocoon.components.CocoonComponentManager.initialize(Cocoon
ComponentManager.java:583)
        at
org.apache.avalon.framework.container.ContainerUtil.initialize(Contai
nerUtil.java:244)
        at org.apache.cocoon.Cocoon.initialize(Cocoon.java:345)
        at
org.apache.avalon.framework.container.ContainerUtil.initialize(Contai
nerUtil.java:244)
        at
org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet.ja
va:1429)
        at
org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:499)
        at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
java:1105)
        at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:93
2)
        at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
t.java:3917)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4
201)
        at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:759)
        at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:73
9)
        at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)

        at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.jav
a:904)
        at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.j
ava:867)
        at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474
)
        at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
        at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
:310)
        at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:119)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)

        at
org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)

        at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442
)
        at
org.apache.catalina.core.StandardService.start(StandardService.java:4
50)
        at
org.apache.catalina.core.StandardServer.start(StandardServer.java:709
)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
[GC 42739K->27631K(260160K), 0.0096979 secs]



When I try to use Cocoon if ge the following error


javax.servlet.ServletException: Servlet.init() for servlet Cocoon threw
exception

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)

org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)

org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)

org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
	java.lang.Thread.run(Thread.java:595)


root cause 

java.lang.NoSuchFieldError: JAVA_VERSION_INT

org.apache.cocoon.components.language.programming.java.JavaLanguage.parameterize(JavaLanguage.java:119)

org.apache.avalon.framework.container.ContainerUtil.parameterize(ContainerUtil.java:228)

org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:294)

org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:108)

org.apache.avalon.excalibur.component.ExcaliburComponentSelector.addComponent(ExcaliburComponentSelector.java:705)

org.apache.cocoon.components.ExtendedComponentSelector.configure(ExtendedComponentSelector.java:229)

org.apache.avalon.framework.container.ContainerUtil.configure(ContainerUtil.java:201)

org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:289)

org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:108)

org.apache.avalon.excalibur.component.ExcaliburComponentManager.lookup(ExcaliburComponentManager.java:278)

org.apache.cocoon.components.CocoonComponentManager.lookup(CocoonComponentManager.java:354)

org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.compose(ProgramGeneratorImpl.java:139)

org.apache.avalon.framework.container.ContainerUtil.compose(ContainerUtil.java:173)

org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:266)

org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:108)

org.apache.avalon.excalibur.component.ExcaliburComponentManager.initialize(ExcaliburComponentManager.java:524)

org.apache.cocoon.components.CocoonComponentManager.initialize(CocoonComponentManager.java:583)

org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:244)
	org.apache.cocoon.Cocoon.initialize(Cocoon.java:345)

org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:244)

org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet.java:1429)
	org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:499)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)

org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)

org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)

org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
	java.lang.Thread.run(Thread.java:595)

Thanks is advance your your help


-- 
View this message in context: http://www.nabble.com/Null-pointer-when-using-Cocoon-tp16234077p16234077.html
Sent from the Cocoon - Dev mailing list archive at Nabble.com.


Mime
View raw message