5 Replies Latest reply on Sep 27, 2006 3:53 PM by Jeremy Truax

    Deploying HelloWorld IPC in 2.2 (currently it's configed for

    Jeremy Truax Newbie

      So I have JBoss AS 4.03 SP1 and JBoss Portal 2.2.1 setup and I've been trying to get the Hello World portlet to deploy.

      In Portletswap it says that it is preconfigured for JBoss Portal 2.4....and I'm running into errors that seem to indicate I need to change something to make it work in 2.2 (like ClassNotFoundExceptions about org.jboss.portal.common.system.JBossServiceModelMBean because it doesn't exist in 2.2.1).

      So what do I need to do exactly to reconfigure/compile the portlet for 2.2?

      Help would be appreciated, thanks.

        • 1. Re: Deploying HelloWorld IPC in 2.2 (currently it's configed
          Jeremy Truax Newbie

          Sorry, HelloWorldIPC portlet, not regular Hello World.

          • 2. Re: Deploying HelloWorld IPC in 2.2 (configed for 2.4)
            Jeremy Truax Newbie

            Anyone?

            I checked SVN but only seems to be a 2.4 version of the IPC portlet. No 2.2. I don't see any options in the build file to make a 2.2 version either.

            The error I'm getting is: (bottom of stack trace)

            16:35:10,577 WARN [ServiceController] Problem starting service portal:service=ListenerService,type=ipc_listener
            java.lang.ClassCastException: org.jboss.portlet.hello.HelloWorldPortletB$Listener
             at org.jboss.portal.core.event.PortalEventListenerServiceImpl.startService(PortalEventListenerServiceImpl.java:101) at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
             at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:181)
             at org.jboss.portal.common.system.AbstractJBossService.start(AbstractJBossService.java:86)
             at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            


            Then at the end of the console file:

            16:39:41,281 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
            
            --- MBeans waiting for other MBeans ---
            ObjectName: portal:service=ListenerService,type=ipc_listener
             State: FAILED
             Reason: java.lang.ClassCastException: org.jboss.portlet.hello.HelloWorldPortletB$Listener
             I Depend On:
             portal:service=ListenerRegistry
            
            --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
            ObjectName: portal:service=ListenerService,type=ipc_listener
             State: FAILED
             Reason: java.lang.ClassCastException: org.jboss.portlet.hello.HelloWorldPortletB$Listener
             I Depend On:
             portal:service=ListenerRegistry
            




            • 3. Re: Deploying HelloWorld IPC in 2.2 (currently it's configed
              Jeremy Truax Newbie

              I think I've seen this type of thing before and it was a problem with having duplicate jars across separate deployed wars/sars.

              Taking this into account, I tried removing some or all of the jar files included in the ICP sar deployment and rebuilt but it threw different errors like it needed those.

              Any help at all would be appreciated, thx.

              • 4. Re: Deploying HelloWorld IPC in 2.2 (currently it's configed
                Jeremy Truax Newbie

                FIXED.

                I was able to google for this portlet and find an older version of it that deployed just fine in JBoss Portal 2.2 but then it didn't quite work right, throwing errors about not recognizing getParameters as a valid function from WindowActionEvent.

                What I figured out is that the jars it was packaging were older than the 2.2.1 I am using so I found the 2.2.1 jars and rebuilt and bam worked like a charm.

                • 5. Re: Deploying HelloWorld IPC in 2.2 (currently it's configed
                  Jeremy Truax Newbie

                  NOTE: In the version of the example portlet that I found, I looked thru the jboss-service.xml and it had parts for each version of the Portal (2.2 vs. 2.4).

                  The newest example up on portletswap does not have this =/

                  But basically it is the following:

                  <server>
                   <!-- For 2.4
                   <mbean code="org.jboss.portal.core.event.PortalEventListenerServiceImpl"
                   name="portal:service=ListenerService,type=ipc_listener"
                   xmbean-dd=""
                   xmbean-code="org.jboss.portal.common.system.JBossServiceModelMBean">
                   <depends optional-attribute-name="Registry" proxy-type="attribute">portal:service=ListenerRegistry</depends>
                   <xmbean/>
                   <attribute name="RegistryId">ipc_listener</attribute>
                   <attribute name="ListenerClassName">org.jboss.portlet.hello.HelloWorldPortletB$Listener</attribute>
                   </mbean>
                   -->
                   <!-- Portal 2.2 -->
                   <mbean
                   code="org.jboss.portal.core.event.PortalEventListenerServiceImpl"
                   name="portal:service=ListenerService,type=ipc_listener"
                   xmbean-dd="org/jboss/portal/core/event/PortalEventListenerServiceImpl.xml">
                   <depends optional-attribute-name="Registry" proxy-type="attribute">portal:service=ListenerRegistry</depends>
                   <attribute name="RegistryId">ipc_listener</attribute>
                   <attribute name="ListenerClassName">org.jboss.portlet.hello.HelloWorldPortletB$Listener</attribute>
                   </mbean>
                  </server>