This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

PortletServiceUnavailableException - WPS5.1 - using IBM Portlet

 
Amitav Anand
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic