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

O_Faulhaber at push-interactive.de O_Faulhaber at push-interactive.de
Thu Sep 6 16:59:12 CEST 2001


Hi Michael,

thanks for your quick response.
Adding the class information to the elementdef section will prevent the
throwing of an exception, but instead of the body2's content the String
"[body2] ???" is being displayed.

Disableing the element cache will let display the page correctly.

The solution might be right closed, but I can't see it. (-> maybe I'm
standing on the hose - like we germans say) ;o)

Can you please help me?

Thanks,
Oliver


> -----Urspr√ľngliche Nachricht-----
> Von: Michael Dernen [mailto:Michael.Dernen at framfab.de]
> Gesendet: Donnerstag, 6. September 2001 14:33
> An: 'opencms-dev at www.opencms.com'
> Betreff: AW: [opencms-dev] element cache & multiple bodies ->
> NullPointerE xception
> 
> 
> 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