Foros de discusión
Internal server error
saranya sampath, modificado hace 7 años.
Internal server error
New Member Mensajes: 12 Fecha de incorporación: 16/03/17 Mensajes recientes
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.
Jorge Díaz, modificado hace 7 años.
RE: Internal server error
Liferay Master Mensajes: 753 Fecha de incorporación: 9/01/14 Mensajes recientes
Is there any kind of warning, error or exception in log file?
saranya sampath, modificado hace 7 años.
RE: Internal server error
New Member Mensajes: 12 Fecha de incorporación: 16/03/17 Mensajes recientes
No,when click not shows.but deploy it shows.
Jorge Díaz, modificado hace 7 años.
RE: Internal server error
Liferay Master Mensajes: 753 Fecha de incorporación: 9/01/14 Mensajes recientessaranya 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, modificado hace 7 años.
RE: Internal server error
New Member Mensajes: 12 Fecha de incorporación: 16/03/17 Mensajes recientes
<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>
Archivos adjuntos:
Olaf Kock, modificado hace 7 años.
RE: Internal server error
Liferay Legend Mensajes: 6403 Fecha de incorporación: 23/09/08 Mensajes recientes
and your log file?
saranya sampath, modificado hace 7 años.
RE: Internal server error
New Member Mensajes: 12 Fecha de incorporación: 16/03/17 Mensajes recientes
No log Error .
saranya sampath, modificado hace 7 años.
RE: Internal server error
New Member Mensajes: 12 Fecha de incorporación: 16/03/17 Mensajes recientes
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).....
Olaf Kock, modificado hace 7 años.
RE: Internal server error
Liferay Legend Mensajes: 6403 Fecha de incorporación: 23/09/08 Mensajes recientes
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?
saranya sampath, modificado hace 7 años.
RE: Internal server error
New Member Mensajes: 12 Fecha de incorporación: 16/03/17 Mensajes recientes
I passed parameters also,but it won't call class
saranya sampath, modificado hace 7 años.
RE: Internal server error
New Member Mensajes: 12 Fecha de incorporación: 16/03/17 Mensajes recientes
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";
}
}