Troubleshoot portlet development


This section contains information that can assist you in preventing, identifying, and correcting problems related to WebSphere Portal. For information related to specific components, see the appropriate troubleshooting topic.

 

Install WAR file fails when file name is too long

Solution: Because Windows limits the maximum path length to 260 characters, the name of the WAR file must be less than approximately 25 characters. Installing a WAR file with a name that is more than 25 characters can result in longer pathnames which makes the files not accessible anymore resulting in FileNotFoundExceptions. The Portal tries to truncate or rename long names before it deploys the WAR file into Application Server. However it cannot always circumvent the pathname to exceed the limit. To correct this error, modify the file name to be less than 25 characters. It is recommended that you install WebSphere products into the root directory to keep the common part of pathname short. For example, install to c:\WebSphere instead of c:\Program Files\WebSphere.


 

Install WAR file fails when web.xml <display-name> is too long

Solution: Because Windows limits the maximum path length to 260 characters, the <display-name> of the web application in the web.xml must be as short as possible, approximately less than 25 characters. Application Server uses the <display-name> to construct the application name space. Installing a WAR file with a <display-name> that is more than 25 characters can result in longer pathnames which makes the files not accessible anymore resulting in FileNotFoundExceptions. The Portal tries to truncate or rename long names before it deploys the WAR file into Application Server. However it cannot always circumvent the pathname to exceed the limit. To correct this error, modify the file name (and related <display-name>) to be less than 25 characters. It is recommended to install the WebSphere products into the root directory to keep the common part of pathname short, e.g. c:\WebSphere instead of c:\Program Files\WebSphere.


 

Login command customization fails

Solution: When creating your own implementation of one of the WebSphere Portal classes, for example, Login or Logout modules, update WebSphere Application Server so that the classes load correctly.

  1. Open the Administrative Console for WebSphere Application Server.
  2. Click Environment, then Shared Libraries, then WPSlib.
  3. Add your JAR file to Classpath.
  4. Click Ok.
  5. Click Save to save the changes to the master configuration.
  6. Restart the WebSphere_Portal appserver.


 

Cannot share session data between Web applications

In WebSphere Portal V5.0.2, portlets cannot share data through the session with each other. This is because with WebSphere Application Server V5, the J2EE specification states that web applications cannot share session data. This J2EE specification also applies to setting data into the session from a custom log in or any portlets in a different web application.

To work around this, use either a database update or a singleton with a hashmap that contains your data.

 

See also

Home |

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.