Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-5030

ClassNotFoundException - MockPortletResponse

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.18
    • Fix Version/s: 2.6
    • Component/s: Plugin - Portlet
    • Labels:
      None

      Description

      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 (TestStrutsPortlet.zip), 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.

        Attachments

        1. TestStrutsPortlet.zip
          16 kB
          John Bush
        2. success.txt
          2 kB
          John Bush
        3. fail.txt
          5 kB
          John Bush

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jtbush John Bush
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: