[opencms-dev] Issue with OpenCMS
Jonathan Woods
jonathan.woods at scintillance.com
Mon Jan 8 08:26:26 CET 2007
Jaisy -
As you know, the tutorial is for version 5, and I'm not sure even if the
templating mechanism it illustrates is still fully supported in 6.2.3. The
best thing to do is to start from a fresh installation of 6.2.3 which
includes the documentation module (since that's how Alkacon distribute
OpenCms documentation). This will give you a browseable set of
documentation which includes instructions on creating templates. You could
also buy the chief OpenCms book on the market -
http://www.packtpub.com/OpenCMS6-admin.
Jon
_____
From: sfdbfoui at host2.scintillance.com
[mailto:sfdbfoui at host2.scintillance.com] On Behalf Of Jaisy Ann Cheriyan
Sent: 08 January 2007 06:46
To: opencms-dev at opencms.org
Subject: [opencms-dev] Issue with OpenCMS
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.initWorkplaceRequestValues
(CmsSimplePageEditor.java:246)
at
org.opencms.editors.fckeditor.CmsFCKEditor.initWorkplaceRequestValues(CmsFCK
Editor.java:178)
at
org.opencms.workplace.CmsWorkplace.initWorkplaceMembers(CmsWorkplace.java:18
42)
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>(CmsDefaultPageEdit
or.java:116)
at
org.opencms.workplace.editors.CmsSimplePageEditor.<init>(CmsSimplePageEditor
.java:90)
at
org.opencms.editors.fckeditor.CmsFCKEditor.<init>(CmsFCKEditor.java:92)
at
org.apache.jsp.WEB_002dINF.jsp.offline.system.workplace.editors.fckeditor.ed
itor_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.java:3
24)
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(Application
FilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:157)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:704)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatch
er.java:590)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher
.java:510)
at
org.opencms.flex.CmsFlexRequestDispatcher.includeExternal(CmsFlexRequestDisp
atcher.java:194)
at
org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.j
ava:170)
at org.opencms.loader.CmsJspLoader.service(CmsJspLoader.java:433)
at
org.opencms.flex.CmsFlexRequestDispatcher.includeInternalWithCache(CmsFlexRe
questDispatcher.java:423)
at
org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.j
ava:174)
at
org.opencms.jsp.CmsJspTagInclude.includeActionWithCache(CmsJspTagInclude.jav
a: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_005fm
ain_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.java:3
24)
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(Application
FilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:157)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:704)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatch
er.java:590)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher
.java:510)
at
org.opencms.flex.CmsFlexRequestDispatcher.includeExternal(CmsFlexRequestDisp
atcher.java:194)
at
org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.j
ava:170)
at org.opencms.loader.CmsJspLoader.service(CmsJspLoader.java:433)
at
org.opencms.flex.CmsFlexRequestDispatcher.includeInternalWithCache(CmsFlexRe
questDispatcher.java:423)
at
org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.j
ava: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.java:7
30)
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(Application
FilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:157)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:214)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext
Valve.java:198)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:152)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137
)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118
)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:102)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:109)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
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:799)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:705)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a: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/cecc0af4/attachment.htm>
More information about the opencms-dev
mailing list