[opencms-dev] NPE during module development

Jorg Heymans jh at coeno.com
Mon Feb 3 16:09:43 CET 2003


I am currently running opencms 4.7.7.
What is the branch name for this release in cvs so I can step through 
the source and nail down this problem. I could not find the older 
sources on the website anymore.

Jorg Heymans wrote:

> Hi ,
>
> I have written several fairly large modules using the 
> Contentdefinition/Backoffice paradigm. The process of learning how to 
> do this and what bugs to avoid was painfull and long. Just when I 
> thought i'ld seen it all, my code hits another nasty 
> nullpointerexception in the opencms core.
>
> This npe does not occur when I "delete" a contentdefinition or 
> "create" a new one, it only occurs when i "edit" an existing one. Any 
> idea or pointer at all as to where I could look for this error would 
> be appreciated. I have stripped down all relevant classes and methods 
> to just logging statements and the error still occurs. I did the same 
> for my templates to no avail. I also cleared the tomcat cache (this 
> has solved unexplainable things before) without success.
>
> Does the following stacktrace look familiar to any of the developers ?
>
> java.lang.NullPointerException
>    at 
> com.opencms.defaults.A_CmsBackoffice.getContentEditInternal(A_CmsBackoffice.java:3096) 
>
>    at 
> com.opencms.defaults.A_CmsBackoffice.getContent(A_CmsBackoffice.java:442)
>    at 
> com.opencms.template.cache.CmsElementXml.getContent(CmsElementXml.java:169) 
>
>    at 
> com.opencms.template.cache.CmsUri.callCanonicalRoot(CmsUri.java:169)
>    at 
> com.opencms.template.cache.CmsElementCache.callCanonicalRoot(CmsElementCache.java:148) 
>
>    at 
> com.opencms.launcher.CmsXmlLauncher.generateOutput(CmsXmlLauncher.java:228) 
>
>    at com.opencms.launcher.CmsXmlLauncher.launch(CmsXmlLauncher.java:283)
>    at 
> com.opencms.launcher.A_CmsLauncher.initlaunch(A_CmsLauncher.java:272)
>    at com.opencms.core.OpenCms.showResource(OpenCms.java:588)
>    at 
> com.opencms.core.OpenCmsHttpServlet.doGet(OpenCmsHttpServlet.java:223)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>    at com.opencms.boot.OpenCmsServlet.service(OpenCmsServlet.java:117)
>    at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) 
>
>    at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) 
>
>    at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260) 
>
>    at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) 
>
>    at 
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) 
>
>    at 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>    at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) 
>
>    at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) 
>
>    at 
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) 
>
>    at 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>    at 
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) 
>
>    at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) 
>
>    at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) 
>
>    at 
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) 
>
>    at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) 
>
>    at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) 
>
>    at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) 
>
>    at 
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)
>    at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) 
>
>    at 
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) 
>
>    at 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>    at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) 
>
>    at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) 
>
>    at 
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) 
>
>    at 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>    at 
> org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
>    at 
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432) 
>
>    at 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386) 
>
>    at 
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534) 
>
>    at 
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530) 
>
>    at java.lang.Thread.run(Thread.java:536)
>
> Thanks
> Jorg Heymans
>
>




More information about the opencms-dev mailing list