7 Replies Latest reply on Mar 7, 2006 4:03 PM by Vincenzo Segreto

    HelloWorldPortlet deploy problem

    Vincenzo Segreto Newbie

      I'm reading the JBoss Portel Reference Guide. I use JBoss Portal 2.2 + AP 4.0.3 sp1.
      I want to try the HelloWorldPortlet sample portlet shown on this guide at URL http://labs.jboss.com/file-access/default/members/portletswap/downloads/portlets/samples/HelloWorldPortlet.zip
      The guide talks about an .ear (helloworldportlet.ear) file that must be deployed into jboss portal server, and I should be able to access the new portal page by pointing mine browser to http://localhost:8080/portal/portal/default/HelloWorld, but after I've downloaded this zip archive, i didn't saw any file with that ear extension.
      Can someone help me please?

        • 1. Re: HelloWorldPortlet deploy problem
          mohan vj Newbie


          Hey Silico,
          You can find those corresponding files in src/resources folders of your zip file.

          • 2. Re: HelloWorldPortlet deploy problem
            Vincenzo Segreto Newbie

            Hi vjmohan, thank you for answer.
            I go on that directory, but i see only two folders named: helloworldportlet-ear, helloworldportlet-war. I think that i've to zip first folder and rename with ear extension, and then move zipped file into /server/default/deploy/ directory. Isn't Right?
            I've done this task, but it seems don't work...
            What's wrong?

            • 3. Re: HelloWorldPortlet deploy problem
              mohan vj Newbie

              Silico,
              No need to zip the file..just put the helloworldportler-ear file as it is in the deploy folder and try once.Or do like this simply put the helloworldportlet.war in the deploy folder and check.

              let me know which error you were getting exactly.....

              • 4. Re: HelloWorldPortlet deploy problem
                Vincenzo Segreto Newbie

                I copy helloworldportlet-ear directory structure to the deploy folder of jboss. I start the server, but at the 'http://localhost:8080/portal/portal/default/HelloWorld' uri i've received a 500 exception:

                type Exception report
                
                message
                
                description The server encountered an internal error () that prevented it from fulfilling this request.
                
                exception
                
                javax.servlet.ServletException
                 org.jboss.portal.server.servlet.PortalServlet.doGet(PortalServlet.java:214)
                 javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
                 javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
                 org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
                
                root cause
                
                java.lang.NullPointerException
                 org.jboss.portal.server.app.impl.AbstractRequestContext.include(AbstractRequestContext.java:234)
                 org.jboss.portal.server.aspects.component.ContextDispatcherInterceptor$1.include(ContextDispatcherInterceptor.java:60)
                 org.jboss.portal.server.servlet.CommandServlet.include(CommandServlet.java:68)
                 org.jboss.portal.server.aspects.component.ContextDispatcherInterceptor.invoke(ContextDispatcherInterceptor.java:66)
                 org.jboss.portal.server.app.ComponentInterceptor.invoke(ComponentInterceptor.java:25)
                 org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:117)
                 org.jboss.portal.portlet.aspects.component.SessionPreDispatchInterceptor.invoke(SessionPreDispatchInterceptor.java:97)
                 org.jboss.portal.server.app.ComponentInterceptor.invoke(ComponentInterceptor.java:25)
                 org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:117)
                 org.jboss.portal.server.aspects.component.ContextTrackerInterceptor.invoke(ContextTrackerInterceptor.java:36)
                 org.jboss.portal.server.app.ComponentInterceptor.invoke(ComponentInterceptor.java:25)
                 org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:117)
                 org.jboss.portal.portlet.aspects.component.SecureTransportInterceptor.invoke(SecureTransportInterceptor.java:56)
                 org.jboss.portal.server.app.ComponentInterceptor.invoke(ComponentInterceptor.java:25)
                 org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:117)
                 org.jboss.portal.portlet.aspects.component.ValveInterceptor.invoke(ValveInterceptor.java:51)
                 org.jboss.portal.server.app.ComponentInterceptor.invoke(ComponentInterceptor.java:25)
                 org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:117)
                 org.jboss.portal.server.invocation.Invocation.invoke(Invocation.java:162)
                 org.jboss.portal.core.command.RenderWindowCommand.execute(RenderWindowCommand.java:71)
                 org.jboss.portal.core.command.ControllerCommand.dispatch(ControllerCommand.java:65)
                 org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:127)
                 org.jboss.portal.core.aspects.controller.EventBroadcasterInterceptor.invoke(EventBroadcasterInterceptor.java:72)
                 org.jboss.portal.core.command.CommandInterceptor.invoke(CommandInterceptor.java:25)
                 org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:117)
                 org.jboss.portal.core.aspects.controller.PolicyEnforcementInterceptor.invoke(PolicyEnforcementInterceptor.java:156)
                 org.jboss.portal.core.command.CommandInterceptor.invoke(CommandInterceptor.java:25)
                 org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:117)
                 org.jboss.portal.core.aspects.controller.PortalNodeInterceptor.invoke(PortalNodeInterceptor.java:48)
                 org.jboss.portal.core.command.CommandInterceptor.invoke(CommandInterceptor.java:25)
                 org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:117)
                 org.jboss.portal.core.aspects.controller.NavigationInterceptor.invoke(NavigationInterceptor.java:55)
                 org.jboss.portal.core.command.CommandInterceptor.invoke(CommandInterceptor.java:25)
                 org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:117)
                 org.jboss.portal.server.invocation.Invocation.invoke(Invocation.java:162)
                 org.jboss.portal.core.command.CommandContext.execute(CommandContext.java:94)
                 org.jboss.portal.core.command.CommandContext.chain(CommandContext.java:128)
                 org.jboss.portal.core.command.RenderPageCommand.renderPortlets(RenderPageCommand.java:218)
                 org.jboss.portal.core.command.RenderPageCommand.execute(RenderPageCommand.java:151)
                 org.jboss.portal.core.command.ControllerCommand.dispatch(ControllerCommand.java:65)
                 org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:127)
                 org.jboss.portal.core.aspects.controller.EventBroadcasterInterceptor.invoke(EventBroadcasterInterceptor.java:72)
                 org.jboss.portal.core.command.CommandInterceptor.invoke(CommandInterceptor.java:25)
                 org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:117)
                 org.jboss.portal.core.aspects.controller.PolicyEnforcementInterceptor.invoke(PolicyEnforcementInterceptor.java:156)
                 org.jboss.portal.core.command.CommandInterceptor.invoke(CommandInterceptor.java:25)
                 org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:117)
                 org.jboss.portal.core.aspects.controller.PortalNodeInterceptor.invoke(PortalNodeInterceptor.java:48)
                 org.jboss.portal.core.command.CommandInterceptor.invoke(CommandInterceptor.java:25)
                 org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:117)
                 org.jboss.portal.core.aspects.controller.NavigationInterceptor.invoke(NavigationInterceptor.java:45)
                 org.jboss.portal.core.command.CommandInterceptor.invoke(CommandInterceptor.java:25)
                 org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:117)
                 org.jboss.portal.server.invocation.Invocation.invoke(Invocation.java:162)
                 org.jboss.portal.core.command.CommandContext.execute(CommandContext.java:94)
                 org.jboss.portal.core.command.ExecutionContext.execute(ExecutionContext.java:80)
                 org.jboss.portal.core.command.ExecutionContext.execute(ExecutionContext.java:64)
                 org.jboss.portal.core.CoreController.handle(CoreController.java:177)
                 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 java.lang.reflect.Method.invoke(Method.java:585)
                 org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                 org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                 org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
                 org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                 org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
                 org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                 org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
                 org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
                 org.jboss.mx.util.JMXInvocationHandler.invoke(JMXInvocationHandler.java:273)
                 $Proxy133.handle(Unknown Source)
                 org.jboss.portal.server.ServerInvocation.dispatch(ServerInvocation.java:63)
                 org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:127)
                 org.jboss.portal.core.aspects.server.SubjectAssociationInterceptor.invoke(SubjectAssociationInterceptor.java:35)
                 org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:25)
                 org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:117)
                 org.jboss.portal.core.aspects.server.PolicyAssociationInterceptor.invoke(PolicyAssociationInterceptor.java:40)
                 org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:25)
                 org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:117)
                 org.jboss.portal.server.aspects.server.ContentTypeInterceptor.invoke(ContentTypeInterceptor.java:55)
                 org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:25)
                 org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:117)
                 org.jboss.portal.core.aspects.server.LocaleInterceptor.invoke(LocaleInterceptor.java:56)
                 org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:25)
                 org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:117)
                 org.jboss.portal.core.aspects.server.UserInterceptor.invoke(UserInterceptor.java:171)
                 org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:25)
                 org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:117)
                 org.jboss.portal.server.aspects.server.SessionInvalidatorInterceptor.invoke(SessionInvalidatorInterceptor.java:74)
                 org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:25)
                 org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:117)
                 org.jboss.portal.core.aspects.server.TransactionInterceptor.invoke(TransactionInterceptor.java:62)
                 org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:25)
                 org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:117)
                 org.jboss.portal.server.invocation.Invocation.invoke(Invocation.java:162)
                 org.jboss.portal.server.servlet.PortalServlet.doGet(PortalServlet.java:208)
                 javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
                 javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
                 org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
                

                Then I've removed helloworldportlet-ear from JBoss deploy directory, and copy the file helloworldportlet.war (from /src/resources/helloworldportlet-ear/).
                I've restarted the server, try that uri, and now no more 500 exception happened... but only a blank jboss page... no portlet.... :-\
                [url=http://img158.imageshack.us/my.php?image=helloworldportlet5nu.jpg][img=http://img158.imageshack.us/img158/2725/helloworldportlet5nu.th.jpg][/url]
                I don't know where could be the problem... maybe about servlet container or something like that... Or some wrong deploying?


                • 5. Re: HelloWorldPortlet deploy problem
                  mohan vj Newbie

                  Hey
                  i am using jboss 2.2 bundled version.I can able run the example with out any errors

                  • 6. Re: HelloWorldPortlet deploy problem
                    Thomas Heute Master

                    Recompile the example with ant.
                    Copy the output/lib/helloworldportlet.ear file into your deploy directory.

                    • 7. Re: HelloWorldPortlet deploy problem
                      Vincenzo Segreto Newbie

                      Thanks thomas.heute... now the portlet is working...

                      I download last ant binaries
                      unzipped
                      Set the path environment variable
                      and execute ant in the command com...

                      but why i had to compile first with ant, when vjmohan used the example directly without ant?