2 Replies Latest reply on Sep 28, 2006 9:23 AM by c.comparini

    null reference to CMSservice

    c.comparini

      Hi all,
      I tried to get a reference in my own portlet to CMS: I added the following code in the init of myCMSAdminPortlet:

      CMSService = (CMS)getPortletContext().getAttribute("CMS");
      if (CMSService == null)
      {
      throw new PortletException("Cannot start CMSAdmin portlet due to service unavailability");
      }


      and in jboss-portal.xml in my war file:

      <service-name>CMS</service-name>
      <service-class>org.jboss.portal.cms.CMS</service-class>
      <service-ref>:service=CMS</service-ref>


      but CMSService is null. What do I forget?
      Can anyone help?