掲示板

StackOverflow error when installing new portlet

11年前 に Peter Rodriguez によって更新されました。

StackOverflow error when installing new portlet

Regular Member 投稿: 154 参加年月日: 10/06/07 最新の投稿
Hello Guys,
Please could someone help me out with the following (checked everything, but still cant figure this out...).

I'm trying to develop a new portlet on Liferay 6.1.0 ce.
My portal builds sucessfully, and deploys sucessfully on LiferayPortal (tomcat 7.0.23).
I've attached my config files (portlet.xml, web.xml, liferay-portlet.xml, etc).

However, whenever I try to add the portlet from the portal, I get the following:

04:33:49,099 INFO  [AutoDeployDir:167] Processing legalp-web-portlet.war
04:33:49,129 INFO  [PortletAutoDeployListener:71] Copying portlets for C:\Software\Development\Servers\LegalParadigm_Ent\deploy\legalp-web-portlet.war
04:33:50,625 INFO  [PortletAutoDeployListener:81] Portlets for C:\Software\Development\Servers\LegalParadigm_Ent\deploy\legalp-web-portlet.war copied successfully. Deployment will start in a few seconds.
04:33:50,626 INFO  [WebAutoDeployListener:43] Copying web plugin for C:\Software\Development\Servers\LegalParadigm_Ent\deploy\legalp-web-portlet.war
04:33:50,637 INFO  [WebAutoDeployListener:49] Web plugin for C:\Software\Development\Servers\LegalParadigm_Ent\deploy\legalp-web-portlet.war copied successfully. Deployment will start in a few seconds.
04:33:51,192 INFO  [PluginPackageUtil:1099] Reading plugin package for legalp-web-portlet
04:33:51,294 INFO  [PortletHotDeployListener:614] Registering portlets for legalp-web-portlet
04:33:51,360 INFO  [PortletHotDeployListener:433] 1 portlet for legalp-web-portlet is available for use
04:34:12,120 INFO  [PortalImpl:4873] Current URL / generates exception: javax.servlet.ServletException: java.lang.StackOverflowError
04:34:12,660 ERROR [status_jsp:670] org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.StackOverflowError
org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.StackOverflowError
	at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:549)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:455)
	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:722)
	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:72)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
	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:684)
	at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:593)
	at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:530)
	at com.liferay.portal.util.PortalImpl.renderPortlet(PortalImpl.java:4735)
	at com.liferay.portal.util.PortalImpl.renderPortlet(PortalImpl.java:4694)
	at com.liferay.portal.util.PortalUtil.renderPortlet(PortalUtil.java:1443)
	at com.liferay.portal.action.RenderPortletAction.execute(RenderPortletAction.java:86)
	at com.liferay.portal.action.UpdateLayoutAction.addPortlet(UpdateLayoutAction.java:334)
	at com.liferay.portal.action.UpdateLayoutAction.getJSON(UpdateLayoutAction.java:287)
	at com.liferay.portal.struts.JSONAction.execute(JSONAction.java:59)
	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:174)
	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:641)
	at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:533)
	at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:510)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	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:72)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
	at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:304)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
	at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:123)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
	at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:201)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
	at com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter.processFilter(NtlmPostFilter.java:83)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
	at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:80)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
	at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:208)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:184)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
	at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:164)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:164)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:184)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
	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.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:300)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:619)
Caused by: javax.servlet.ServletException: java.lang.StackOverflowError
	at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:911)
	at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:840)
	at com.liferay.portal.kernel.servlet.PageContextWrapper.handlePageException(PageContextWrapper.java:161)
	at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_005fportlet_jsp.java:2028)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
	... 89 more
Caused by: java.lang.StackOverflowError
	at org.apache.catalina.connector.Request.notifyAttributeAssigned(Request.java:1560)
	at org.apache.catalina.connector.Request.setAttribute(Request.java:1544)
	at org.apache.catalina.connector.RequestFacade.setAttribute(RequestFacade.java:541)
	at org.apache.catalina.core.ApplicationHttpRequest.setAttribute(ApplicationHttpRequest.java:281)
	at org.apache.catalina.core.ApplicationHttpRequest.setAttribute(ApplicationHttpRequest.java:281)
	at javax.servlet.ServletRequestWrapper.setAttribute(ServletRequestWrapper.java:239)


Stuff is trying to drive me crazy, please please please...this is urgent guys....already very late on my deadline
Any help would be much appreciated.
By the way, was wondering the difference between using "view-template" in <init-param> of <portlet> tag for portlet.xml, and using "view-jsp"? Could this bewhere my problem is coming from?

Thanks in advance guys
11年前 に Peter Rodriguez によって更新されました。

RE: StackOverflow error when installing new portlet

Regular Member 投稿: 154 参加年月日: 10/06/07 最新の投稿
Any help with this please?
thumbnail
11年前 に David H Nebinger によって更新されました。

RE: StackOverflow error when installing new portlet

Liferay Legend 投稿: 14914 参加年月日: 06/09/02 最新の投稿
Your web.xml looks like it is the deployed one, rather than the one from your project. Hopefully this is true?

Liferay inserts a number of things when the project is deployed, so if you have all of this stuff in there you may have duplicate entities.
thumbnail
11年前 に Tejas Kanani によって更新されました。

RE: StackOverflow error when installing new portlet

Liferay Master 投稿: 654 参加年月日: 09/01/06 最新の投稿
By the way, was wondering the difference between using "view-template" in <init-param> of <portlet> tag for portlet.xml, and using "view-jsp"? Could this bewhere my problem is coming from?

In Liferay 6.1 they have used "view-template" where in previous versions we were using view-jsp. Though its backward compatible so if you are using view-jsp in any of the portlet of Liferay 6.1 it will work but its deprecated. So it should not create any problem.
thumbnail
11年前 に Tejas Kanani によって更新されました。

RE: StackOverflow error when installing new portlet

Liferay Master 投稿: 654 参加年月日: 09/01/06 最新の投稿
Yes As David mentioned, web.xml is the problem here !!!
If you are not using web.xml for any purpose. Just remove it from your source and deploy your portlet again.
I've tried by removing web.xml in my local and it worked !!!
11年前 に Peter Rodriguez によって更新されました。

RE: StackOverflow error when installing new portlet

Regular Member 投稿: 154 参加年月日: 10/06/07 最新の投稿
Thanks people.
Great reply times here in Liferay.
David you were right - problem was web.xml - I had copied it from an existing deployed portlet. Soon as I removed all the FORWARD, etc tags - it workd!
Tejas
Thanks for the clarification between view-template and view-jsp

However, guys - just ran into another problem.
Trying yo use <liferay-ui:search-form> tag to include a search page in my custom portlet - neither the search page shows and there are no errors in the log. I already made a new post about this. Hope someone can help me out here again

Many Thanks, guys...
thumbnail
9年前 に Vishal Srivastava によって更新されました。

RE: StackOverflow error when installing new portlet

Junior Member 投稿: 26 参加年月日: 14/07/07 最新の投稿
Hi Friends,

Can any one please help me to get out of this error-:
When ever i am creating a new portlet and try to deploy it on Web Browser it shows me-:
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:168)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:168)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:79)

root cause

java.lang.ArrayIndexOutOfBoundsException: 0
com.liferay.portal.util.PortalInstances._getDefaultCompanyId(PortalInstances.java:335)
com.liferay.portal.util.PortalInstances._getCompanyId(PortalInstances.java:192)
com.liferay.portal.util.PortalInstances.getCompanyId(PortalInstances.java:68)
com.liferay.portal.servlet.filters.absoluteredirects.AbsoluteRedirectsFilter.doFilterTry(AbsoluteRedirectsFilter.java:60)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:186)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:168)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:168)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:79)

note The full stack trace of the root cause is available in the Apache Tomcat/7.0.40 logs.