2 Replies Latest reply on Jun 26, 2007 11:50 AM by matt4400

    problem when deploying IPC portlet

      Hello,
      I'm working with JBoss Portal 2.6CR2 and I'm developping IPC portlet. When I deploy the .sar file in JBoss I have this exception :

      java.lang.ClassNotFoundException: No ClassLoaders found for: com.wyniwyg.core.blog.portlet.ResourceListePortlet$Listener
      ...
      --- MBeans waiting for other MBeans ---
      ObjectName: portal:service=ListenerService,type=blog_listener
       State: FAILED
       Reason: java.lang.ClassNotFoundException: No ClassLoaders found for: com.wyniwyg.core.blog.portlet.ResourceListePortlet$Listener
       I Depend On:
       portal:service=ListenerRegistry
      
      --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
      ObjectName: portal:service=ListenerService,type=blog_listener
       State: FAILED
       Reason: java.lang.ClassNotFoundException: No ClassLoaders found for: com.wyniwyg.core.blog.portlet.ResourceListePortlet$Listener
       I Depend On:
       portal:service=ListenerRegistry
      



      The jboss-service.xml
      <mbean
       code="org.jboss.portal.core.event.PortalEventListenerServiceImpl"
       name="portal:service=ListenerService,type=blog_listener"
       xmbean-dd=""
       xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
       <xmbean/>
       <depends
       optional-attribute-name="Registry"
       proxy-type="attribute">portal:service=ListenerRegistry</depends>
       <attribute name="RegistryId">blog_listener</attribute>
       <attribute name="ListenerClassName">com.wyniwyg.core.blog.portlet.ResourceListePortlet$Listener</attribute>
       </mbean>
      


      The default-object.xml
      <deployments>
       <deployment>
       <if-exists>overwrite</if-exists>
       <parent-ref>default</parent-ref>
       <page>
       <page-name>Blog</page-name>
       <listener>blog_listener</listener>
       <properties/>
       <window>
       <window-name>BlogPortlet</window-name>
       <instance-ref>BlogPortletInstance</instance-ref>
       <region>center</region>
       <height>0</height>
       </window>
       <window>
       <window-name>AddResourcePortlet</window-name>
       <instance-ref>AddResourceInstance</instance-ref>
       <region>left</region>
       <height>0</height>
       </window>
       <window>
       <window-name>ResourceListePortlet</window-name>
       <instance-ref>ResourceListeInstance</instance-ref>
       <region>left</region>
       <height>1</height>
       </window>
       </page>
       </deployment>
      </deployments>
      


      The portlet.xml
      <portlet>
       <description>Portlet to add resource</description>
       <portlet-name>AddResourcePortlet</portlet-name>
       <display-name>AddResource</display-name>
       <portlet-class>com.wyniwyg.core.blog.portlet.AddResourcePortlet</portlet-class>
       <expiration-cache>0</expiration-cache>
       <supports>
       <mime-type>text/html</mime-type>
       <portlet-mode>VIEW</portlet-mode>
       </supports>
       <portlet-info>
       <title>Add a resource</title>
       <short-title>Add a resource</short-title>
       </portlet-info>
       </portlet>
       <portlet>
       <description>Portlet to view resource</description>
       <portlet-name>ResourceListePortlet</portlet-name>
       <display-name>ResourceListe</display-name>
       <portlet-class>com.wyniwyg.core.blog.portlet.ResourceListePortlet</portlet-class>
       <expiration-cache>0</expiration-cache>
       <supports>
       <mime-type>text/html</mime-type>
       <portlet-mode>VIEW</portlet-mode>
       </supports>
       <portlet-info>
       <title>Resource of the article</title>
       <short-title>Resource of the article</short-title>
       </portlet-info>
       </portlet>
      


      The portlet-instance.xml
      <deployment>
       <instance>
       <instance-id>AddResourceInstance</instance-id>
       <portlet-ref>AddResourcePortlet</portlet-ref>
       </instance>
       </deployment>
       <deployment>
       <instance>
       <instance-id>ResourceListeInstance</instance-id>
       <portlet-ref>ResourceListePortlet</portlet-ref>
       </instance>
       </deployment>
      


      Thinks for help

        • 1. Re: problem when deploying IPC portlet
          theute

          It cannot find you inner class Listener

          • 2. Re: problem when deploying IPC portlet

            What does it means ? because there is that in my ResourceListePortlet.java :

            public class ResourceListePortlet extends GenericPortlet {
            
             public void init(PortletConfig pConfig)throws PortletException{
             super.init(pConfig);
             }
            
             public void processAction(ActionRequest request,ActionResponse response)throws PortletException, PortletSecurityException, IOException{ String color = request.getParameter("color");
             String text = request.getParameter("sometext");
             if(color != null && text != null)
             {
             response.setRenderParameter("color", color);
             response.setRenderParameter("sometext", text);
             }
             }
            
             protected void doView(RenderRequest request,RenderResponse response)throws PortletException, PortletSecurityException, IOException{ String color = request.getParameter("color");
             String text = request.getParameter("sometext");
             response.setContentType("text/html");
             PrintWriter writer = response.getWriter();
             if(text != null)
             {
             writer.write("<div style=\"color:" + color + ";\">");
             writer.write(text);
             writer.write("</div>");
             }
             else
             {
             writer.write("Use the portlet on the left to affect behaviour in this portlet");
             }
            
             writer.close();
             }
            
             public static class Listener implements PortalNodeEventListener{
            
             public PortalNodeEvent onEvent(PortalNodeEventContext context, PortalNodeEvent event) {
             PortalNode node = event.getNode();
            
             // Get node name
             String nodeName = node.getName();
            
             // See if we need to create a new event or not
             WindowActionEvent newEvent = null;
             if(nodeName.equals("AddResourcePortlet") && event instanceof WindowActionEvent){
             WindowActionEvent wae = (WindowActionEvent)event;
             PortalNode me = node.resolve("../ResourceListePortlet");
             if(me != null){
             newEvent = new WindowActionEvent(me);
             newEvent.setMode(wae.getMode());
             newEvent.setParameters(wae.getParameters());
             }
             }
             if(newEvent != null){
             return newEvent;
             }else{
             return context.dispatch();
             }
             }
            
             }
            }
            


            I have juste copy and paste the HelloWolrdIPC with my own classes