*
The moose likes Portals and Portlets and the fly likes PortletServiceUnavailableException - WPS5.1 - using IBM Portlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Portals and Portlets
Bookmark "PortletServiceUnavailableException - WPS5.1 - using IBM Portlet" Watch "PortletServiceUnavailableException - WPS5.1 - using IBM Portlet" New topic
Author

PortletServiceUnavailableException - WPS5.1 - using IBM Portlet

Amitav Anand
Ranch Hand

Joined: Sep 22, 2003
Posts: 46
In my application, I have got a portlet service whose entry is mentioned in the PortletServiceRegistryService.properties file.
To retrieve the entry from the above mentioned property file, I have this block of code in the filter that intercepts the request and tries to get the service object from the propery file.

Entry in the PortletServiceRegistryService.properties file.
Location of the file in the Unix box is : /opt/WebSphere/PortalServer/shared/app/config/services/PortletServiceRegistryService.properties
com.xxx.xxxxx.MyService = com.xxx.xxx.xxx.MyServiceImpl

Block of code which tries to get the service object
try{

MyService svc = (MyService )portletConfig.getContext().getService(com.xxx.xxxxx.MyService.class);
}
catch(PortletServiceUnavailableException e)
{
throw new Exception("Portlet Service is not available.");
}

The parameter passed to the getService() method is exactly same as the key entered in the PortletServiceRegistryService.properties file.
And both MyService and MyServiceImpl files are in a JAR, which is kept in shared/app.

But its throwing PortletServiceUnavailableException in the above block of code.
Could anyone help me out in this regard please? Its really very urgent ..

In the property file, there are many portlet services which are required for WPS 5.1 server itself and they must be getting loaded for sure..I am wondering why the newly added MyService is not availavle.

Is there any specific configuration required on the portal server to locate the portlet service?

Many Thanks.
Amit
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: PortletServiceUnavailableException - WPS5.1 - using IBM Portlet