websphere-portalwcmlotus-wcmibm-was

How to Enable PortalAdminHome in Websphere Portal?


I have this below code in my jsp page in which I am using PumaAdminHome object but I am getting "java.lang.IllegalStateException: PortalAdminHome is not enabled" error while accessing it. I have already followed this Work-around but of no help.

  configuration in the admin console.

  Resources -> Resource environment providers -> WP PumaService

  Add following custom properties

  Name: enablePumaAdminHome Value: true
  Restart the server.

My Code-

    pHome=  (PumaAdminHome) initContext.lookup(PumaAdminHome.JNDI_NAME);

    pController = pHome.getController();

    pLocator = pHome.getLocator();
     if(pLocator !=null){
        out.println("<BR> pLocator is not null and list size is :" + pLocator.findUsersByAttribute("uid", "*").size());

        } 
    pProfile = pHome.getProfile();

My original requirement is to use PUMA API and WCM API in a web application using jsp. Since I was not able to get the user's info by using PumaHome object, I switched to PumaAdminHome after following this link- https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014798289 . Please help me. How can I solve this problem? I am stuck to this and not getting any clue.


Solution

  • I was able to solve this issue by following below solution-

    1) Go to WAS admin console.
    
    2) Navigate to Resources -> Resource environment providers -> WP PumaStoreService
    
    3) Add following custom properties
    
      Name: enablePumaAdminHome Value: true 
    
    4) Restart the server.
    

    The reason I used PumaAdminHome is explained in the link that have mentioned in my question.