AW: [opencms-dev] element cache & multiple bodies -> NullPointerE xception
Michael Dernen
Michael.Dernen at framfab.de
Thu Sep 6 17:58:25 CEST 2001
Hi Oliver,
I'm not sure how to solve your problem. The message
"[body] ???" is usually a hint that an exception was
thrown while generating the element. I have encountered
this problem, when I have manually edited the templatefile
and the xml-structure was not correct or when I used own
template classes that throwed an exception. If you just
put static content in your body2 element via the html-editor
and don't do any customized things here I have no hint how your
problem could be solved.
Regards,
Michael
-----Ursprüngliche Nachricht-----
Von: O_Faulhaber at push-interactive.de
[mailto:O_Faulhaber at push-interactive.de]
Gesendet: Donnerstag, 6. September 2001 16:59
An: opencms-dev at www.opencms.com
Betreff: AW: [opencms-dev] element cache & multiple bodies ->
NullPointerE xception
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