[opencms-dev] What 's wrong? Template for XML-Content.

Anatol opencms at recordcaster.de
Thu Jul 21 09:05:26 CEST 2005


Hi All!

I don't understand what's wrong. Could anybody help me? I create my own 
XML-Content definition (OpenCms 6.0) for an own NewsArticle. All works 
fine, but if I try to integrate the detail-news.html page into a 
template-structure I get the sweet error: null :-/


My working(!) detail-news.html looks like this:

******************************************************************

<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
<%@ page session="false" %>
	
<cms:include file="../elements/content_news.jsp" />

..................................................................	
******************************************************************		

In content-news.jsp I handle the content-loads, -loops and -show tags. 
But this seems not to be the source of the problem.

This works so far so gut - but without any layout. So I add a 
template-element to it:



******************************************************************

<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
<%@ page session="false" %>

<cms:include property="template" element="head" />		

	<cms:include file="../elements/content_news.jsp" />
					
<cms:include property="template" element="foot" />

..................................................................
******************************************************************

I add the template-property to this file, too:
/system/module/de.test/templates/mytemplate

But if I tried to load the news000X.html-File the system raises an error 
null.

I made a backstep and changed the detail-news.html file a bit:



******************************************************************

<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
<%@ page session="false" %>

<cms:include property="template" element="head" />		
	HELLO WORLD					
<cms:include property="template" element="foot" />

..................................................................
******************************************************************

But this result in the same error.

Error: null
Details:

java.lang.NullPointerException
	at 
org.opencms.xml.A_CmsXmlDocument.getBookmarkName(A_CmsXmlDocument.java:116)
	at org.opencms.xml.A_CmsXmlDocument.getBookmark(A_CmsXmlDocument.java:532)
	at 
org.opencms.xml.A_CmsXmlDocument.getValueInternal(A_CmsXmlDocument.java:606)
	at 
org.opencms.xml.A_CmsXmlDocument.getStringValue(A_CmsXmlDocument.java:241)
[...]

What's wrong? Has anybody an idea?

Greetings
Anatol



More information about the opencms-dev mailing list