[opencms-dev] Comments module:

Olli Aro olli_aro at yahoo.co.uk
Wed Sep 3 09:29:42 CEST 2008


Well you get a nullpointer on this line:

if ((getConfig().getList() <= 0) || (countCmts == 0)) {

The only possibility for null here is the getConfig() method, which gets your comment configuration file.

So, it looks like there is definitely problem with your configuration file. Not sure what to suggest if you do have your config file at /data/config.html and you are trying to view page within the same site scope.

Regards,

Olli

-----Original Message-----
From: Sandrine Prousteau [mailto:s.prousteau at eurelis.com] 
Sent: 01 September 2008 10:34
To: olli_aro at yahoo.co.uk; The OpenCms mailing list
Subject: RE: [opencms-dev] Comments module:

HI
I have the same error. I've look at the stacktrace and I've got this:

java.lang.NullPointerException
	at com.alkacon.opencms.comments.CmsCommentsAccess.getPages(CmsCommentsAccess..java:574)
	at com.alkacon.opencms.comments.CmsCommentsAccess.init(CmsCommentsAccess.java:684)
	at org.opencms.jsp.CmsJspLoginBean.<init>(CmsJspLoginBean.java:95)


I've looked at the source code but it's not easy to read all the code!!! Error is somewhere in the .getPages() function...


(I'm on OpenCms705 and my config file is under a /sites/website/ I've configured in the opencms-system.xml file. My property "comments" point on my config file: /data/config.html.)



-----Message d'origine-----
De : opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] De la part de Olli Aro
Envoyé : lundi 1 septembre 2008 08:02
À : 'The OpenCms mailing list'
Objet : Re: [opencms-dev] Comments module:

Ok, not quite sure then. We have been running this module in testing couple of weeks not with no problems. One further idea, are you testing your module within a subsite scope (so your comments properly is not set to /sites/default/comments.xml but /comments.xml), since that might make a difference?

Other than that, maybe you could try to catch the exception in the JSP, so we could see the full stacktrace?

Regards,

Olli

-----Original Message-----
From: Marc Schlegel [mailto:my.mailing.lists at gmx.de] 
Sent: 31 August 2008 11:18
To: olli_aro at yahoo.co.uk; The OpenCms mailing list
Subject: Re: [opencms-dev] Comments module:

I checked the comments-property several times also starting the path
with / and without.


Olli Aro schrieb:
> I spent an hour debugging the very same copy and paste mistake last week when I installed the comments module, hence I knew what was wrong :)
>
> Regarding the null pointer, first things first - have you set the comments property and does it point to valid comment configuration?
>
> I know for a fact that would generate nullpointer hence asking.
>
> Regards,
>
> Olli
>
> -----Original Message-----
> From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Marc Schlegel
> Sent: 29 August 2008 16:02
> To: The OpenCms mailing list
> Subject: Re: [opencms-dev] Comments module:
>
> I did some research. The NullPointer is thrown here
>
> org.apache.jsp.WEB_002dINF.jsp.offline.system.modules.com_alkacon_opencms_comments.elements.comment_005fmain_jsp._jspService(comment_005fmain_jsp.java:93)
>
> so I checked the particular line and the code there is definately not from me
>
> CmsCommentsAccess alkaconCmt = new CmsCommentsAccess(pageContext, request, response); // Errorline
>
>
>
> Marc Schlegel schrieb:
>   
>> Thanks Olli...I guess I have to pay 5€ to the copy&paste-cashbox ;)
>>
>> But I am getting a NullPointerException now. My page actually only
>> contains the template-inclusion and the code from documentation.
>>
>> <%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
>> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
>> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
>>
>> <cms:include property="template" element="head" />
>> <div class="element">
>>     <!-- COMMENTS START -->
>>     <c:set var="comments"><cms:property name="comments"
>> file="search"/></c:set>
>>     <c:if test="${!empty comments}">
>>     <cms:include
>>    
>> file="%(link.weak:/system/modules/com.alkacon.opencms.comments/elements/comment_main.jsp:a1074f4d-1205-11dd-8a3f-111d34530985)"
>>   
>>     <cms:param name="cmturi" value="${cms.requestContext.uri}" />
>>     </cms:include>
>>     </c:if>
>>     <!-- COMMENTS END -->
>> </div>
>> <cms:include property="template" element="foot" />
>>
>> regards
>> -- Marc
>>     


_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev





More information about the opencms-dev mailing list