12.3 Hints and tips

 < Day Day Up > 

In this section, we provide guidelines to troubleshoot some common cooperative portlets problems you may encounter.

Updates in portlet.xml are not reflected after a server restart

When using configuration parameters in portlet.xml, existing parameters are preserved and only new ones are added. To change this behavior, you have to change a special configuration parameter of the Deployment service as follows :

  1. Open the file <WSSD_DIR>/ runtimes /portal_v50/shared/app/config/services/ DeploymentService.

  2. Scroll down to the line update.portlet. preserves .config.settings = true and change this parameter value to false .

  3. Restart the server.

Updates in WSDL files are not reflected after a server restart

Because of some limitations, updating the portlet application does not cause the WSDL to be read again.

There are a few ways to achieve an update after changing the WSDL file.

  • You can reinstall the portlet application.

  • You can program an action forcing the file to be reloaded.

  • You can use XMLAccess to update the portlet. This is explained in Appendix B, "Automatically redeploying portlets" on page 535.

To reinstall the portlet application:

  1. From the server configuration view, double-click your server.

  2. In the server configuration editor, switch to the Portal tab.

  3. Check Enable base portlets for administration and customization , save the configuration and close the editor.

  4. Start the server.

  5. Open a browser and log in. Switch to the administration page.

    Figure 12-41. Switch to the Administration page to reinstall a portlet

    graphics/12fig41.jpg

  6. From the left menu, select Portlets -> Manage Applications .

  7. From the Web Modules list, select your cooperative target portlet and click Uninstall .

    Figure 12-42. To uninstall a portlet, select the portlet and click Uninstall

    graphics/12fig42.gif

  8. Restart the server.

    To force a reload of the WSDL files, you can also program a portlet action as illustrated in Example 12-3. After execution of this action (for example in configuration mode) and a new login, the runtime Portal will parse the changed WSDL file and store the new action set.

Example 12-3. This action removes all registered actions
 if (actionString.equals("RemoveAllActions")) {         PropertyBrokerService pbService = null;         try {            pbService =               (PropertyBrokerService) portletConfig                  .getContext()                  .getService(                  PropertyBrokerService.class);         } catch (PortletServiceUnavailableException e) {            e.printStackTrace();         } catch (PortletServiceNotFoundException e) {            e.printStackTrace();         }         PortletSettings settings = request.getPortletSettings();         try {            pbService.unregisterActions(request, settings);         } catch (PropertyBrokerServiceException e) {            e.printStackTrace();         }      } 

The server stops immediately after a server start

When you deploy a portlet application with a changed portlet UID which was already deployed before, the server does not start correctly because the old portlet configuration still exists in the configuration database.

This also happens if you create a new portal server within WebSphere Studio. To fix this problem, proceed as follows:

  1. Remove all projects from your existing server configuration.

  2. Enable the base portlets and start the server.

  3. Log in to WebSphere Portal and remove the existing portlet through the Administration page.

  4. Stop the server.

  5. Add the projects you removed previously.

 < Day Day Up > 


IBM WebSphere Portal V5 A Guide for Portlet Application Development
IBM Websphere Portal V5: A Guide for Portlet Application Development
ISBN: 0738498513
EAN: 2147483647
Year: 2004
Pages: 148

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net