Showing posts with label WebSphere Portlet factory. Show all posts
Showing posts with label WebSphere Portlet factory. Show all posts

Monday, 28 May 2012

IBM WebSphere Portlet Factory: IPC Error - EJPKB0991E


WebSphere Portlet Factory: Property Broker Error while IPC - EJPKB0991E

Eventing is a wonderful feature provided by JSR 286 for Inter-portlet Communication. In IBM WebSphere Portlet Factory 6.1.5 onwards, there are 2 builders provided to achieve Inter portlet Communication (JSR 286 way). These builders are:

· Cooperative Portlet Source builder
· Cooperative Portlet Target builder

Cooperative Source builder is added in model which is going to publish the event. Cooperative target builder is added in model which is going to Consume the events.

Apart from using these 2 builders, we need to wire the source and target portlets, so that IBM WPS Property Broker can determine from where to send the event and to whom.

Sometimes a weird error comes whenever we perform inter-portlet communication. The error that comes is:

[5/16/12 14:45:09:043 IST] 0000004c PropertyDispa E com.ibm.wps.propertybroker.dispatch.PropertyDispatcherImpl dispatchSourceEvents EJPKB0991E: The propertybroker encountered a problem finding a communication source with name MyEvent for portlet definition PortletDefinition: com.ibm.wps.datastore.impl.PortletDescriptorImpl@50f73720
objectID: [ObjectIDImpl '3_P3668B1A001P70ITIMHLOS2084', PORTLET_DEFINITION, VP: 0, [Domain: rel], DB: 0000-791883565000847C80ECD2C68AB90088]
created: 1336999629870
lastModified: 1337153197840
portletName: SourcePortlet
isActive: true
expires: null
isShared: null
applicationDescriptorObjectID: [ObjectIDImpl '2_P3668B1A001P70ITIMHLOS2004', PORTLET_APPLICATION_DEFINITION, VP: 0, [Domain: rel], DB: 0000-791883565000847C80ECD2C68AB90080]
defaultLocale: en
servletDescriptorObjectID: [ObjectIDImpl 'V_P3668B1A001P70ITIMHLOS2080', SERVLET_DEFINITION, VP: 0, [Domain: rel], DB: 0000-791883565000847C80ECD2C68AB90008]
wspIsProvided: false
initParameters: {}
localeData: Supported locales=[ar ca cs da de el en es fi fr hr hu it iw ja ko nl no pl pt pt_BR ro ru sk sl sv th tr uk zh zh_TW ] Loaded locales=[en: Source Portlet Title, Source Portlet , Source Portlet Title, null, ]
preferences: {}

The error message states that Property Broker could not find source for MyEvent event. The problem appears because of class files present in /WEB-INF/classes folder in application.

To rectify it delete all the java class present files in /WEB-INF/classes folder, also delete WPF model class files (if present) under genjava directory in /WEB-INF/classes folder. Restart the application after deletion.

Hope this solution helps.

Please post your comments on this article.

Saturday, 10 December 2011

Highlight alternate rows in WebSphere portlet factory (WPF)

Often, there is a need to highlight alternate rows when displaying the data using page automation builders like data page builder. Highlighting alternate rows also provide better visual presentation for your page and increases readability of the data table.

IBM WebSphere portlet factory provides a very simple technique to add attributes to alternate rows in data table.


You can build this functionality into an HTML template. On any XML node for which an alternating attribute is desired, simply prefix the attribute name with sequence_ (with the underscore) and list the different values for the attribute in a comma-separated list.

For example, in a

tag, to alternate between the HTML class names OddRow and EvenRow, add the following: 

< tr sequence_class="OddRow,EvenRow">
.........

</tr>

This would highlight the alternate rows in the data table. Similarly we, can add any attribute for alternate rows in a data table using page automation builders.

Saturday, 26 November 2011

Inter Portlet Communication in IBM WebSphere Portlet factory

While developing any portal application, we need to make portlets talk to each other and exchanging some data between each other.
 In Websphere portlet factory there are several ways to make portlet talk to each other. One of the way to achieve this is Inter Portlet Communication using Property Broker.

Cooperative portlet source builder is used in the source builder to declare the event to be published by source portlet model and Cooperative Portlet target builder is used in Target portlet model .

So for example if we consider a library management portal page having 2 portlets:
  • Books List portlet: This portlet shows a table containing all the fiction books. On clicking on the book label , details of the clicked book is displayed in the books detail portlet.
  • Books Details portlet: This portlet shows the details of the book.