[opencms-dev] Issue with OpenCMS
Jaisy Ann Cheriyan
Jaisy_Cheriyan at infosys.com
Mon Jan 8 07:45:53 CET 2007
Hi,
I have just started using OpenCms and started with a tutorial I found on
the
web.
In this tutorial a default body is created :
<?xml version="1.0" encoding="ISO-8859-1"?>
<XMLTEMPLATE>
<TEMPLATE>
<![CDATA[]]>
</TEMPLATE>
</XMLTEMPLATE>
An xml for the template
<?xml version="1.0" encoding="ISO-8859-1"?>
<xmltemplate>
<stylesheet>/resources/css/test.css</stylesheet>
<template><element name="jsptemplate"/></template>
<elementdef name="jsptemplate">
<class> org.opencms.jsp.CmsJspTagTemplate</class>
<template>../jsptemplates/test.jsp</template>
</elementdef>
</xmltemplate>
A jsp template
<%@ page import=" org.opencms.jsp.*" %>
<%@ page session="false" %>
<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms"
<http://www.opencms.org/taglib/cms%22> %>
<%
// Create a JSP action element
org.opencms.jsp.CmsJspActionElement cms = new
CmsJspActionElement(pageContext, request, response);
%>
<cms:template element="head">
<html>
<head>
<title>Test Site - <cms:property name="title" escapeHtml="true"
/></title>
<link title="Flex Stylesheet" href
="<cms:link>/resources/css/test.css</cms:link>" type="text/css"
rel="STYLESHEET">
</head>
<body>
<cms:include file="navigation.jsp" />
</cms:template>
<cms:template element="body">
<cms:include element="body" />
</cms:template>
<cms:template element="foot">
</body>
</html>
</cms:template>
When I try to create a new html page using this template and
default_body
and try to edit it, I get a NullPointerException.
This is the stacktrace :
java.lang.NullPointerException
at
org.opencms.xml.page.CmsXmlPage.convertOldDocument(CmsXmlPage.java:554)
at
org.opencms.xml.page.CmsXmlPage.initDocument(CmsXmlPage.java:488)
at org.opencms.xml.page.CmsXmlPage.<init>(CmsXmlPage.java:161)
at
org.opencms.xml.page.CmsXmlPageFactory.unmarshal(CmsXmlPageFactory.java:
144)
at
org.opencms.xml.page.CmsXmlPageFactory.unmarshal(CmsXmlPageFactory.java:
209)
at
org.opencms.xml.page.CmsXmlPageFactory.unmarshal(CmsXmlPageFactory.java:
158)
at
org.opencms.workplace.editors.CmsSimplePageEditor.initWorkplaceRequestVa
lues(CmsSimplePageEditor.java:246)
at
org.opencms.editors.fckeditor.CmsFCKEditor.initWorkplaceRequestValues(Cm
sFCKEditor.java:178)
at
org.opencms.workplace.CmsWorkplace.initWorkplaceMembers(CmsWorkplace.jav
a:1842)
at
org.opencms.workplace.CmsWorkplace.<init>(CmsWorkplace.java:248)
at
org.opencms.workplace.tools.CmsToolDialog.<init>(CmsToolDialog.java:93)
at org.opencms.workplace.CmsDialog.<init>(CmsDialog.java:249)
at
org.opencms.workplace.editors.CmsEditor.<init>(CmsEditor.java:202)
at
org.opencms.workplace.editors.CmsDefaultPageEditor.<init>(CmsDefaultPage
Editor.java:116)
at
org.opencms.workplace.editors.CmsSimplePageEditor.<init>(CmsSimplePageEd
itor.java:90)
at
org.opencms.editors.fckeditor.CmsFCKEditor.<init>(CmsFCKEditor.java:92)
at
org.apache.jsp.WEB_002dINF.jsp.offline.system.workplace.editors.fckedito
r.editor_jsp._jspService(editor_jsp.java:51)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:324)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:157)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc
her.java:704)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDisp
atcher.java:590)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispat
cher.java:510)
at
org.opencms.flex.CmsFlexRequestDispatcher.includeExternal(CmsFlexRequest
Dispatcher.java:194)
at
org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatch
er.java:170)
at
org.opencms.loader.CmsJspLoader.service(CmsJspLoader.java:433)
at
org.opencms.flex.CmsFlexRequestDispatcher.includeInternalWithCache(CmsFl
exRequestDispatcher.java:423)
at
org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatch
er.java:174)
at
org.opencms.jsp.CmsJspTagInclude.includeActionWithCache(CmsJspTagInclude
.java:358)
at
org.opencms.jsp.CmsJspTagInclude.includeTagAction(CmsJspTagInclude.java:
239)
at
org.opencms.jsp.CmsJspTagInclude.includeTagAction(CmsJspTagInclude.java:
166)
at
org.opencms.jsp.CmsJspActionElement.include(CmsJspActionElement.java:510
)
at
org.opencms.jsp.CmsJspActionElement.include(CmsJspActionElement.java:534
)
at
org.apache.jsp.WEB_002dINF.jsp.offline.system.workplace.editors.editor_0
05fmain_jsp._jspService(editor_005fmain_jsp.java:50)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:324)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:157)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc
her.java:704)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDisp
atcher.java:590)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispat
cher.java:510)
at
org.opencms.flex.CmsFlexRequestDispatcher.includeExternal(CmsFlexRequest
Dispatcher.java:194)
at
org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatch
er.java:170)
at
org.opencms.loader.CmsJspLoader.service(CmsJspLoader.java:433)
at
org.opencms.flex.CmsFlexRequestDispatcher.includeInternalWithCache(CmsFl
exRequestDispatcher.java:423)
at
org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatch
er.java:174)
at
org.opencms.loader.CmsJspLoader.dispatchJsp(CmsJspLoader.java:467)
at org.opencms.loader.CmsJspLoader.load(CmsJspLoader.java:412)
at
org.opencms.loader.CmsResourceManager.loadResource(CmsResourceManager.ja
va:730)
at
org.opencms.main.OpenCmsCore.showResource(OpenCmsCore.java:1349)
at
org.opencms.main.OpenCmsServlet.doGet(OpenCmsServlet.java:151)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:157)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:214)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
20)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCon
textValve.java:198)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:152)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
20)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:137)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:104)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:118)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:102)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
20)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:109)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
20)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:79
9)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onnection(Http11Protocol.java:705)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:57
7)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:683)
at java.lang.Thread.run(Unknown Source)
I have actually installed OpenCMS 6.2.3 but this documentation is of
version 5
But where do I have to bring about the changes.
Is there such a documentation available of creating templates for
version 6.
Please help!!
Jaisy
**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20070108/af1d81aa/attachment.htm>
More information about the opencms-dev
mailing list