Forums de discussion

Internal server error

saranya sampath, modifié il y a 7 années.

Internal server error

New Member Publications: 12 Date d'inscription: 16/03/17 Publications récentes
I am using liferay 6.2+ mysql5.6
when doing StrutsAction in customize jsp for call java class ,it shows Internal server error.
thumbnail
Jorge Díaz, modifié il y a 7 années.

RE: Internal server error

Liferay Master Publications: 753 Date d'inscription: 09/01/14 Publications récentes
Is there any kind of warning, error or exception in log file?
saranya sampath, modifié il y a 7 années.

RE: Internal server error

New Member Publications: 12 Date d'inscription: 16/03/17 Publications récentes
No,when click not shows.but deploy it shows.
thumbnail
Jorge Díaz, modifié il y a 7 années.

RE: Internal server error

Liferay Master Publications: 753 Date d'inscription: 09/01/14 Publications récentes
saranya sampath:
No,when click not shows.but deploy it shows.

I don't understand your last message.
When you deploy your customization a error os displayed in your log file?
If a error or exception is displayed, please attach it.
saranya sampath, modifié il y a 7 années.

RE: Internal server error

New Member Publications: 12 Date d'inscription: 16/03/17 Publications récentes
<c:if test="<%= showAssetMetadata %>">

<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" persistState="<%= true %>" title="Wordcomments" >
<portlet:actionURL var="docURL" name="addTask" >
<portlet:param name="struts_action" value="/document_library/edit_file_entry_comment"/>

</portlet:actionURL>
<aui:a href="<%= docURL %>" label="task " >
</aui:a>



</liferay-ui:panel>
</c:if>
thumbnail
Olaf Kock, modifié il y a 7 années.

RE: Internal server error

Liferay Legend Publications: 6403 Date d'inscription: 23/09/08 Publications récentes
and your log file?
saranya sampath, modifié il y a 7 années.

RE: Internal server error

New Member Publications: 12 Date d'inscription: 16/03/17 Publications récentes
No log Error .
saranya sampath, modifié il y a 7 années.

RE: Internal server error

New Member Publications: 12 Date d'inscription: 16/03/17 Publications récentes
org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet jsp threw exception
com.liferay.portlet.documentlibrary.NoSuchFolderException: No DLFolder exists with the primary key 0
at com.liferay.portlet.documentlibrary.service.persistence.DLFolderPersistenceImpl.findByPrimaryKey(DLFolderPersistenceImpl.java:10046)
at com.liferay.portlet.documentlibrary.service.persistence.DLFolderPersistenceImpl.findByPrimaryKey(DLFolderPersistenceImpl.java:10064)
at com.liferay.portlet.documentlibrary.service.impl.DLFolderLocalServiceImpl.getFolder(DLFolderLocalServiceImpl.java:513)
at sun.reflect.GeneratedMethodAccessor393.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:67)
at com.sun.proxy.$Proxy594.getFolder(Unknown Source)
at com.liferay.portlet.documentlibrary.service.DLFolderLocalServiceWrapper.getFolder(DLFolderLocalServiceWrapper.java:690)
at sun.reflect.GeneratedMethodAccessor393.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:67)
at com.sun.proxy.$Proxy679.getFolder(Unknown Source)
at sun.reflect.GeneratedMethodAccessor393.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
at com.sun.proxy.$Proxy209.getFolder(Unknown Source)
at com.liferay.portlet.documentlibrary.service.DLFolderLocalServiceUtil.getFolder(DLFolderLocalServiceUtil.java:635)
at org.apache.jsp.html.portlet.document_005flibrary.folder_005faction_jsp._jspService(folder_005faction_jsp.java:859)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:119)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:605)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:544)
at com.liferay.portal.servlet.DirectServletPathRegisterDispatcher.include(DirectServletPathRegisterDispatcher.java:55)
at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:78)
at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53)
at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:295)
at com.liferay.taglib.util.IncludeTag.doInclude(IncludeTag.java:192)
at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:83)
at org.apache.jsp.html.taglib.ui.app_005fview_005fnavigation_005fentry.page_jsp._jspService(page_jsp.java:578)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728).....
thumbnail
Olaf Kock, modifié il y a 7 années.

RE: Internal server error

Liferay Legend Publications: 6403 Date d'inscription: 23/09/08 Publications récentes
If your jsp indeed (copied from far above) is
<portlet:actionurl var="docURL" name="addTask">
<portlet:param name="struts_action" value="/document_library/edit_file_entry_comment" />

</portlet:actionurl>

and you get
saranya sampath:
org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet jsp threw exception
com.liferay.portlet.documentlibrary.NoSuchFolderException: No DLFolder exists with the primary key 0
	at com.liferay.portlet.documentlibrary.service.persistence.DLFolderPersistenceImpl.findByPrimaryKey(DLFolderPersistenceImpl.java:10046)


then I'd assume that the edit_file_entry_comment link requires some more parameters, e.g. the document id, potentially the folder id.

Further, the JSP you posted above links to edit_file_entry_comment while the last Struts action you posted links to view_file_entry. Intention? Related code?
saranya sampath, modifié il y a 7 années.

RE: Internal server error

New Member Publications: 12 Date d'inscription: 16/03/17 Publications récentes
I passed parameters also,but it won't call class
saranya sampath, modifié il y a 7 années.

RE: Internal server error

New Member Publications: 12 Date d'inscription: 16/03/17 Publications récentes
liferay hook.xml
<struts-action>
<struts-action-path>/document_library/edit_file_entry_comment</struts-action-path>
<struts-action-impl>com.library.hook.Comment</struts-action-impl>
</struts-action>






comment.java


package com.library.hook;


import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.liferay.portal.kernel.struts.BaseStrutsAction;

public class Comment extends BaseStrutsAction {

public void addTask(HttpServletRequest request, HttpServletResponse response) throws Exception{
System.out.println("Action Called");
}
@Override
public String execute(HttpServletRequest request, HttpServletResponse response) throws Exception {

System.out.println("Action Called");

return "/portlet/document_library/view_file_entry";
}


}