AW: [opencms-dev] element cache & multiple bodies -> NullPointerE xception

Michael Dernen Michael.Dernen at framfab.de
Thu Sep 6 14:32:51 CEST 2001


Hello,
the solution to your problem is probably to add a 
class information to the elementdef of the second body
like this:

<ELEMENTDEF name="body2">
	<CLASS>com.opencms.template.CmsXmlTemplate</CLASS>
	<TEMPLATESELECTOR>body2</TEMPLATESELECTOR>
</ELEMENTDEF>


It's a known bug that the "fallback" to the class of the 
body element isn't working in the current opencms release 4.4


Regards,
 Michael


-----Ursprüngliche Nachricht-----
Von: O_Faulhaber at push-interactive.de
[mailto:O_Faulhaber at push-interactive.de]
Gesendet: Donnerstag, 6. September 2001 14:02
An: opencms-dev at www.opencms.com
Betreff: [opencms-dev] element cache & multiple bodies ->
NullPointerException


Hi OpenCms-Developers

I need urgent assistance: when i request a page which contains two bodies
(defined in the master template) and the element cache is enabled (in
opencms.properties) then a NullpointerException will be thrown (take look at
stacktrace.txt). The Exception only occures, when the templateselector-tag
is used in the elementdef section.

i am really helpless, what am i doing wrong?

------master template------

<?xml version="1.0"?>
<XMLTEMPLATE>
<TEMPLATE>
<![CDATA[
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>]]><method name="getTitle"/><![CDATA[</title>
</head>
<BODY>
	]]>
	<ELEMENT name="body"/>
	<ELEMENT name="body2"/>
	<![CDATA[
</BODY>
</html>
]]>
</TEMPLATE>
<ELEMENTDEF name="body2">
	<TEMPLATESELECTOR>body2</TEMPLATESELECTOR>
</ELEMENTDEF>
</XMLTEMPLATE>


--------------------------------------------------------------------
Dipl.-Inform./Medien (FH)       Oliver Faulhaber
Push Interactive GmbH           Fon: +49/202/2427-346
VillaMedia, Viehhofstrasse 125  Fax: +49/202/2427-310
D-42117 Wuppertal               URL: http://www.push-interactive.de/
--------------------------------------------------------------------




More information about the opencms-dev mailing list