掲示板

liferay-ui:discussion

13年前 に G K によって更新されました。

liferay-ui:discussion

New Member 投稿: 5 参加年月日: 10/11/22 最新の投稿
I am trying to use liferay-ui:discussion to add a comment to a wall post in a portlet.
here is the code:

<portlet:actionurl var="discussionURL">
						<portlet:param name="struts_action" value="/wall/edit_wallentry_discussion" />
					</portlet:actionurl>
			
<liferay-ui:discussion className="<%= WallEntry.class.getName() %>" classPK="<%= wallEntry.getWallEntryId() %>" formAction="www.google.com" formName="fm2" ratingsEnabled="true" redirect="<%= currentURL %>" subject="Wall comment" userId="<%= user2.getUserId() %>" />


here is the struts-config.xml that I created under WEB-INF:

<struts-config>
	<action-mappings>
		<action path="/wall/edit_wallentry_discussion" type="com.liferay.portlet.messageboards.action.EditDiscussionAction">
			<forward name="portlet.message_boards.error" path="portlet.journal_content.error" />
		</action>
	</action-mappings>
</struts-config>


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

Thanks!
13年前 に Esteban Lopez によって更新されました。

RE: liferay-ui:discussion

Junior Member 投稿: 26 参加年月日: 10/11/03 最新の投稿
I have the same problem, can anybody help us??
13年前 に G K によって更新されました。

RE: liferay-ui:discussion

New Member 投稿: 5 参加年月日: 10/11/22 最新の投稿
Any suggestions? I have not yet figured it out. Is it really so hard to reuse liferay-ui:discussion?

Thanks.
thumbnail
13年前 に Felix Ashirov によって更新されました。

RE: liferay-ui:discussion

Regular Member 投稿: 128 参加年月日: 10/02/26 最新の投稿
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
13年前 に G K によって更新されました。

RE: liferay-ui:discussion

New Member 投稿: 5 参加年月日: 10/11/22 最新の投稿
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.
thumbnail
13年前 に Julio Camarero によって更新されました。

RE: liferay-ui:discussion

Liferay Legend 投稿: 1668 参加年月日: 08/07/15 最新の投稿
Hi G K,

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

cheers!
13年前 に G K によって更新されました。

RE: liferay-ui:discussion

New Member 投稿: 5 参加年月日: 10/11/22 最新の投稿
So I basically have to create an action in my MvcProtlet that will invoke invokeTaglibDiscussion and pass response and request?

Thanks.
13年前 に G K によって更新されました。

RE: liferay-ui:discussion

New Member 投稿: 5 参加年月日: 10/11/22 最新の投稿
So in my controller class that extends MVCPortlet, I created action method:

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


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



<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.
13年前 に Esteban Lopez によって更新されました。

RE: liferay-ui:discussion

Junior Member 投稿: 26 参加年月日: 10/11/03 最新の投稿
Hi G K,

Maybe I have solved it,

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


<portlet:actionurl var="discussionURL" />

				<liferay-ui:discussion className="<%= ent.getClassName() %>" classPK="<%= ent.getClassPK() %>" formAction="<%= discussionURL %>" formName="fm3" ratingsEnabled="true" redirect="<%= currentURL %>" subject="<%= ent.getTitle() %>" userId="<%= ent.getUserId() %>" />



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


public void processAction(
            ActionRequest actionRequest, ActionResponse actionResponse)
        throws IOException, PortletException{
	
		Object[] args = new Object[] {
				new NullWrapper("org.apache.struts.action.ActionMapping"),
				new NullWrapper("org.apache.struts.action.ActionForm"),
				getPortletConfig(), actionRequest, actionResponse };

		try {
			PortalClassInvoker
					.invoke("com.liferay.portlet.messageboards.action.EditDiscussionAction",
							"processAction", args);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}


I hope help you.
thumbnail
13年前 に Phu Pham Cong によって更新されました。

RE: liferay-ui:discussion

New Member 投稿: 16 参加年月日: 10/11/30 最新の投稿
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.
11年前 に Jonas MzH によって更新されました。

RE: liferay-ui:discussion

New Member 投稿: 19 参加年月日: 09/11/05 最新の投稿
Is there any solution to this problem?
I also have the problem with editing post. Adding and deleting works fine.
thumbnail
11年前 に Sachin Mane によって更新されました。

RE: liferay-ui:discussion

Junior Member 投稿: 76 参加年月日: 12/04/10 最新の投稿
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.
11年前 に John M によって更新されました。

RE: liferay-ui:discussion

New Member 投稿: 19 参加年月日: 09/11/05 最新の投稿
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:
public void invokeTaglibDiscussion(ActionRequest actionRequest,
			ActionResponse actionResponse) throws Exception {
        PortletConfig portletConfig = getPortletConfig();
        ClassLoader portalClassLoader = PortalClassLoaderUtil.getClassLoader();
        @SuppressWarnings("rawtypes")
        Class actionMappingClass = portalClassLoader.loadClass("org.apache.struts.action.ActionMapping");
        @SuppressWarnings("rawtypes")
        Class actionFormClass = portalClassLoader.loadClass("org.apache.struts.action.ActionForm");
        MethodKey methodKey = new MethodKey("com.liferay.portlet.messageboards.action.EditDiscussionAction", "processAction", actionMappingClass, actionFormClass, PortletConfig.class, ActionRequest.class, ActionResponse.class);
        PortalClassInvoker.invoke(true, methodKey, null, null, portletConfig, actionRequest, actionResponse);
	}


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!
thumbnail
11年前 に Sachin Mane によって更新されました。

RE: liferay-ui:discussion

Junior Member 投稿: 76 参加年月日: 12/04/10 最新の投稿
Do you see any errors on the console when you update? Any stack trace?
11年前 に John M によって更新されました。

RE: liferay-ui:discussion

New Member 投稿: 19 参加年月日: 09/11/05 最新の投稿
Oh sorry, I forgot to post it:

10:38:27,497 ERROR [PortletServlet:96] javax.portlet.PortletException: java.lang.NullPointerException
javax.portlet.PortletException: java.lang.NullPointerException
	at com.liferay.portal.kernel.portlet.LiferayPortlet.callActionMethod(LiferayPortlet.java:156)
	at com.liferay.util.bridges.mvc.MVCPortlet.callActionMethod(MVCPortlet.java:227)
	at com.liferay.portal.kernel.portlet.LiferayPortlet.processAction(LiferayPortlet.java:69)
	at com.liferay.util.bridges.mvc.MVCPortlet.processAction(MVCPortlet.java:199)
	at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:70)
	at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:48)
	at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:92)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
	at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)
	at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
	at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:638)
	at com.liferay.portlet.InvokerPortletImpl.invokeAction(InvokerPortletImpl.java:687)
	at com.liferay.portlet.InvokerPortletImpl.processAction(InvokerPortletImpl.java:360)
	at com.liferay.portal.action.LayoutAction.processPortletRequest(LayoutAction.java:784)
	at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:582)
	at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:232)
	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
	at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:153)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
	at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:508)
	at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:485)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:126)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:126)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
	at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:309)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
	at com.liferay.portal.servlet.filters.themepreview.ThemePreviewFilter.processFilter(ThemePreviewFilter.java:88)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
	at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:121)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
	at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:182)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
	at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:254)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
	at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:134)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:126)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:126)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
	at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:261)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
	at com.liferay.portal.servlet.filters.themepreview.ThemePreviewFilter.processFilter(ThemePreviewFilter.java:88)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
	at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:110)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
	at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:182)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
	at com.liferay.portal.servlet.filters.i18n.I18nFilter.processFilter(I18nFilter.java:222)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:126)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:126)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
	at com.liferay.portal.servlet.filters.etag.ETagFilter.processFilter(ETagFilter.java:45)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
	at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:254)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
	at com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter.processFilter(NtlmPostFilter.java:81)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
	at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:179)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
	at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:240)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:126)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:126)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
	at com.liferay.portal.servlet.filters.threadlocal.ThreadLocalFilter.processFilter(ThreadLocalFilter.java:35)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
	at java.lang.Thread.run(Thread.java:619)

Caused by: java.lang.NullPointerException
	at com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl.updateDiscussionMessageStatus(MBMessageLocalServiceImpl.java:2097)
	at com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl.updateStatus(MBMessageLocalServiceImpl.java:1492)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
	at com.liferay.portal.dao.jdbc.aop.DynamicDataSourceTransactionInterceptor.invoke(DynamicDataSourceTransactionInterceptor.java:44)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
	at $Proxy134.updateStatus(Unknown Source)
	at com.liferay.portlet.messageboards.service.MBMessageLocalServiceUtil.updateStatus(MBMessageLocalServiceUtil.java:610)
	at com.liferay.portlet.messageboards.workflow.MBMessageWorkflowHandler.updateStatus(MBMessageWorkflowHandler.java:63)
	at com.liferay.portal.kernel.workflow.WorkflowHandlerRegistryUtil.startWorkflowInstance(WorkflowHandlerRegistryUtil.java:113)
	at com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl.updateMessage(MBMessageLocalServiceImpl.java:1334)
	at com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl.updateDiscussionMessage(MBMessageLocalServiceImpl.java:1219)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
	at com.liferay.portal.dao.jdbc.aop.DynamicDataSourceTransactionInterceptor.invoke(DynamicDataSourceTransactionInterceptor.java:44)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
	at $Proxy134.updateDiscussionMessage(Unknown Source)
	at com.liferay.portlet.messageboards.service.impl.MBMessageServiceImpl.updateDiscussionMessage(MBMessageServiceImpl.java:540)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
	at com.liferay.portal.dao.jdbc.aop.DynamicDataSourceTransactionInterceptor.invoke(DynamicDataSourceTransactionInterceptor.java:44)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
	at $Proxy135.updateDiscussionMessage(Unknown Source)
	at com.liferay.portlet.messageboards.service.MBMessageServiceUtil.updateDiscussionMessage(MBMessageServiceUtil.java:220)
	at com.liferay.portlet.messageboards.action.EditDiscussionAction.updateMessage(EditDiscussionAction.java:182)
	at com.liferay.portlet.messageboards.action.EditDiscussionAction.processAction(EditDiscussionAction.java:64)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.liferay.portal.kernel.util.MethodHandler.invoke(MethodHandler.java:81)
	at com.liferay.portal.kernel.util.MethodHandler.invoke(MethodHandler.java:75)
	at com.liferay.portal.kernel.util.PortalClassInvoker.invoke(PortalClassInvoker.java:40)
	at com.liferay.Annotation.AnnotationCommunity.invokeTaglibDiscussion(AnnotationCommunity.java:32)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.liferay.portal.kernel.portlet.LiferayPortlet.callActionMethod(LiferayPortlet.java:138)
	... 163 more


10:38:27,607 ERROR [jsp:154] java.lang.NullPointerException
	at com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl.updateDiscussionMessageStatus(MBMessageLocalServiceImpl.java:2097)
	at com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl.updateStatus(MBMessageLocalServiceImpl.java:1492)
	at com.liferay.portal.dao.jdbc.aop.DynamicDataSourceTransactionInterceptor.invoke(DynamicDataSourceTransactionInterceptor.java:44)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
	at com.liferay.portlet.messageboards.service.MBMessageLocalServiceUtil.updateStatus(MBMessageLocalServiceUtil.java:610)
	at com.liferay.portlet.messageboards.workflow.MBMessageWorkflowHandler.updateStatus(MBMessageWorkflowHandler.java:63)
	at com.liferay.portal.kernel.workflow.WorkflowHandlerRegistryUtil.startWorkflowInstance(WorkflowHandlerRegistryUtil.java:113)
	at com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl.updateMessage(MBMessageLocalServiceImpl.java:1334)
	at com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl.updateDiscussionMessage(MBMessageLocalServiceImpl.java:1219)
	at com.liferay.portal.dao.jdbc.aop.DynamicDataSourceTransactionInterceptor.invoke(DynamicDataSourceTransactionInterceptor.java:44)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
	at com.liferay.portlet.messageboards.service.impl.MBMessageServiceImpl.updateDiscussionMessage(MBMessageServiceImpl.java:540)
	at com.liferay.portal.dao.jdbc.aop.DynamicDataSourceTransactionInterceptor.invoke(DynamicDataSourceTransactionInterceptor.java:44)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
thumbnail
11年前 に Sachin Mane によって更新されました。

RE: liferay-ui:discussion

Junior Member 投稿: 76 参加年月日: 12/04/10 最新の投稿
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.
11年前 に John M によって更新されました。

RE: liferay-ui:discussion

New Member 投稿: 19 参加年月日: 09/11/05 最新の投稿
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.
11年前 に Paras Jain によって更新されました。

RE: liferay-ui:discussion

New Member 投稿: 7 参加年月日: 12/03/15 最新の投稿
Yes this solved it for me