留言板
Internal server error
I am using liferay 6.2+ mysql5.6
when doing StrutsAction in customize jsp for call java class ,it shows Internal server error.
when doing StrutsAction in customize jsp for call java class ,it shows Internal server error.
Is there any kind of warning, error or exception in log file?
No,when click not shows.but deploy it shows.
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.
<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>
<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>
and your log file?
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).....
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).....
If your jsp indeed (copied from far above) is
and you get
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?
<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?
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";
}
}
<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";
}
}