Fóruns

Início » Liferay Portal » English » 3. Development

Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
G K
liferay-ui:discussion
26 de Novembro de 2010 13:09
Resposta

G K

Ranking: New Member

Mensagens: 5

Data de entrada: 22 de Novembro de 2010

Mensagens recentes

I am trying to use liferay-ui:discussion to add a comment to a wall post in a portlet.
here is the code:

 1<portlet:actionURL var="discussionURL">
 2                        <portlet:param name="struts_action" value="/wall/edit_wallentry_discussion" />
 3                    </portlet:actionURL>
 4            
 5<liferay-ui:discussion
 6    className="<%= WallEntry.class.getName() %>"
 7    classPK="<%= wallEntry.getWallEntryId() %>"
 8    formAction="www.google.com"
 9    formName="fm2"
10    ratingsEnabled="true"
11    redirect="<%= currentURL %>"
12    subject="Wall comment"
13    userId="<%= user2.getUserId() %>"
14/>


here is the struts-config.xml that I created under WEB-INF:
1
2<struts-config>
3    <action-mappings>
4        <action path="/wall/edit_wallentry_discussion" type="com.liferay.portlet.messageboards.action.EditDiscussionAction">
5            <forward name="portlet.message_boards.error" path="portlet.journal_content.error" />
6        </action>
7    </action-mappings>
8</struts-config>


The UI for discussion shows up but I can never click "Reply" button because it's disabled.
Any suggestions?

Thanks!
Esteban Lopez
RE: liferay-ui:discussion
30 de Novembro de 2010 03:57
Resposta

Esteban Lopez

Ranking: Junior Member

Mensagens: 26

Data de entrada: 3 de Novembro de 2010

Mensagens recentes

I have the same problem, can anybody help us??
G K
RE: liferay-ui:discussion
4 de Dezembro de 2010 20:27
Resposta

G K

Ranking: New Member

Mensagens: 5

Data de entrada: 22 de Novembro de 2010

Mensagens recentes

Any suggestions? I have not yet figured it out. Is it really so hard to reuse liferay-ui:discussion?

Thanks.
Felix Ashirov
RE: liferay-ui:discussion
6 de Dezembro de 2010 01:58
Resposta

Felix Ashirov

Ranking: Regular Member

Mensagens: 128

Data de entrada: 26 de Fevereiro de 2010

Mensagens recentes

The correctness of the specified "formAction" value is in doubt.
As i know the formAction should point to your portlet URL, which has implementation of comment saving.
View the Liferay portlets' source that use "liferay-ui:discussion", this will help
G K
RE: liferay-ui:discussion
6 de Dezembro de 2010 19:30
Resposta

G K

Ranking: New Member

Mensagens: 5

Data de entrada: 22 de Novembro de 2010

Mensagens recentes

I looked at portlets in Liferay source. It appears they all use the same com.liferay.portlet.StrutsPortlet. I can't use it in my portlet because I have my own portlet class that inherits MVCPortlet.
Julio Camarero
RE: liferay-ui:discussion
6 de Dezembro de 2010 22:28
Resposta

Julio Camarero

LIFERAY STAFF

Ranking: Liferay Legend

Mensagens: 1666

Data de entrada: 15 de Julho de 2008

Mensagens recentes

Hi G K,

MVCPortlet has a method called "invokeTaglibDiscussion", you just need to call that method.

cheers!
G K
RE: liferay-ui:discussion
8 de Dezembro de 2010 08:46
Resposta

G K

Ranking: New Member

Mensagens: 5

Data de entrada: 22 de Novembro de 2010

Mensagens recentes

So I basically have to create an action in my MvcProtlet that will invoke invokeTaglibDiscussion and pass response and request?

Thanks.
G K
RE: liferay-ui:discussion
8 de Dezembro de 2010 19:24
Resposta

G K

Ranking: New Member

Mensagens: 5

Data de entrada: 22 de Novembro de 2010

Mensagens recentes

So in my controller class that extends MVCPortlet, I created action method:

1   
2public void postOnTheWall(ActionRequest request, ActionResponse response) throws Exception {
3        invokeTaglibDiscussion(request, response);
4}


and in the markup I used portlet:actionURL to get the url to the action.

1
2
3<portlet:actionURL name="postOnTheWall" var="postOnTheWallUrl"  />


I set formAction attribute to postOnTheWallUrl.toString(). And it still does not work, the post button is just disabled. I tried enabling it via firebug, it then posts back into nowhere but no to my action and even controller.
Esteban Lopez
RE: liferay-ui:discussion
9 de Dezembro de 2010 01:31
Resposta

Esteban Lopez

Ranking: Junior Member

Mensagens: 26

Data de entrada: 3 de Novembro de 2010

Mensagens recentes

Hi G K,

Maybe I have solved it,

in the view.jsp you have to use the taglib like this.

 1
 2<portlet:actionURL var="discussionURL" />
 3
 4                <liferay-ui:discussion
 5                    className="<%= ent.getClassName() %>"
 6                    classPK="<%= ent.getClassPK() %>"
 7                    formAction="<%= discussionURL %>"
 8                    formName="fm3"
 9                    ratingsEnabled="true"
10                    redirect="<%= currentURL %>"
11                    subject="<%= ent.getTitle() %>"
12                    userId="<%= ent.getUserId() %>"
13                />



ent is the name of the entity which I want to comment. Then in the java class you have to implement the processAction

 1
 2public void processAction(
 3            ActionRequest actionRequest, ActionResponse actionResponse)
 4        throws IOException, PortletException{
 5   
 6        Object[] args = new Object[] {
 7                new NullWrapper("org.apache.struts.action.ActionMapping"),
 8                new NullWrapper("org.apache.struts.action.ActionForm"),
 9                getPortletConfig(), actionRequest, actionResponse };
10
11        try {
12            PortalClassInvoker
13                    .invoke("com.liferay.portlet.messageboards.action.EditDiscussionAction",
14                            "processAction", args);
15        } catch (Exception e) {
16            // TODO Auto-generated catch block
17            e.printStackTrace();
18        }
19    }


I hope help you.
Phu Pham Cong
RE: liferay-ui:discussion
20 de Janeiro de 2011 23:50
Resposta

Phu Pham Cong

Ranking: New Member

Mensagens: 16

Data de entrada: 30 de Novembro de 2010

Mensagens recentes

Hi Esteban,
I tried your code successful but I have problem in edit comment.
It throws null pointer exception in eclipse's console.
And on view page I have got message look like: "You have entered invalid data. Please try again."

anyone help me!

Thanks in advance.
John M
RE: liferay-ui:discussion
26 de Junho de 2012 03:50
Resposta

John M

Ranking: New Member

Mensagens: 19

Data de entrada: 5 de Novembro de 2009

Mensagens recentes

Is there any solution to this problem?
I also have the problem with editing post. Adding and deleting works fine.
Sachin Mane
RE: liferay-ui:discussion
26 de Junho de 2012 04:22
Resposta

Sachin Mane

Ranking: Junior Member

Mensagens: 76

Data de entrada: 9 de Abril de 2012

Mensagens recentes

Check using firebug what is the value of "cmd" parameter that is getting posted. Refer to EditDiscussionAction code.
It expects cmd="update" for updating the comment.
John M
RE: liferay-ui:discussion
26 de Junho de 2012 04:49
Resposta

John M

Ranking: New Member

Mensagens: 19

Data de entrada: 5 de Novembro de 2009

Mensagens recentes

I'm not sure if I got your point:
<input type="hidden" value="update" name="_xxxxxxx_WAR_xxxxxxxportlet_cmd">

It's strange because I have another portlet (not written by me), which works fine in my environment, even with editing comments ...

I'm using Liferay Portal Community Edition 6.0.6.
My invokeTaglibDiscussion-method looks like:
 1public void invokeTaglibDiscussion(ActionRequest actionRequest,
 2            ActionResponse actionResponse) throws Exception {
 3        PortletConfig portletConfig = getPortletConfig();
 4        ClassLoader portalClassLoader = PortalClassLoaderUtil.getClassLoader();
 5        @SuppressWarnings("rawtypes")
 6        Class actionMappingClass = portalClassLoader.loadClass("org.apache.struts.action.ActionMapping");
 7        @SuppressWarnings("rawtypes")
 8        Class actionFormClass = portalClassLoader.loadClass("org.apache.struts.action.ActionForm");
 9        MethodKey methodKey = new MethodKey("com.liferay.portlet.messageboards.action.EditDiscussionAction", "processAction", actionMappingClass, actionFormClass, PortletConfig.class, ActionRequest.class, ActionResponse.class);
10        PortalClassInvoker.invoke(true, methodKey, null, null, portletConfig, actionRequest, actionResponse);
11    }


Maybe it is interesting, that I got the same error at editing comments in a wiki. But because I have an working portlet (external) it looks so strange to me.

Thanks in advance!
Sachin Mane
RE: liferay-ui:discussion
26 de Junho de 2012 20:25
Resposta

Sachin Mane

Ranking: Junior Member

Mensagens: 76

Data de entrada: 9 de Abril de 2012

Mensagens recentes

Do you see any errors on the console when you update? Any stack trace?
John M
RE: liferay-ui:discussion
27 de Junho de 2012 03:41
Resposta

John M

Ranking: New Member

Mensagens: 19

Data de entrada: 5 de Novembro de 2009

Mensagens recentes

Oh sorry, I forgot to post it:

  110:38:27,497 ERROR [PortletServlet:96] javax.portlet.PortletException: java.lang.NullPointerException
  2javax.portlet.PortletException: java.lang.NullPointerException
  3    at com.liferay.portal.kernel.portlet.LiferayPortlet.callActionMethod(LiferayPortlet.java:156)
  4    at com.liferay.util.bridges.mvc.MVCPortlet.callActionMethod(MVCPortlet.java:227)
  5    at com.liferay.portal.kernel.portlet.LiferayPortlet.processAction(LiferayPortlet.java:69)
  6    at com.liferay.util.bridges.mvc.MVCPortlet.processAction(MVCPortlet.java:199)
  7    at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:70)
  8    at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:48)
  9    at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:92)
 10    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 11    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 12    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 13    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
 14    at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)
 15    at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
 16    at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:638)
 17    at com.liferay.portlet.InvokerPortletImpl.invokeAction(InvokerPortletImpl.java:687)
 18    at com.liferay.portlet.InvokerPortletImpl.processAction(InvokerPortletImpl.java:360)
 19    at com.liferay.portal.action.LayoutAction.processPortletRequest(LayoutAction.java:784)
 20    at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:582)
 21    at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:232)
 22    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
 23    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
 24    at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:153)
 25    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
 26    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
 27    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
 28    at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:508)
 29    at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:485)
 30    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 31    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 32    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 33    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
 34    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:126)
 35    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 36    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 37    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
 38    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:126)
 39    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 40    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 41    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
 42    at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:309)
 43    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
 44    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 45    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 46    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
 47    at com.liferay.portal.servlet.filters.themepreview.ThemePreviewFilter.processFilter(ThemePreviewFilter.java:88)
 48    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
 49    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 50    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 51    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
 52    at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:121)
 53    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
 54    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 55    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 56    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
 57    at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:182)
 58    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
 59    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 60    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 61    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
 62    at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:254)
 63    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
 64    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 65    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 66    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
 67    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
 68    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
 69    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
 70    at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:134)
 71    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 72    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 73    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 74    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
 75    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:126)
 76    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 77    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 78    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
 79    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:126)
 80    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 81    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 82    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
 83    at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:261)
 84    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
 85    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 86    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 87    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
 88    at com.liferay.portal.servlet.filters.themepreview.ThemePreviewFilter.processFilter(ThemePreviewFilter.java:88)
 89    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
 90    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 91    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 92    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
 93    at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:110)
 94    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
 95    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 96    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 97    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
 98    at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:182)
 99    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
100    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
101    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
102    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
103    at com.liferay.portal.servlet.filters.i18n.I18nFilter.processFilter(I18nFilter.java:222)
104    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
105    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
106    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
107    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
108    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:126)
109    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
110    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
111    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
112    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:126)
113    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
114    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
115    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
116    at com.liferay.portal.servlet.filters.etag.ETagFilter.processFilter(ETagFilter.java:45)
117    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
118    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
119    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
120    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
121    at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:254)
122    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
123    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
124    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
125    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
126    at com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter.processFilter(NtlmPostFilter.java:81)
127    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
128    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
129    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
130    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
131    at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:179)
132    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
133    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
134    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
135    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
136    at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:240)
137    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
138    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
139    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
140    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
141    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:126)
142    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
143    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
144    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
145    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:126)
146    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
147    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
148    at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
149    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
150    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
151    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
152    at com.liferay.portal.servlet.filters.threadlocal.ThreadLocalFilter.processFilter(ThreadLocalFilter.java:35)
153    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
154    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
155    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
156    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
157    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
158    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
159    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
160    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
161    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
162    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
163    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
164    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
165    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
166    at java.lang.Thread.run(Thread.java:619)

 1Caused by: java.lang.NullPointerException
 2    at com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl.updateDiscussionMessageStatus(MBMessageLocalServiceImpl.java:2097)
 3    at com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl.updateStatus(MBMessageLocalServiceImpl.java:1492)
 4    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 5    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 6    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 7    at java.lang.reflect.Method.invoke(Method.java:597)
 8    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
 9    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
10    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
11    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
12    at com.liferay.portal.dao.jdbc.aop.DynamicDataSourceTransactionInterceptor.invoke(DynamicDataSourceTransactionInterceptor.java:44)
13    at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
14    at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
15    at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
16    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
17    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
18    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
19    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
20    at $Proxy134.updateStatus(Unknown Source)
21    at com.liferay.portlet.messageboards.service.MBMessageLocalServiceUtil.updateStatus(MBMessageLocalServiceUtil.java:610)
22    at com.liferay.portlet.messageboards.workflow.MBMessageWorkflowHandler.updateStatus(MBMessageWorkflowHandler.java:63)
23    at com.liferay.portal.kernel.workflow.WorkflowHandlerRegistryUtil.startWorkflowInstance(WorkflowHandlerRegistryUtil.java:113)
24    at com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl.updateMessage(MBMessageLocalServiceImpl.java:1334)
25    at com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl.updateDiscussionMessage(MBMessageLocalServiceImpl.java:1219)
26    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
27    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
28    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
29    at java.lang.reflect.Method.invoke(Method.java:597)
30    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
31    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
32    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
33    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
34    at com.liferay.portal.dao.jdbc.aop.DynamicDataSourceTransactionInterceptor.invoke(DynamicDataSourceTransactionInterceptor.java:44)
35    at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
36    at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
37    at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
38    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
39    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
40    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
41    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
42    at $Proxy134.updateDiscussionMessage(Unknown Source)
43    at com.liferay.portlet.messageboards.service.impl.MBMessageServiceImpl.updateDiscussionMessage(MBMessageServiceImpl.java:540)
44    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
45    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
46    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
47    at java.lang.reflect.Method.invoke(Method.java:597)
48    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
49    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
50    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
51    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
52    at com.liferay.portal.dao.jdbc.aop.DynamicDataSourceTransactionInterceptor.invoke(DynamicDataSourceTransactionInterceptor.java:44)
53    at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
54    at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
55    at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
56    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
57    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
58    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
59    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
60    at $Proxy135.updateDiscussionMessage(Unknown Source)
61    at com.liferay.portlet.messageboards.service.MBMessageServiceUtil.updateDiscussionMessage(MBMessageServiceUtil.java:220)
62    at com.liferay.portlet.messageboards.action.EditDiscussionAction.updateMessage(EditDiscussionAction.java:182)
63    at com.liferay.portlet.messageboards.action.EditDiscussionAction.processAction(EditDiscussionAction.java:64)
64    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
65    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
66    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
67    at java.lang.reflect.Method.invoke(Method.java:597)
68    at com.liferay.portal.kernel.util.MethodHandler.invoke(MethodHandler.java:81)
69    at com.liferay.portal.kernel.util.MethodHandler.invoke(MethodHandler.java:75)
70    at com.liferay.portal.kernel.util.PortalClassInvoker.invoke(PortalClassInvoker.java:40)
71    at com.liferay.Annotation.AnnotationCommunity.invokeTaglibDiscussion(AnnotationCommunity.java:32)
72    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
73    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
74    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
75    at java.lang.reflect.Method.invoke(Method.java:597)
76    at com.liferay.portal.kernel.portlet.LiferayPortlet.callActionMethod(LiferayPortlet.java:138)
77    ... 163 more


 110:38:27,607 ERROR [jsp:154] java.lang.NullPointerException
 2    at com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl.updateDiscussionMessageStatus(MBMessageLocalServiceImpl.java:2097)
 3    at com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl.updateStatus(MBMessageLocalServiceImpl.java:1492)
 4    at com.liferay.portal.dao.jdbc.aop.DynamicDataSourceTransactionInterceptor.invoke(DynamicDataSourceTransactionInterceptor.java:44)
 5    at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
 6    at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
 7    at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
 8    at com.liferay.portlet.messageboards.service.MBMessageLocalServiceUtil.updateStatus(MBMessageLocalServiceUtil.java:610)
 9    at com.liferay.portlet.messageboards.workflow.MBMessageWorkflowHandler.updateStatus(MBMessageWorkflowHandler.java:63)
10    at com.liferay.portal.kernel.workflow.WorkflowHandlerRegistryUtil.startWorkflowInstance(WorkflowHandlerRegistryUtil.java:113)
11    at com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl.updateMessage(MBMessageLocalServiceImpl.java:1334)
12    at com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl.updateDiscussionMessage(MBMessageLocalServiceImpl.java:1219)
13    at com.liferay.portal.dao.jdbc.aop.DynamicDataSourceTransactionInterceptor.invoke(DynamicDataSourceTransactionInterceptor.java:44)
14    at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
15    at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
16    at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
17    at com.liferay.portlet.messageboards.service.impl.MBMessageServiceImpl.updateDiscussionMessage(MBMessageServiceImpl.java:540)
18    at com.liferay.portal.dao.jdbc.aop.DynamicDataSourceTransactionInterceptor.invoke(DynamicDataSourceTransactionInterceptor.java:44)
19    at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
20    at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
21    at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
Sachin Mane
RE: liferay-ui:discussion
1 de Julho de 2012 23:36
Resposta

Sachin Mane

Ranking: Junior Member

Mensagens: 76

Data de entrada: 9 de Abril de 2012

Mensagens recentes

Hi John,

I had a look at the 6.0.6 source code @

at com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl.updateDiscussionMessageStatus(MBMessageLocalServiceImpl.java:2097)


from the source code it looks like you must be reiceing the className is null. className is being picked up from the portletRequest. So check if you are passing className as part of the <form> tag when u hit the update link.
John M
RE: liferay-ui:discussion
2 de Julho de 2012 06:58
Resposta

John M

Ranking: New Member

Mensagens: 19

Data de entrada: 5 de Novembro de 2009

Mensagens recentes

Hey,
I added a simple output in my invokeTaglibDiscussion-method in order to get the data sent via actionRequest:

CMD: update
Text: blablabla
className: com.liferay.Annotation.model.Notes
classPK: 30542682965200

So, in my opinion everything should be fine.
Paras Jain
RE: liferay-ui:discussion
20 de Fevereiro de 2013 11:23
Resposta

Paras Jain

Ranking: New Member

Mensagens: 7

Data de entrada: 15 de Março de 2012

Mensagens recentes

Yes this solved it for me