struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruce Phillips (JIRA)" <j...@apache.org>
Subject [jira] [Reopened] (WW-3763) Struts Portlet Plugin Version 2.3.1.2 Breaks Using Struts Project For Both Portlet and Standalone Application
Date Wed, 09 May 2012 16:11:51 GMT

     [ https://issues.apache.org/jira/browse/WW-3763?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Bruce Phillips reopened WW-3763:
--------------------------------


This problem has resurfaced in version 2.3.3 and was not fixed in that version.  Please see
below:


The 2.3.3 release of the Struts Portlet Plugin breaks using a Struts application as both a
portlet and as a standalone Java application.  I believe the issue is similar to https://issues.apache.org/jira/browse/WW-3763.
 Thought we had fixed that issue, but additional changes made to the Struts Portlet plugin
source code after the patch was applied have caused the same problem.   

I wonder if this line (69) in PortletRenderUrl 

  if (PortletActionContext.getPortletContext() == null || "none".equalsIgnoreCase(urlComponent.getPortletUrlType()))
{ 
            servletRenderer.renderUrl(writer, urlComponent); 
            return; 
        } 

is part of the issue.  Does urlComponent.getPortletUrlType() still return "none" ? 

Here is the stack trace when executing an action that is for the standalone web application
(extends struts-default) when also using the Struts 2.3.3 portlet plugin and actions in package
that extends struts-portlet-default) 

May 4, 2012 9:33:17 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger error 
SEVERE: java.lang.NullPointerException 
org.apache.jasper.JasperException: java.lang.NullPointerException 
        at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:491)

        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)

        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) 
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) 
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)

        at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)

        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)

        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)

        at org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:164)

        at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)

        at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:374)

        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:278)

        at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)

        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)

        at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)

        at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)

        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)

        at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)

        at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)

        at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)

        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)

        at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)

        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)

        at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:211)

        at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)

        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)

        at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:211)

        at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)

        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)

        at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)

        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)

        at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)

        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)

        at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:90)

        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)

        at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)

        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)

        at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)

        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)

        at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)

        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)

        at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)

        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)

        at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)

        at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)

        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)

        at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)

        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)

        at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)

        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)

        at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:192)

        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)

        at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)

        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)

        at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54) 
        at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:510) 
        at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:432)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)

        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) 
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) 
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857) 
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)

        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) 
        at java.lang.Thread.run(Thread.java:619) 
Caused by: java.lang.NullPointerException 
        at org.apache.struts2.components.ServletUrlRenderer.renderUrl(ServletUrlRenderer.java:94)

        at org.apache.struts2.components.PortletUrlRenderer.renderUrl(PortletUrlRenderer.java:73)

        at org.apache.struts2.components.URL.end(URL.java:149) 
        at org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42)

        at org.apache.jsp.jsp.employees_jsp._jspx_meth_s_005furl_005f0(employees_jsp.java:166)

        at org.apache.jsp.jsp.employees_jsp._jspService(employees_jsp.java:86) 
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) 
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)

        ... 70 more 



                
> Struts Portlet Plugin Version 2.3.1.2 Breaks Using Struts Project For Both Portlet and
Standalone Application
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-3763
>                 URL: https://issues.apache.org/jira/browse/WW-3763
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Portlet
>    Affects Versions: 2.3.1.2
>         Environment: Java JDK 6, Tomcat 6
>            Reporter: Bruce Phillips
>            Assignee: Lukasz Lenart
>             Fix For: 2.3.3
>
>         Attachments: struts2_portlet_plugin_patch.txt
>
>
> I've got a few Struts application where I use the Struts 2 portlet plugin to create a
portlet and still have a standalone web application. 
> This worked fine through Struts 2 portlet plugin version 2.2.1.1.  For an example of
this problem download and unzip this Eclipse/Maven project:
>    http://code.google.com/p/struts2-examples/downloads/detail?name=Struts2CRUDPortletExample_Finish.zip
>  (read the README.txt file for how to build/deploy). 
> This project uses Struts 2.2.1.1.  It builds a war file that when deployed to Tomcat
will register a portlet (that can be used in the Pluto portal container) and a web application
that can be accessed via calls to Struts Actions.
> I tried to upgrade this project to use Struts version 2.3.1.2 (both core and portlet
plugin).  The port let still works fine.  But after upgrading to 2.3.1.2 when trying to load
an action for the standalone version (an action defined in package extends="struts-default")
I get the following exception: 
> Struts Problem Report 
> Struts has detected an unhandled exception: 
> Messages: 
>     java.lang.reflect.InvocationTargetException 
>     java.lang.RuntimeException: java.lang.reflect.InvocationTargetException 
>     java.lang.RuntimeException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException

>     java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException 
>     An exception occurred processing JSP page /jsp/employees.jsp at line 5 2: <%@
taglib prefix="s" uri="/struts-tags" %> 3: 4: 5: 6: 7: 8: Stacktrace: 
> File: org/apache/struts2/portlet/context/PortletActionContext.java 
> Line number: 225 
> Stacktraces 
> org.apache.jasper.JasperException: An exception occurred processing JSP page /jsp/employees.jsp
at line 5 2: <%@ taglib prefix="s" uri="/struts-tags" %> 3: 4: 5: 6: 7: 8: Stacktrace:


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message