You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by "Woonsan Ko (JIRA)" <je...@portals.apache.org> on 2009/04/21 19:48:47 UTC

[jira] Created: (JS2-974) After pluto-2 integration, JSP decorators does not work

After pluto-2 integration, JSP decorators does not work
-------------------------------------------------------

                 Key: JS2-974
                 URL: https://issues.apache.org/jira/browse/JS2-974
             Project: Jetspeed 2
          Issue Type: Bug
          Components: Aggregation
    Affects Versions: 2.2.0
            Reporter: Woonsan Ko


I found errors showing an infinite loop and stackOverFlow error, printing many lines containing:
    
    ...
    org.apache.catalina.core.ApplicationHttpRequest.getAttribute....
    org.apache.catalina.core.ApplicationHttpRequest.getAttribute....
    ...
    org.apache.catalina.core.ApplicationHttpRequest.getAttribute....
    ...
    org.apache.pluto.container.impl.HttpServletPortletRequestWrapper.getAttribute...
    ...

I've just googled and found an existing issue: https://issues.apache.org/bugzilla/show_bug.cgi?id=47017

In the above issue, the problem was diagnosed as, "Something somewhere called setRequest() on the wrapped request and passed in the same wrapped request setting up the infinite loop."
I have tried to test locally by modifying HttpServletPortletRequestWrapper, but I have no clue yet.
I also suspect that this problem can occur for local portlet.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


[jira] Commented: (JS2-974) After pluto-2 integration, JSP decorators does not work

Posted by "Woonsan Ko (JIRA)" <je...@portals.apache.org>.
    [ https://issues.apache.org/jira/browse/JS2-974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12701447#action_12701447 ] 

Woonsan Ko commented on JS2-974:
--------------------------------

Here's some part of full stack trace. It could be useful for someone to share insights. :-)

2009-04-22 11:03:35,709 [http-8080-Processor25] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/jetspeed].[jsp] - Servlet.service() for servlet jsp threw exception
java.lang.StackOverflowError
	at org.apache.catalina.core.ApplicationHttpRequest.getAttribute(ApplicationHttpRequest.java:222)
	at org.apache.catalina.core.ApplicationHttpRequest.getAttribute(ApplicationHttpRequest.java:222)
	at org.apache.catalina.core.ApplicationHttpRequest.getAttribute(ApplicationHttpRequest.java:222)
        <SNIP/> (more than 300 same lines)
	at org.apache.catalina.core.ApplicationHttpRequest.getAttribute(ApplicationHttpRequest.java:222)
	at javax.servlet.ServletRequestWrapper.getAttribute(ServletRequestWrapper.java:82)
	at org.apache.pluto.container.impl.HttpServletPortletRequestWrapper.getAttribute(HttpServletPortletRequestWrapper.java:516)
	at org.apache.jasper.runtime.PageContextImpl.doFindAttribute(PageContextImpl.java:456)
	at org.apache.jasper.runtime.PageContextImpl.findAttribute(PageContextImpl.java:446)
	at org.apache.commons.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:157)
	at org.apache.jasper.runtime.PageContextImpl.resolveVariable(PageContextImpl.java:849)
	at org.apache.commons.el.NamedValue.evaluate(NamedValue.java:124)
	at org.apache.commons.el.UnaryOperatorExpression.evaluate(UnaryOperatorExpression.java:156)
	at org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:263)
	at org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:190)
	at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:924)
	at org.apache.jsp.WEB_002dINF.templates.layout.html.columns.layout_jsp._jspx_meth_c_005fif_005f0(layout_jsp.java:732)
       <SNIP/>

> After pluto-2 integration, JSP decorators does not work
> -------------------------------------------------------
>
>                 Key: JS2-974
>                 URL: https://issues.apache.org/jira/browse/JS2-974
>             Project: Jetspeed 2
>          Issue Type: Bug
>          Components: Aggregation
>    Affects Versions: 2.2.0
>            Reporter: Woonsan Ko
>            Assignee: Woonsan Ko
>
> I found errors showing an infinite loop and stackOverFlow error, printing many lines containing:
>     
>     ...
>     org.apache.catalina.core.ApplicationHttpRequest.getAttribute....
>     org.apache.catalina.core.ApplicationHttpRequest.getAttribute....
>     ...
>     org.apache.catalina.core.ApplicationHttpRequest.getAttribute....
>     ...
>     org.apache.pluto.container.impl.HttpServletPortletRequestWrapper.getAttribute...
>     ...
> I've just googled and found an existing issue: https://issues.apache.org/bugzilla/show_bug.cgi?id=47017
> In the above issue, the problem was diagnosed as, "Something somewhere called setRequest() on the wrapped request and passed in the same wrapped request setting up the infinite loop."
> I have tried to test locally by modifying HttpServletPortletRequestWrapper, but I have no clue yet.
> I also suspect that this problem can occur for local portlet.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


[jira] Resolved: (JS2-974) After pluto-2 integration, JSP decorators does not work

Posted by "Woonsan Ko (JIRA)" <je...@portals.apache.org>.
     [ https://issues.apache.org/jira/browse/JS2-974?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Woonsan Ko resolved JS2-974.
----------------------------

    Resolution: Fixed

Fixed by unwrapping the request/response for local portlets.
So, tomcat can be aware of the request to create another request.
Thank you, Ate. Your solution resolves this problem.

> After pluto-2 integration, JSP decorators does not work
> -------------------------------------------------------
>
>                 Key: JS2-974
>                 URL: https://issues.apache.org/jira/browse/JS2-974
>             Project: Jetspeed 2
>          Issue Type: Bug
>          Components: Aggregation
>    Affects Versions: 2.2.0
>            Reporter: Woonsan Ko
>            Assignee: Woonsan Ko
>
> I found errors showing an infinite loop and stackOverFlow error, printing many lines containing:
>     
>     ...
>     org.apache.catalina.core.ApplicationHttpRequest.getAttribute....
>     org.apache.catalina.core.ApplicationHttpRequest.getAttribute....
>     ...
>     org.apache.catalina.core.ApplicationHttpRequest.getAttribute....
>     ...
>     org.apache.pluto.container.impl.HttpServletPortletRequestWrapper.getAttribute...
>     ...
> I've just googled and found an existing issue: https://issues.apache.org/bugzilla/show_bug.cgi?id=47017
> In the above issue, the problem was diagnosed as, "Something somewhere called setRequest() on the wrapped request and passed in the same wrapped request setting up the infinite loop."
> I have tried to test locally by modifying HttpServletPortletRequestWrapper, but I have no clue yet.
> I also suspect that this problem can occur for local portlet.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


[jira] Issue Comment Edited: (JS2-974) After pluto-2 integration, JSP decorators does not work

Posted by "Woonsan Ko (JIRA)" <je...@portals.apache.org>.
    [ https://issues.apache.org/jira/browse/JS2-974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12701931#action_12701931 ] 

Woonsan Ko edited comment on JS2-974 at 4/23/09 6:45 AM:
---------------------------------------------------------

This problem happens again after reopening and fixing again for PLUTO-554.
Initially, I tested the problem (importing other jsp page) in a pluto deployment to validate the fix for PLUTO-554.
It worked fine with multiple nested jsp imports.
So, the problem was localized into JS-2.
And, I did some debugging and I found that this happened only for local layout portlet.

When a portlet tries to include something initially, getRequest() is as same as initialRequest.
And, when a servlet dispatched by the portlet is being executed, then getRequest() from the servlet-side is not as same as initialRequest. 
It's because Tomcat create another request object for the included servlet.
And, the important thing is that this happens only when the servlet is really dispatched via servlet request dispatcher (ApplicationDispatcher) by Tomcat.

However, the local portlets is not invoked via servlet request dispatcher. LocalPortletInvoker invokes portlet wrapper methods directly. That's why this problem happens again.

We cannot solve this problem by wrapping the request again.

Therefore, I think the only option is to force local portlets to use portletRequest.getRequestDispatcher() only, disallowing to use servletContext.getRequestDispatcher().

WDYT?

      was (Author: woon_san):
    This problem happens again after reopening and fixing again for PLUTO-554.
Initially, I tested the problem (importing other jsp page) in a pluto deployment to validate the fix for PLUTO-554.
It worked fine with multiple nested jsp imports.
So, the problem was localized into JS-2.
And, I did some debugging and I found that this happened only for local layout portlet.

When a portlet tries to include something initially, getRequest() is as same as initialRequest.
And, when a servlet dispatched by the portlet is being executed, then getRequest() from the servlet-side is not as same as initialRequest. 
It's because Tomcat create another request object for the included servlet.
And, the important thing is that this happens only when the servlet is really dispatched via servlet request dispatcher (ApplicationDispatcher) by Tomcat.

However, the local portlets is not invoked via servlet request dispatcher. LocalPortletInvoker invokes portlet wrapper methods directly. That's why this problem happens again.

In my opinion, if we wrap the request for local portlet, then it will work fine.


  
> After pluto-2 integration, JSP decorators does not work
> -------------------------------------------------------
>
>                 Key: JS2-974
>                 URL: https://issues.apache.org/jira/browse/JS2-974
>             Project: Jetspeed 2
>          Issue Type: Bug
>          Components: Aggregation
>    Affects Versions: 2.2.0
>            Reporter: Woonsan Ko
>            Assignee: Woonsan Ko
>
> I found errors showing an infinite loop and stackOverFlow error, printing many lines containing:
>     
>     ...
>     org.apache.catalina.core.ApplicationHttpRequest.getAttribute....
>     org.apache.catalina.core.ApplicationHttpRequest.getAttribute....
>     ...
>     org.apache.catalina.core.ApplicationHttpRequest.getAttribute....
>     ...
>     org.apache.pluto.container.impl.HttpServletPortletRequestWrapper.getAttribute...
>     ...
> I've just googled and found an existing issue: https://issues.apache.org/bugzilla/show_bug.cgi?id=47017
> In the above issue, the problem was diagnosed as, "Something somewhere called setRequest() on the wrapped request and passed in the same wrapped request setting up the infinite loop."
> I have tried to test locally by modifying HttpServletPortletRequestWrapper, but I have no clue yet.
> I also suspect that this problem can occur for local portlet.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


[jira] Assigned: (JS2-974) After pluto-2 integration, JSP decorators does not work

Posted by "Woonsan Ko (JIRA)" <je...@portals.apache.org>.
     [ https://issues.apache.org/jira/browse/JS2-974?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Woonsan Ko reassigned JS2-974:
------------------------------

    Assignee: Woonsan Ko

> After pluto-2 integration, JSP decorators does not work
> -------------------------------------------------------
>
>                 Key: JS2-974
>                 URL: https://issues.apache.org/jira/browse/JS2-974
>             Project: Jetspeed 2
>          Issue Type: Bug
>          Components: Aggregation
>    Affects Versions: 2.2.0
>            Reporter: Woonsan Ko
>            Assignee: Woonsan Ko
>
> I found errors showing an infinite loop and stackOverFlow error, printing many lines containing:
>     
>     ...
>     org.apache.catalina.core.ApplicationHttpRequest.getAttribute....
>     org.apache.catalina.core.ApplicationHttpRequest.getAttribute....
>     ...
>     org.apache.catalina.core.ApplicationHttpRequest.getAttribute....
>     ...
>     org.apache.pluto.container.impl.HttpServletPortletRequestWrapper.getAttribute...
>     ...
> I've just googled and found an existing issue: https://issues.apache.org/bugzilla/show_bug.cgi?id=47017
> In the above issue, the problem was diagnosed as, "Something somewhere called setRequest() on the wrapped request and passed in the same wrapped request setting up the infinite loop."
> I have tried to test locally by modifying HttpServletPortletRequestWrapper, but I have no clue yet.
> I also suspect that this problem can occur for local portlet.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


[jira] Reopened: (JS2-974) After pluto-2 integration, JSP decorators does not work

Posted by "Woonsan Ko (JIRA)" <je...@portals.apache.org>.
     [ https://issues.apache.org/jira/browse/JS2-974?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Woonsan Ko reopened JS2-974:
----------------------------


This problem happens again after reopening and fixing again for PLUTO-554.
Initially, I tested the problem (importing other jsp page) in a pluto deployment to validate the fix for PLUTO-554.
It worked fine with multiple nested jsp imports.
So, the problem was localized into JS-2.
And, I did some debugging and I found that this happened only for local layout portlet.

When a portlet tries to include something initially, getRequest() is as same as initialRequest.
And, when a servlet dispatched by the portlet is being executed, then getRequest() from the servlet-side is not as same as initialRequest. 
It's because Tomcat create another request object for the included servlet.
And, the important thing is that this happens only when the servlet is really dispatched via servlet request dispatcher (ApplicationDispatcher) by Tomcat.

However, the local portlets is not invoked via servlet request dispatcher. LocalPortletInvoker invokes portlet wrapper methods directly. That's why this problem happens again.

In my opinion, if we wrap the request for local portlet, then it will work fine.



> After pluto-2 integration, JSP decorators does not work
> -------------------------------------------------------
>
>                 Key: JS2-974
>                 URL: https://issues.apache.org/jira/browse/JS2-974
>             Project: Jetspeed 2
>          Issue Type: Bug
>          Components: Aggregation
>    Affects Versions: 2.2.0
>            Reporter: Woonsan Ko
>            Assignee: Woonsan Ko
>
> I found errors showing an infinite loop and stackOverFlow error, printing many lines containing:
>     
>     ...
>     org.apache.catalina.core.ApplicationHttpRequest.getAttribute....
>     org.apache.catalina.core.ApplicationHttpRequest.getAttribute....
>     ...
>     org.apache.catalina.core.ApplicationHttpRequest.getAttribute....
>     ...
>     org.apache.pluto.container.impl.HttpServletPortletRequestWrapper.getAttribute...
>     ...
> I've just googled and found an existing issue: https://issues.apache.org/bugzilla/show_bug.cgi?id=47017
> In the above issue, the problem was diagnosed as, "Something somewhere called setRequest() on the wrapped request and passed in the same wrapped request setting up the infinite loop."
> I have tried to test locally by modifying HttpServletPortletRequestWrapper, but I have no clue yet.
> I also suspect that this problem can occur for local portlet.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


[jira] Resolved: (JS2-974) After pluto-2 integration, JSP decorators does not work

Posted by "Woonsan Ko (JIRA)" <je...@portals.apache.org>.
     [ https://issues.apache.org/jira/browse/JS2-974?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Woonsan Ko resolved JS2-974.
----------------------------

    Resolution: Fixed

This problem is mainly fixed by the commit for PLUTO-554.
In this commit, I added head contribution stuffs in JSP decorators. (See JS2-961)

> After pluto-2 integration, JSP decorators does not work
> -------------------------------------------------------
>
>                 Key: JS2-974
>                 URL: https://issues.apache.org/jira/browse/JS2-974
>             Project: Jetspeed 2
>          Issue Type: Bug
>          Components: Aggregation
>    Affects Versions: 2.2.0
>            Reporter: Woonsan Ko
>            Assignee: Woonsan Ko
>
> I found errors showing an infinite loop and stackOverFlow error, printing many lines containing:
>     
>     ...
>     org.apache.catalina.core.ApplicationHttpRequest.getAttribute....
>     org.apache.catalina.core.ApplicationHttpRequest.getAttribute....
>     ...
>     org.apache.catalina.core.ApplicationHttpRequest.getAttribute....
>     ...
>     org.apache.pluto.container.impl.HttpServletPortletRequestWrapper.getAttribute...
>     ...
> I've just googled and found an existing issue: https://issues.apache.org/bugzilla/show_bug.cgi?id=47017
> In the above issue, the problem was diagnosed as, "Something somewhere called setRequest() on the wrapped request and passed in the same wrapped request setting up the infinite loop."
> I have tried to test locally by modifying HttpServletPortletRequestWrapper, but I have no clue yet.
> I also suspect that this problem can occur for local portlet.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org