Re: Pluto Spring Portlet Sample

Craig Doremus <[email protected]>
Newsgroups gmane.comp.jakarta.pluto.user
Message-ID <[email protected]>
Matthew:

The war file in pluto-spring-portlet-sample.zip  contains a 
preconfigured web.xml file for deployment to Pluto, so you should not 
use the admin interface to deploy it. Instead, drop the war file in the 
webapps directory and make the following changes to files in 
webapps/pluto/WEB-INF/data:

1. Add this record to pagecontexts.txt:
/spring-portlet-sample

2. Add this record to portletentityregistry.xml (This assumes that app 
id of 8 is unique):
    <application id="8">
        <definition-id>spring-portlet-sample</definition-id>
        <portlet id="0">
            <definition-id>spring-portlet-sample.mode</definition-id>
        </portlet>
        <portlet id="1">
            
<definition-id>pluto-spring-portlet-sample.exceptions</definition-id>
        </portlet>
        <portlet id="2">
            <definition-id>pluto-spring-portlet-sample.books</definition-id>
        </portlet>
        <portlet id="3">
            <definition-id>spring-portlet-sample.redirect</definition-id>
        </portlet>
        <portlet id="4">
            <definition-id>spring-portlet-sample.helloworld</definition-id>
        </portlet>
    </application>

3. Add this record to pageregistry.xml (change the value 8 if you needed 
to change in portletentotyregistry.xml)
    <fragment name="spring-portlet-sample" type="page" >
        <navigation>
            <title>Spring Portlet Sample</title>
            <description></description>
        </navigation>
          <fragment name="row1" type="row">
             <fragment name="col1" type="column">
                  <fragment name="p1" type="portlet">
                    <property name="portlet" value="8.0"/>
                  </fragment>
                <fragment name="p2" type="portlet">
                    <property name="portlet" value="8.1"/>
                </fragment>
             </fragment><!-- end of col frag -->
         </fragment><!-- end of row frag -->
          <fragment name="row2" type="row">
             <fragment name="col1" type="column">
                  <fragment name="p1" type="portlet">
                    <property name="portlet" value="8.2"/>
                  </fragment>
                <fragment name="p2" type="portlet">
                    <property name="portlet" value="8.3"/>
                </fragment>
             </fragment><!-- end of col frag -->
         </fragment><!-- end of row frag -->
          <fragment name="row3" type="row">
             <fragment name="col1" type="column">
                  <fragment name="p1" type="portlet">
                    <property name="portlet" value="8.4"/>
                  </fragment>
             </fragment><!-- end of col frag -->
         </fragment><!-- end of row frag -->
    </fragment><!-- end of 'page' frag -->


>Hi all,
>
>Has anyone been able to successfully deploy the 'Pluto Spring Portlet
>Sample'?
>
>http://opensource2.atlassian.com/confluence/spring/display/JSR168/Home
>
>I'm using Pluto 1.0.1 with Tomcat 5.5 Bundle & JDK 1.5.
>
>I upload the WAR file, get a message that there are 5 Portlets, I choose 1
>Column - 5 Rows and I get the following error;
>
>----------------------------------------------------------------------------
>-------------------
>
>
>14/12/2005 09:55:47 org.apache.catalina.core.ApplicationContext log
>SEVERE: ServiceManager: An unidentified error occurred
>javax.servlet.UnavailableException: The portlet.xml could not be found in
>context Spring Portlet MVC Sample Application (/spring-portlet-sample)
>	at
>org.apache.pluto.portalImpl.services.portletdefinitionregistry.PortletDefini
>tionRegistryServiceContextImpl.loadApplicationDefinition(PortletDefinitionRe
>gistryServiceContextImpl.java:154)
>	at
>org.apache.pluto.portalImpl.services.portletdefinitionregistry.PortletDefini
>tionRegistryServiceContextImpl.init(PortletDefinitionRegistryServiceContextI
>mpl.java:93)
>	at
>org.apache.pluto.portalImpl.services.ServiceManager.hotInit(ServiceManager.j
>ava:493)
>	at
>org.apache.pluto.portalImpl.services.ServiceManager.hotInit(ServiceManager.j
>ava:407)
>	at org.apache.pluto.portalImpl.Servlet.doGet(Servlet.java:192)
>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>	at
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
>FilterChain.java:252)
>	at
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
>ain.java:173)
>	at
>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
>va:213)
>	at
>org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
>va:178)
>	at
>org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
>.java:407)
>	at
>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126
>)
>	at
>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105
>)
>	at
>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
>:107)
>	at
>org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>	at
>org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
>	at
>org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
>ction(Http11Protocol.java:744)
>	at
>org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
>a:527)
>	at
>org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWo
>rkerThread.java:80)
>	at
>org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
>a:684)
>	at java.lang.Thread.run(Thread.java:595)
>14/12/2005 09:55:47 org.apache.pluto.portalImpl.services.log.LoggerImpl
>error
>SEVERE: Initialization of PortletDefinitionRegistryService service for hot
>deployment failed!
>java.lang.Exception: ServiceManager: Services initialized (0/1 successful).
>	at
>org.apache.pluto.portalImpl.services.ServiceManager.hotInit(ServiceManager.j
>ava:540)
>	at
>org.apache.pluto.portalImpl.services.ServiceManager.hotInit(ServiceManager.j
>ava:407)
>	at org.apache.pluto.portalImpl.Servlet.doGet(Servlet.java:192)
>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>	at
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
>FilterChain.java:252)
>	at
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
>ain.java:173)
>	at
>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
>va:213)
>	at
>org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
>va:178)
>	at
>org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
>.java:407)
>	at
>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126
>)
>	at
>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105
>)
>	at
>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
>:107)
>	at
>org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>	at
>org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
>	at
>org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
>ction(Http11Protocol.java:744)
>	at
>org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
>a:527)
>	at
>org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWo
>rkerThread.java:80)
>	at
>org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
>a:684)
>	at java.lang.Thread.run(Thread.java:595)
>
>----------------------------------------------------------------------------
>-------------------
>
>
>Obviously you would expect that 'portlet.xml' not being found would be a
>problem. However, when I deploy the WAR file the portlet.xml is exactly
>where it should be, under WEB-INF, and this error .. should not occur.
>
>Any ideas from anyone?
>
>
>Matthew
>
>
>*~~~****DISCLAIMER****~~~*
>This e-mail may contain confidential information. If you are not the intended recipient, please notify the sender immediately and delete this e-mail from your system. You must not disclose this email to anyone without express permission from the sender. The contents of all emails sent to, and received from, Optus may be scanned, stored, or disclosed to others by Optus at Optus' discretion. Optus has exercised care to avoid errors in the information contained in this e-mail but does not warrant that the information is error or omission free. 
>
>
>  
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.