struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Bush (Jira)" <>
Subject [jira] [Commented] (WW-5030) ClassNotFoundException - MockPortletResponse
Date Fri, 14 Feb 2020 03:05:00 GMT


John Bush commented on WW-5030:

Thanks for the suggestion however I have solved this problem by just copying the package to
my projects. It looks like the struts portlet plugin hasn't changed for some time so this
solution is stable. At the time I reported this you mentioned that you thought the Spring
package could possibly just be refactored into the plugin since they dropped supporting it.
I'm not real familiar with the licensing limitations but this seems to me to be your best
solution if it could happen. Otherwise, as you suggested, the project write it's own. IMHO
tying Struts2 to PortletMVC4Spring just for the mock classes would be a mistake.
Thanks John

PS Interesting timing. I was just looking at these announcements because I was asked what
it would take to convert from Liferay 6.x projects (currently) to Liferay 7.x (proposed).


> ClassNotFoundException - MockPortletResponse
> --------------------------------------------
>                 Key: WW-5030
>                 URL:
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Portlet
>    Affects Versions: 2.5.18
>            Reporter: John Bush
>            Priority: Major
>             Fix For: 2.6
>         Attachments:, fail.txt, success.txt
> WW-3826 solved a problem running JUnit tests on portlet actions that use the struts2-portlet-plugin
and struts2-junit-plugin. The solution used Spring's org.springframework.mock.web.portlet
package in the spring-test framework. Spring Portlet MVC is no longer supported (SPR-14129)
and the package has been removed starting with Spring 5. I'm not able to upgrade to Spring
5 without loosing my unit testing since having both versions of spring-test in my classpath
creates many other issues.
> I've attached a zipped portlet project for testing (, console log
from a successful test (success.txt) and console log from a failed test (fail.txt). All that
needs to change is the spring-version in the POM to recreate the testing.

This message was sent by Atlassian Jira

View raw message