6 Replies Latest reply on Jul 2, 2008 10:58 AM by terroene

    jboss-portletcontainer-2.0.0 with jbossas42 the art of resiz

    terroene

      Hello again,
      One problem solved, another problem found:

      What do I have to do to make a portlet resizable using the xportal-Taglib in jboss-portletcontainer-2.0.0??????????????????????????????????

      I already searched in the simple-portal sources, but I found nothing but the realization that it doesn't have to do with the portlet-code. Perhaps I missed a configuration file.

      If I click on a rezise-Button the following error occurs:

      09:15:56,910 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
      java.lang.NullPointerException
       at org.jboss.portal.portlet.portal.jsp.PagePortletControllerContext.getPortlet(PagePortl
      etControllerContext.java:112)
       at org.jboss.portal.portlet.controller.impl.AbstractPortletControllerContext.getPortletI
      nfo(AbstractPortletControllerContext.java:110)
       at org.jboss.portal.portlet.controller.impl.state.PortletPageNavigationalStateImpl.setPo
      rtletPublicNavigationalState(PortletPageNavigationalStateImpl.java:143)
       at org.jboss.portal.portlet.controller.PortletRequestHandler.updateNavigationalState(Por
      tletRequestHandler.java:406)
       at org.jboss.portal.portlet.controller.PortletRequestHandler.processResponse(PortletRequ
      estHandler.java:97)
       at org.jboss.portal.portlet.controller.PortletRequestHandler.processResponse(PortletRequ
      estHandler.java:58)
       at org.jboss.portal.portlet.controller.RequestHandler.handle(RequestHandler.java:66)
       at org.jboss.portal.portlet.controller.PortletController.process(PortletController.java:
      179)
       at org.jboss.portal.portlet.portal.jsp.ControllerFilter.doFilter(ControllerFilter.java:1
      29)
       at org.jboss.portal.portlet.portal.jsp.ControllerFilter.doFilter(ControllerFilter.java:9
      1)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterCha
      in.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
      206)
       at org.jboss.portal.portlet.portal.ErrorHandlingFilter.doFilter(ErrorHandlingFilter.java
      :61)
       at org.jboss.portal.portlet.portal.ErrorHandlingFilter.doFilter(ErrorHandlingFilter.java
      :53)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterCha
      in.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
      206)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterCha
      in.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
      206)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValv
      e.java:179)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
       at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.j
      ava:157)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protoco
      l.java:583)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
       at java.lang.Thread.run(Thread.java:595)
      
      



      Please help,
      best regards,
      rene

        • 1. Re: jboss-portletcontainer-2.0.0 with jbossas42 the art of r
          terroene

          One step forward:

          The exception occurs in this method of class PagePortletControllerContext

           protected Portlet getPortlet(String windowId) throws PortletInvokerException
           {
           WindowDef windowDef = prepareResponse.getWindowDef(windowId);
          
           //this crashes with a NullpointerException:
           return findPortlet(windowDef.getApplicationName(), windowDef.getPortletName());
           }
          
          //find portlets:
          public Portlet findPortlet(String applicationName, String portletName)
           {
           return portlets.get(new Key(applicationName, portletName));
           }
          
          


          How can I make an entry in the portlets-Map?????
          Either the application name or the portletName seems to be null.
          regards,
          rene


          • 2. Re: jboss-portletcontainer-2.0.0 with jbossas42 the art of r
            terroene

            Oh, I forgot:
            The Map is filled by this foreach-statement:

             Map<Key, Portlet> portlets = new HashMap<Key, Portlet>();
             for (Portlet portlet : invoker.getPortlets())
             {
             PortletInfo portletInfo = portlet.getInfo();
             String portletName = portletInfo.getName();
             String applicationName = portletInfo.getApplicationName();
             Key key = new Key(applicationName, portletName);
             portlets.put(key, portlet);
             }
            


            So I have to tell the invoker of type PortletInvoker to add my portlet/application, how can I do this?

            • 3. Re: jboss-portletcontainer-2.0.0 with jbossas42 the art of r
              theute

              If this:

              return findPortlet(windowDef.getApplicationName(), windowDef.getPortletName());
              

              fails with a NPE, it means that *windowDef* is null

              • 4. Re: jboss-portletcontainer-2.0.0 with jbossas42 the art of r
                terroene

                How can I provide a value for "windowDef"??????

                The jsps in the demo folder use the same markup like I do (my code):

                <%@ page contentType="text/html" %>
                <%@ page language="java" %>
                <%@ taglib prefix="xportal" tagdir="/WEB-INF/tags/portal" %>
                <%@ taglib uri="/WEB-INF/portal.tld" prefix="portal" %>
                <%@ page isELIgnored="false" %>
                
                
                <%@ include file="/layouts/header.jsp" %>
                <link rel="stylesheet" href="${pageContext.request.contextPath}/css/debugger.css" type="text/css"/>
                <script type="text/javascript" src="${pageContext.request.contextPath}/js/debugger.js"></script>
                <portal:page>
                 <xportal:1column>
                 <jsp:attribute name="leftcol">
                 <xportal:portlet name="Kundensuche" applicationName="PortletShell" id="Kundensuche"/>
                 </jsp:attribute>
                 </xportal:1column>
                </portal:page>
                <%@ include file="/layouts/footer.jsp" %>
                


                • 5. Re: jboss-portletcontainer-2.0.0 with jbossas42 the art of r
                  terroene

                  Sorry,but is this so difficult to answer?
                  Seems to me like a configuration problem,
                  please answer.

                  • 6. Re: jboss-portletcontainer-2.0.0 with jbossas42 the art of r
                    terroene

                    Problem solved:

                    The page containing my portlet is the welcome-page, so the page-name is not provided, e.g. "http://localhost:8080/MyApp".

                    Resizing works if you use "http://localhost:8080/MyApp/Pagename.jsp".