12 Replies Latest reply on Jan 15, 2007 4:47 AM by Gajanana

    Helloworld IPC Problem

    mohan vj Newbie

      Hi All,
      I have downloade HelloworldIPC example.While the deployment of hellowroldipc.sar,I am getting the follwoing exception.Can anyone help on this?

      Thanks in advance...

      #################
      java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.portlet.hello.HelloWorldPortletB$Listener
      at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:198)
      at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:475)
      at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:377)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at org.jboss.portal.core.event.PortalEventListenerServiceImpl.startService(PortalEventListenerServiceImpl.jav
      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:73)
      at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:960)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:428)
      at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)

        • 1. Re: Helloworld IPC Problem
          Saurabh Sharma Newbie

          The example contains a build.xml. First use ant tool on that folder.
          /helloworldportletfolder\>ant
          If the example is already exploded one. check in /.../resouces/ you will find the classes HelloWorldPortletA, HelloWorldPortletB and HelloWorld$Listener class. (search them). put them in correct heirarchy as classes/org/jboss/portlet/hello/*.class

          Like yourwarfile/WEB-INF/classes/org/jboss/portlet/hello/*.class

          You can rebuild the .war file or just find the .war file in the example given on JBOSS. it contains the classes in a jar file. so you may not put them manually in the heirarchy as i have shown. Either one is same.

          Or you may also find an EAR (.ear) file. You may deploy that too. If you wish to create it , you will have to write an application.xml which will be specifying the name of your .war file.

          • 2. Re: Helloworld IPC Problem
            Saurabh Sharma Newbie

            Hey mohan, sorry i saw that again. the classes are in 'output' folder. You will find .jars in resources. Since the class is defined as package, you will have to put them in the same heirarchy.

            • 3. Re: Helloworld IPC Problem
              mohan vj Newbie

              Hi Sau,
              Yeh i can able to trace out the resource folder.
              There I found helloworldipcportlet-sar and helloworldipcportlet-war.While I was trying to deploy the sar file I am getting that exception i mentioned.

              If i put the class files in web-inf folder of war file and deploy that war file
              with out any exception,but in run time I was unable to get the functionality
              what expected.

              Plz try to help me in this regard.

              Thanks in advance.


              • 4. Re: Helloworld IPC Problem
                Saurabh Sharma Newbie

                did you remade the war file using jar cvf?
                or did you renamed the folder as helloworldipcportlet.war?

                in latter case the manifest might not be added. Rebuild the war. Its working fine :)

                • 5. Re: Helloworld IPC Problem
                  mohan vj Newbie

                  Hi Sau,
                  If i deploy the jar file and try to run..The following exception i am getting

                  ######
                  16:20:39,905 ERROR [InvokeWindowActionCommand] An portlet exception occured in portlet helloworldipc.HelloWorldPortletA
                  javax.portlet.PortletException: Nothing to invoke
                  at org.jboss.portlet.JBossPortlet.doDispatch(JBossPortlet.java:173)
                  at org.jboss.portlet.JBossPortlet.processAction(JBossPortlet.java:96)
                  at org.jboss.portlet.JBossPortlet.processAction(JBossPortlet.java:342)
                  at org.jboss.portal.portlet.PortletContainer.invokeAction(PortletContainer.java:470)
                  at org.jboss.portal.portlet.PortletContainer.dispatch(PortletContainer.java:411)
                  at org.jboss.portal.server.app.ComponentInvocation.dispatch(ComponentInvocation.java:66)
                  at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:127)
                  at org.jboss.portal.core.aspects.component.TransactionInterceptor.invoke(TransactionInterceptor.java:59)
                  at org.jboss.portal.server.app.ComponentInterceptor.invoke(ComponentInterceptor.java:25)
                  at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:117)
                  at org.jboss.portal.core.aspects.component.HeaderInterceptor.invoke(HeaderInterceptor.java:37)
                  at org.jboss.portal.server.app.ComponentInterceptor.invoke(ComponentInterceptor.java:25)
                  at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:117)
                  at org.jboss.portal.server.aspects.component.NavigationInterceptor.invoke(NavigationInterceptor.java:63)
                  at org.jboss.portal.server.app.ComponentInterceptor.invoke(ComponentInterceptor.java:25)
                  at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:117)
                  at org.jboss.portal.server.aspects.component.CacheInterceptor.invoke(CacheInterceptor.java:154)
                  at org.jboss.portal.server.app.ComponentInterceptor.invoke(ComponentInterceptor.java:25)
                  at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:117)
                  at org.jboss.portal.server.aspects.component.ModesInterceptor.invoke(ModesInterceptor.java:38)
                  at org.jboss.portal.server.app.ComponentInterceptor.invoke(ComponentInterceptor.java:25)
                  at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:117)
                  at org.jboss.portal.server.aspects.component.WindowStatesInterceptor.invoke(WindowStatesInterceptor.java:32)
                  at org.jboss.portal.server.app.ComponentInterceptor.invoke(ComponentInterceptor.java:25)
                  at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:117)
                  at org.jboss.portal.bridge.BridgeInterceptor.invoke(BridgeInterceptor.java:36)
                  at org.jboss.portal.server.app.ComponentInterceptor.invoke(ComponentInterceptor.java:25)
                  at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:117)
                  at org.jboss.portal.portlet.aspects.component.SessionPostDispatchInterceptor.invoke(SessionPostDispatchIntercep
                  at org.jboss.portal.server.app.ComponentInterceptor.invoke(ComponentInterceptor.java:25)
                  at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:117)
                  at org.jboss.portal.server.aspects.component.ContextDispatcherInterceptor$InvokeNextCommand.execute(ContextDisp
                  at sun.reflect.GeneratedMethodAccessor138.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                  at java.lang.reflect.Method.invoke(Unknown Source)
                  at org.jboss.portal.server.servlet.CommandServlet.doGet(CommandServlet.java:88)
                  at org.jboss.portal.server.servlet.CommandServlet.doPost(CommandServlet.java:136)
                  at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                  at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                  at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
                  at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:539)
                  at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
                  at org.jboss.portal.server.app.impl.AbstractRequestContext.include(AbstractRequestContext.java:234)
                  at org.jboss.portal.server.aspects.component.ContextDispatcherInterceptor$1.include(ContextDispatcherIntercepto
                  at org.jboss.portal.server.servlet.CommandServlet.include(CommandServlet.java:68)
                  at org.jboss.portal.server.aspects.component.ContextDispatcherInterceptor.invoke(ContextDispatcherInterceptor.j
                  at org.jboss.portal.server.app.ComponentInterceptor.invoke(ComponentInterceptor.java:25)
                  at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:117)
                  at org.jboss.portal.portlet.aspects.component.SessionPreDispatchInterceptor.invoke(SessionPreDispatchIntercepto
                  at org.jboss.portal.server.app.ComponentInterceptor.invoke(ComponentInterceptor.java:25)
                  at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:117)
                  at org.jboss.portal.server.aspects.component.ContextTrackerInterceptor.invoke(ContextTrackerInterceptor.java:36
                  at org.jboss.portal.server.app.ComponentInterceptor.invoke(ComponentInterceptor.java:25)
                  at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:117)
                  at org.jboss.portal.portlet.aspects.component.SecureTransportInterceptor.invoke(SecureTransportInterceptor.java
                  at org.jboss.portal.server.app.ComponentInterceptor.invoke(ComponentInterceptor.java:25)
                  at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:117)
                  at org.jboss.portal.portlet.aspects.component.ValveInterceptor.invoke(ValveInterceptor.java:51)
                  at org.jboss.portal.server.app.ComponentInterceptor.invoke(ComponentInterceptor.java:25)
                  at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:117)
                  at org.jboss.portal.server.invocation.Invocation.invoke(Invocation.java:162)
                  at org.jboss.portal.core.command.InvokeWindowActionCommand.execute(InvokeWindowActionCommand.java:131)
                  at org.jboss.portal.core.command.ControllerCommand.dispatch(ControllerCommand.java:65)
                  at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:127)
                  at org.jboss.portal.core.aspects.controller.EventBroadcasterInterceptor.invoke(EventBroadcasterInterceptor.java
                  at org.jboss.portal.core.command.CommandInterceptor.invoke(CommandInterceptor.java:25)
                  at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:117)
                  at org.jboss.portal.core.aspects.controller.PolicyEnforcementInterceptor.invoke(PolicyEnforcementInterceptor.ja
                  at org.jboss.portal.core.command.CommandInterceptor.invoke(CommandInterceptor.java:25)
                  at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:117)
                  at org.jboss.portal.core.aspects.controller.PortalNodeInterceptor.invoke(PortalNodeInterceptor.java:48)
                  at org.jboss.portal.core.command.CommandInterceptor.invoke(CommandInterceptor.java:25)

                  • 6. Re: Helloworld IPC Problem
                    Saurabh Sharma Newbie

                    not jar, just make a .war file ! (Atleast I am sot saying to make an EAR, you will have to write a simple application.xml too)
                    Ok do this

                    1. create a new heirarchy ..say test/WEB-INF/classes/..../*.class

                    2. put all XMLs in test/WEB-INF/
                    3. Make sure you put classes in correct heirarchy.
                    4. go to command prompt test\>jar cvf ptest.war .

                    adding manifest .. (somthing like this will be shown)
                    Thats manifest which holds class version info.

                    Now u have ptest.war in test/

                    drop this war file in deploy folder.

                    If u get initialization exeptions, then its possible that the portlet example has either no init() method or may be that the constructor is not defined.
                    ( But thats not in the case of example provided by jboss) Its working damm fine here.

                    Check all systematically. Also check the version of java you are using.

                    • 7. Re: Helloworld IPC Problem
                      Roy Russo Master

                      What version of Portal are you using, that it does not work in?

                      • 8. Re: Helloworld IPC Problem
                        mohan vj Newbie

                        Hi,
                        Yeh I have tried with war file only but its not wotking here.
                        The portlet version i am using here is "jboss-portal-2.2.0-bundled" and Jdk
                        version is 1.4.2.

                        • 9. Re: Helloworld IPC Problem
                          Veena P Newbie

                          I am facing the same problem in HelloworldIPC portlet. Was trying to test how inter portlet communication works. I have made a war file using build.xml with ant tool. Initially it contained only the xml files. The classe files are added to this war file with the package structure. Then deployed the same. It shows the IPC tab and upon clicking it shows the PortletA and PortletB. Upon giving some data and submitting it throws an error in console. The error is

                          An portlet exception occured in portlet helloworldipc.HelloWorldPortletA
                          javax.portlet.PortletException: Nothing to invoke
                          at org.jboss.portlet.JBossPortlet.doDispatch(JBossPortlet.java:173)
                          at org.jboss.portlet.JBossPortlet.processAction(JBossPortlet.java:96)
                          at org.jboss.portlet.JBossPortlet.processAction(JBossPortlet.java:342)
                          at org.jboss.portal.portlet.PortletContainer.invokeAction(PortletContainer.java:470)

                          I tried creating war file using jar cvf command also. In both the cases it throws the same error.

                          jdk 1.5 and jboss-portal-2.2.1 are used.


                          Could anyone please send the .war file of the HelloworldIPC portlet example which works fine.
                          Or atleast list down what all xml files and other files (with the package structutre) which should be there in .war file ?

                          • 10. Re: Helloworld IPC Problem
                            joe_the_quick Newbie

                            hi there,

                            There is a HelloWorldIPC-sample available which works immediately for Jboss Portal 2.4.0, but is mentioned only starting with the 2.6DR-reference documentation.

                            Please look this up for a solution for Jboss Portal-2.4.0 and 2.6DR and bug hints for 2.2.1SP3:

                            http://jboss.org/index.html?module=bb&op=viewtopic&p=3990790#3990790

                            best regards,
                            johannes

                            • 11. Re: Helloworld IPC Problem
                              joe_the_quick Newbie

                              hi there,

                              There is also an easy way to get the HelloWorldIPC sample for Jboss Portal 2.2.0 with Jboss Portal 2.2.1SP3:

                              Simply download the sample file for Jboss-Portal 2.2.0:
                              http://labs.jboss.com/file-access/default/members/portletswap/downloads/portlets/samples/HelloWorldIPC.zip

                              and then replace the portlet-related libraries in the lib-directory (portlet*.jar, portal*.jar) with the libraries of jboss-portal-2.2.1-SP3-bundled\server\default\deploy\jboss-portal.sar\lib\.
                              run ant clean / ant and then it works like a charm.

                              regards,
                              johannes

                              • 12. Re: Helloworld IPC Problem
                                Gajanana Newbie

                                Hey,

                                I am getting the same error too.. I am using the jboss-portal2.4.0 bundled version. I have put the jboss-service.xml file in META-INF Folder.

                                I have checked the listener in my object file too. It is the same.

                                Can u please help me.

                                Thanks in Advance...