[opencms-dev] Comments module:

Marc Schlegel my.mailing.lists at gmx.de
Sat Sep 6 15:26:53 CEST 2008


Thanks for your help

Since I am on a production environment I couldnt install OC fresh, but I
did so on my developing machine (Ubuntu 8.1, production is running on
XP). I am encountering the same error there. I will continue to resolve
this problem and if I find a solution posts it here. The only idea I
have right now is to use the module in my template rather than in my
site directly.

regards
-- Marc

Olli Aro schrieb:
> Yeah, I am also running out of ideas here. We have had no problems with this module.
>
> The line for the error is:
>
> if ((getConfig().getList() <= 0) || (countCmts == 0)) {
>
> So, not that many possible options that could throw a nullpointer there :(
>
> Have you tried to install completely new OpenCms on latest java, tomcat and mysql and see if you still have a problem with that?
>
> Regards,
>
> Olli
>
> -----Original Message-----
> From: Marc Schlegel [mailto:my.mailing.lists at gmx.de] 
> Sent: 03 September 2008 13:52
> To: olli_aro at yahoo.co.uk; The OpenCms mailing list
> Subject: Re: [opencms-dev] Comments module:
>
> Ok, I tried all kinds of possibilities regarding the comments-property:
> removed special character like "_", and copied all files (config and
> jsp) to the root page of my site (its not in the system-folder). No success.
>
> If I am reading the StackTrace right, the problem arises in the method
> getPages()
>
> Caused by: 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)
> 	at com.alkacon.opencms.comments.CmsCommentsAccess.<init>(CmsCommentsAccess.java:184)
> 	at org.apache.jsp.WEB_002dINF.jsp.offline.system.modules.com_alkacon_opencms_comments.elements.comment_005fmain_jsp._jspService(comment_005fmain_jsp.java:93)
> 	
>
> I am really running out of ideas but this module is so promising, I have
> quite some ideas how to use.
>
> regards
> -- Marc
>
> Olli Aro schrieb:
>   
>> 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
>>>>     
>>>>       
>>>>         




More information about the opencms-dev mailing list