[opencms-dev] problems with the template mechanism

Michael Billanitsch mbillanitsch at onyx.tv
Thu Jan 25 19:00:04 CET 2001


Hello,
I've setup OpenCMS 4.1.46 and Xerces 1.2.3. Now I'm trying to find out how
the template mechanism works. How it is discribed in point 2.4 of the
template documentation I compiled the new "hello world"-class and wrote the
templates. If I try now to have a look at the page, which should show
something like "Hello world from Java!" I get the following error message:

[CmsException]: 21 XML parsing error. Detailed Error: Cannot parse XML file
"/content/templates/vorlage4". org.xml.sax.SAXParseException: An invalid XML
character (Unicode: 0x0) was found in the CDATA section.. 
	at java.lang.Throwable.<init>(Throwable.java:96)
	at java.lang.Exception.<init>(Exception.java:44)
	at com.opencms.core.CmsException.<init>(CmsException.java:319)
	at
com.opencms.template.A_CmsXmlContent.throwException(A_CmsXmlContent.java:162
5)
	at
com.opencms.template.A_CmsXmlContent.parse(A_CmsXmlContent.java(Compiled
Code))
	at
com.opencms.template.A_CmsXmlContent.init(A_CmsXmlContent.java:846)
	at
com.opencms.template.CmsXmlTemplateFile.<init>(CmsXmlTemplateFile.java:76)
	at
com.opencms.template.CmsXmlTemplate.getOwnTemplateFile(CmsXmlTemplate.java:3
70)
	at
com.opencms.template.CmsXmlTemplate.getContent(CmsXmlTemplate.java:147)
	at
com.opencms.template.CmsXmlTemplate.getContent(CmsXmlTemplate.java:125)
	at
com.opencms.template.CmsRootTemplate.getMasterTemplate(CmsRootTemplate.java:
79)
	at
com.opencms.launcher.A_CmsLauncher.callCanonicalRoot(A_CmsLauncher.java:95)
	at
com.opencms.launcher.CmsXmlLauncher.generateOutput(CmsXmlLauncher.java:172)
	at
com.opencms.launcher.CmsXmlLauncher.launch(CmsXmlLauncher.java:212)
	at
com.opencms.launcher.A_CmsLauncher.initlaunch(A_CmsLauncher.java:271)
	at com.opencms.core.OpenCms.showResource(OpenCms.java:332)
	at com.opencms.core.OpenCmsServlet.doGet(OpenCmsServlet.java:455)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:499)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
	at
org.apache.jserv.JServConnection.processRequest(JServConnection.java:317)
	at
org.apache.jserv.JServConnection.run(JServConnection.java(Compiled Code))
	at java.lang.Thread.run(Thread.java(Compiled Code))

Has anybody an idea, what I have done wrong?
Maybe it is usefull to see the content of the file vorlage4

<?xml version="1.0"?>
<XMLTEMPLATE>
<TEMPLATE>
<![CDATA[
<HTML>
<HEAD>
<TITLE>]]><method name="getTitle"/><![CDATA[</TITLE>
</HEAD>
<BODY>]]><ELEMENT name="body"><![CDATA[
</BODY> ]]> </TEMPLATE></XMLTEMPLATE>

Kind regards,
Michael Billanitsch

_________________________
onyx.tv
Online Dept.
Michael Billanitsch
Im Mediapark 6b
D-50670 Köln
Fon:   +49 (0)221 57437-686
Mobil: +49 (0)177 3113861
Fax:   +49 (0)221 57437-690
eMail: mbillanitsch at onyx.tv
http://www.onyx.tv



More information about the opencms-dev mailing list