You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrp4j-user@portals.apache.org by Schelling Bernhard <Be...@lemon42.com> on 2004/12/17 11:12:00 UTC

WSRPTestPortlet error -- Newbie Question

Hi,

Maybe someone can point me in the right direction...

I'v got the swing consumer up and running, but would
like to show a wsrp portlet in the portal using tomcat5

http://localhost:8080/wsrptest/WSRPTestPortlet 

returns

javax.servlet.ServletException: Servlet.init() for servlet
WSRPTestPortlet threw exception
	
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:164)
	
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
	
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:83
3)
	
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onnection(Http11Protocol.java:732)
	
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:61
9)
	
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:688)
	java.lang.Thread.run(Thread.java:534)

thanks for hints
regards
bernhard

Re: WSRPTestPortlet error -- Newbie Question

Posted by Diego Louzán <di...@metalicana.org>.
     I think you are running incorrectly the examples. If you use the 
SwingConsumer, you do not access the portlets of the producer through a 
browser, but only with the swing interface. If you want to use a consumer 
portal (accessible through a browser) to use the wsrp portlets exposed by the 
producer, you have to deploy the ProxyPortlet portlet bundled with wsrp4j into 
the consumer portal and configure the access to the portlets you are going to 
consume.
     There is another thread in this list in which it's explained how to set up 
Pluto Portal to consume WSRP4J Producer portlets. I've attached it below.

     If I'm wrong please be more specific on your error and environment.

Regards.
Diego.

--------------------------------------------------------------------------------

Diego, Matthew

Thanks for all your hints and advice - I finally have the proxyportlet
working. Here is what I did...

(a) In the Pluto Portlet Container I have edited the
portletentityregistry.xml for a single portlet:

<?xml version="1.0" encoding="UTF-8"?>
<portlet-entity-registry>
     <!-- wsrp4j wsrp proxy portlet -->
	<application id="98">
     	<definition-id>proxyportlet</definition-id>
     	<portlet id="1">
         	<definition-id>proxyportlet.ProxyPortlet</definition-id>
             <!-- portlet -->
         	<preferences>
             	<pref-name>wsrp_portlet_handle</pref-name>
             	<pref-value>99.1</pref-value>
             	<read-only>false</read-only>
	        </preferences>
             <!-- producer -->
     	    <preferences>
         	<pref-name>wsrp_producer_id</pref-name>
             	<pref-value>1</pref-value>
	        <read-only>false</read-only>
     	    </preferences>
	    </portlet>
	</application>
</portlet-entity-registry>

(b) I then edit the page registry pageregistry.xml for a single portlet too,
with a valid portlet application ID and valid portlet ID, so 98.1:

<?xml version="1.0" encoding="UTF-8"?>
<portal>
     <fragment name="navigation"
class="org.apache.pluto.portalImpl.aggregation.navigation.TabNavigation">
     </fragment>

     <fragment name="ProxyTest" type="page">
         <navigation>
             <title>ProxyTest</title>
             <description>This page contains wsrp4j
proxyportlets</description>
         </navigation>

         <fragment name="row1" type="row">
             <fragment name="col1" type="column">
                 <fragment name="p1" type="portlet">
                     <property name="portlet" value="98.1"/>
                 </fragment>
             </fragment>
         </fragment>
     </fragment>
</portal>

(c) I then edit the producer file with the seriously long file name for the
proxyportlet:

org.apache.wsrp4j.consumer.driver.ProducerImpl@wsrp4j-8081.xml

and change all the references to port 8081 to port 8080

I also make sure that the producer ID is the same as the one that I set in
the as the wsrp_producer_id preference, in my case this is "1":

<?xml version="1.0"?>
<Producer id="1">


<markup-interface-url>http://localhost:8080/wsrp/wsrp4j/WSRPBaseService</mar
kup-interface-url>

<service-description-interface-url>http://localhost:8080/wsrp/wsrp4j/WSRPSer
viceDescriptionService</service-description-interface-url>

<registration-interface-url>http://localhost:8080/wsrp/wsrp4j/WSRPRegistrati
onService</registration-interface-url>

<portlet-management-interface-url>http://localhost:8080/wsrp/wsrp4j/WSRPPort
letManagementService</portlet-management-interface-url>

     <registration-data>
         <consumer-name>WSRP4J Proxy Portlet</consumer-name>
         <consumer-agent>WSRP4J Proxy Portlet</consumer-agent>
     </registration-data>
</Producer>

(d) I then modify the portletentityregistry.xml file in the /wsrp webapp
under Tomcat/webapps to register a single portlet with the same references
that I set in wsrp_portlet_handle preference, in my case this is 99.1:

<?xml version="1.0" encoding="UTF-8"?>
<portlet-entity-registry>

     <application id="99">
         <definition-id>portlet1</definition-id>
         <portlet id="1">
             <definition-id>portlet1.Portlet1</definition-id>
         </portlet>
     </application>

</portlet-entity-registry>

(e) I then restart Tomcat and go to http://localhost:8080/pluto/portal. All
is working so far and I see a link to "proxyportlet"

(f) Hurray! The proxy portlet is working.

Thanks guys - your advice and experience has been very helpful indeed.

Wishing you every success in your projects.

Warwick R Bailey MRSC CChem

Icodeon Ltd
Studio 471
48 Regent Street
Cambridge CB2 1FD
England

e: warwick@icodeon.com
w: www.icodeon.com

Registered Company in England and Wales No: 5068195