Struts sample portlet throws an error when deployed on Mobile Portal Toolkit (Procedure for cleaning plug-ins)

If you encounter errors deploying the Struts sample portlet, you can work around it by migrating the policies or refreshing the installation.

Issue

When deploying the Struts portlet on a Mobile Portal Toolkit environment, the following exception is thrown:
[1/19/12 1:49:21:142 PST] 00000042 servlet       
E com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0068E: Uncaught exception created in one of the service methods of the servlet strutsP in application strutsPEAR. Exception created : org.apache.jetspeed.portlet.PortletException
	at com.ibm.wps.portlets.struts.WpsStrutsUtil.executeCommand(WpsStrutsUtil.java:1460)
	at com.ibm.wps.portlets.struts.WpsStrutsUtil.executeCommand(WpsStrutsUtil.java:1322)
	at com.ibm.wps.portlets.struts.WpsStrutsUtil.executeSavedCommand(WpsStrutsUtil.java:1240)
	at com.ibm.wps.portlets.struts.WpsStrutsPortlet.doService(WpsStrutsPortlet.java:1325)
	at com.ibm.wps.portlets.struts.WpsStrutsPortlet.doView(WpsStrutsPortlet.java:1368)
	at org.apache.jetspeed.portlet.PortletAdapter.service(PortletAdapter.java:158)
	at com.ibm.wps.pe.pc.legacy.invoker.impl.PortletDelegateImpl._dispatch(PortletDelegateImpl.java:350)
	at com.ibm.wps.pe.pc.legacy.invoker.impl.PortletDelegateImpl.access$200(PortletDelegateImpl.java:70)

Explanation

If you uninstall and reinstall Mobile Portal Toolkit on the same machine, the cache entries in p2 (RAD804\SDP\p2\cic.p2.cache.location\plugins) are sometimes not deleted.

Portlet Rendering Problems

If your portlet is working on previous Mobile Portal Accelerator versions, and it is not working on the current version, check that the policies are migrated. If the policies were not migrated, follow these steps:
  1. Use the mcsMigrate.bat[sh] to migrate the previous Multi-Channel Server policies to the MCS 6.3 policies. For example, use the command:
    mcsMigrate.bat[sh] -input mcs-policies -output mcs6.3 policies
  2. Once the policies are migrated, replace the existing policies with the migrated policies, rebuild, and redeploy the .war file.
For an alternative workaround, follow these steps:
  1. Replace the MWPStrutsSample.zip present in the location RAD804\SDP\p2\cic.p2.cache.location\plugins\com.ibm.mwp.portletexamples_7.0.0\install directory with the MWPStrutsSample.zip present in the location mptk702\eclipse\plugins\com.ibm.mwp.portletexamples_7.0.0\install.
  2. Restart Rational® Application Developer with -clean option.

Resolution

You can also reinstall the portlet or plugin using the Eclipse Software Installer.

  1. Go to Help > About to uninstall the software (MCS or Mobile Portal Accelerator extensions plug-ins) that you installed.
  2. Restart Eclipse.
  3. Delete the MCS or Mobile Portal Accelerator extensions related plug-ins that are in the p2 directory.
  4. Install the MCS or Mobile Portal Accelerator extensions plug-ins again.
  5. Use the -clean command to check whether your new content loaded.



Terms of use
(C) Copyright IBM Corporation 2012. All Rights Reserved.