Developing WCM based WebSphere Portal application using IBM Rational Application Developer V8.5

The document is aimed at the development of Web Content Management based portlets for IBM WebSphere® Portal using IBM Rational® Application Developer V8.5.

Click here to download

JSF portlet application development and migration tips and suggestions

This document describes best practices for developing JSF Portlets using Rational Application Developer for IBM WebSphere Portal Server.

JSF Portlet Application Development Tips

Enable jQuery Mobile on WebSphere Portal

Enabling jQuery on WebSphere Portal is a multi-step procedure, attached document outlines the procedural steps for you to leverage the power of jQuery on WebSphere Portal.

JQuery-Theme-Mobile-module.pdf

WebSphere Portal 8.5.0 is here !!

Here is the link to WebSphere Portal 8.5.0 documentation.
http://www-01.ibm.com/support/knowledgecenter/SSHRKX_8.5.0/welcome/wp_welcome.html?lang=en

Server startup: Initialization of service failed - The service could not be located

Root Cause

These messages indicate that the the temporary directory for extension points has become corrupted. This can happen after a server is upgraded.

[3/26/14 2:01:48:243 IST] 0000000a Servlet E com.ibm.wps.engine.Servletinit EJPFD0016E: Initialization of service failed.
com.ibm.portal.resolver.exceptions.LocalizedIOException: EJCBC0002E: The service [com.ibm.wps.resolver.friendly.FriendlySelectionCacheServiceHome] could not be located.
at com.ibm.portal.resolver.helper.eclipse.Platform.createInstance(Platform.java:218)


Resolving the problem

To resolve this problem, you can do the following:
1. Stop the WebSphere_Portal server
2. Delete the contents of the following directory:
<wp_profile root>/temp/<node name>/WebSphere_Portal/_extensionregistry
3. Start the WebSphere_Portal server.

http://www-01.ibm.com/support/docview.wss?uid=swg21459952

Syndication Issues : How to increase the WAS Transation Timeout on the Syndicator ?

If you encounter any issue with WCM content not getting syndicated from one WCM server to another then problem could be resolved by increasing the WAS transaction timeout value on the syndicator. Here are the steps to do that.
  • Log into the WAS Console
  • Navigate to Servers -> Server Types -> WebSphere application servers -> WebSphere_Portal -> Container Services -> Transaction service
  • Click on the Runtime tab
  • Increase the Total transaction lifetime time-out and Maximum transaction time-out settings to 3600 seconds
Next, need for you to increase the historical log files on both the syndicator and subscriber. To do that:
  • Log into the WAS Console
  • Navigate to Troubleshooting -> Logs and trace -> WebSphere_Portal -> Diagnostic trace
  • Click on the Runtime tab
  • Increase the Maximum File Size to 150MB.*
  • Increase the Maximum Number of Historical Files to 100.*
*Make sure you have the available disk space before you set this value.

How to reset Password for Portal Admin if forgotten?

Problem Statement:

How to reset Password for Portal Admin if forgotten?

Solution:

This article talks about how to change administrative passwords by editing the user's profile via WebSphere Portal. However, in the case of a forgotten password, you can resolve the issue by performing the steps  below.

1. Navigate to profile directory \IBM\WebSphere\wp_profile\bin\

2. Run the following command

wsadmin -conntype NONE

3. Issue the following command and press enter

$AdminTask changeFileRegistryAccountPassword {-userId admin -password admin}

$AdminConfig save

The above commands should reset the user's password in the fileRegistry.xml located in <wp_profile>/config/cells/<cellname>. However, note that you will still need to run the Portal ConfigEngine task(s) to update the configuration with the new password information:

4. Navigate to IBM\WebSphere\wp_profile\ConfigEngine directory.

5. Issue the following command

ConfigEngine.bat wp-change-portal-admin-user - DnewAdminId=uid=wpsadmin,o=defaultWIMFileBasedRealm -DnewAdminPw=Pass1234 -Dskip.ldap.validation=true

6. If your WebSphere Application Server admin user is the same ID as your Portal admin user, then also issue the following command:

ConfigEnginewp-change-was-admin-user -DnewAdminId=uid=wpsadmin,o=defaultWIMFileBasedRealm -DnewAdminPw=Pass1234 -Dskip.ldap.validation=true
Where wpsadmin is the new userId and Pass1234 is the new password of the server.

7. Restart the servers including Portal.

Application Deployment [Admin Exception: A composition unit with the name already exists]

Problem Statement

Following error log is generated when you try to deploy an application to Websphere portal/app server. It could happen if someone tried to manually replace the EAR folder under profile root/config/cells.The key to this error is the message: "A composition unit with name PA_myApp already exists. Select a different application name." This implies that the application is already deployed, at least partially, in the WAS configuration.
[3/20/13 15:07:15:445 IST] 00000048 SystemErr R com.ibm.websphere.management.exception.AdminException: A composition unit with name PA_myApp already exists. Select a different application name.
[3/20/13 15:07:15:445 IST] 00000048 SystemErr R at com.ibm.ws.management.bla.j2ee.ext.tasks.ValidateBLATask._validateBLAInstall(ValidateBLATask.java:348)

Solution

To resolve the problem, follow these steps

1. Check the following locations to see if the app directories exist:

<profile root>/config/cells/cellname/applications/PA_myApp
<profile root>/config/cells/cellname/blas/PA_myApp
<profile root>/config/cells/cellname/cus/PA_myApp

Remove any of the directories you see, where "PA_myApp" is your application name.

2. If in a cluster, check the DMGR as well in the same locations.
3. Clear the contents of the profile/wstemp directory (and on the DMGR as well if in a cluster).
4. Restart the Portal Server (and DMGR if clustered) and reattempt the deployment.

Creating Stateless friendly URLs

By default, WebSphere Portal URLs include navigational state information. If you configure pages for friendly URLs, the portal appends the state information to the friendly URLs. Some scenarios require short and fully human readable URLs that omit the state information.

For such scenarios you can configure friendly URLs so that the portal does not show that state information.

1. Under the WebSphere Integrated Solutions Console > Resource Environment Provider, “WP ConfigService”, set the custom property friendly.redirect.enabled value to “false”. If the property is not listed there, add it, and set it to false.

2. Set com.ibm.portal.theme.hasBaseURL to true in our Theme configuration (xml configuration below)

3. Update navigation.jsp to generate friendly URLs. This seems to be working for all URLs on pages using our theme have friendly URLs.

Use the following xml to update the theme hasBaseUrl parameter:

<?xml version="1.0" encoding="UTF-8"?>
<request build="wpnext_372_01" type="update" version="7.0.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="PortalConfig_7.0.0.xsd">
<portal action="locate">
<theme action="update" uniquename="ibm.portal.custom.theme8"><parameter name="com.ibm.portal.theme.hasBaseURL" type="string" update="set">true</parameter></theme>
</portal>
</request>

The portal now no longer displays the state information with the URLs.

http://infolib.lotus.com/resources/portal/8.0.0/doc/en_us/PT800ACD001/admin/mp_friendly_short_url.html

Link to Electronic images of WebSphere Portal version 8.0

How to deploy and access portlets from WAS ?

Here is a new feature which IBM has put in a portlet container into WAS 7 and later. Try the following steps.

Portlets cannot run on WAS supplied with portal or on the WAS on which Portal server is running on your machine so you need to deploy and run the portlets on server1 instance and not WebSphere_Portal i.e separate standalone WAS.

If you try to run the portlet on the WAS on which portal server is running you might get an error such as "Direct portlet access prevented by WebSphere Portal".

To access the admin console of server1 instance use the following URL

https://localhost:9043/ibm/console/login.do?action=secure

Deploy the war containing 1 or more portlets on WAS server.

  • Provide the context root (e.g. /sample)
  • Select server as server1.
  • Follow the steps to complete the installation
  • Make sure war file is started after the installation is completed

Now hit the following URL in the browser to see the portlet

http://localhost:9080/sample/Portlet1

where /sample is the context root of the application and and Portlet1 is the portlet name defined in the portlet.xml

By hitting the above URL one should be able to see the portlet from WAS though basic features of portal will be missing from portlets as its running from WAS.

WebDav Client on Linux

"Web Distributed Authoring and Versioning (WebDAV), an extension to the HTTP-protocol, allows authoring of resources on a remote web server. davfs2 provides the ability to access such resources like a typical file system, allowing for use by standard applications with no built-in support for WebDAV." (http://savannah.nongnu.org/projects/davfs2)

This is the easy way of mounting a webdav share from the command line.

1. Install davfs2

sudo yum install davfs2

2. Mount remote resource (you might be prompted for credentials)

sudo mount -t davfs http://localhost:8000/webdav /mnt/dav

3. Access the remote resource locally in /mnt/dav directory.

Recent Posts

Reader Comments

Popular Posts

© 2011-2014 Web Portal Club