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 stephen chi zhang <sc...@viator.com> on 2004/02/04 23:49:27 UTC
wsrp-portlet-handle vs, wsrp-parent-handle in portletentityregistry.xml
I am testing wsrp4j on two different machines through proxyportlet on
browsers(forget swing consumer for a while), and I have found that after
each time the producer returns markups to the consumer, the producer
also alters the portletentityregistry.xml sitting on client-side
proxyportlet/WEB-INF/data. What the producer does is to replace the
value of wrsp-portlet-handle with a long ip address thing, and assign
the original value of that wsrp-portlet-handle to a new element called
wsrp-parent-handle. To clarify what i am saying here , i have attached
the relevant portion of the portletentityregistry.xml at below,
what it was before:
<preferences>
<pref-name>wsrp_portlet_handle</pref-name>
<pref-value>0.1</pref-value>
<read-only>false</read-only>
</preferences>
<preferences>
<pref-name>wsrp_producer_id</pref-name>
<pref-value>1</pref-value>
<read-only>false</read-only>
</preferences>
what it is after:
<preferences>
<pref-name>wsrp_parent_handle</pref-name>
<pref-value>0.1</pref-value>
<read-only>false</read-only>
</preferences>
<preferences>
<pref-name>wsrp_portlet_handle</pref-name>
<pref-value>0.192.168.0.10_1075875766403_0</pref-value>
<read-only>false</read-only>
</preferences>
<preferences>
<pref-name>wsrp_producer_id</pref-name>
<pref-value>1</pref-value>
<read-only>false</read-only>
</preferences>
This automatical alternation has caused some problem when I move wsrp4j
stuff onto resin instead of staying at tomcat. Resin failed to return
any content to my consumer until I changed that long IP string back to
0.1 and delete parent-handle. However, this was not a problem when I
remain in tomcat.
Any comment is appreciated, cheers in advance.
--
www.viator.com
Re: Exception while using proxyPortlet!
Posted by Peter Fischer <pf...@apache.org>.
Mandeep,
the Proxy Portlet is a JSR168 portlet and the corresponding .war file
contains a portlet and not a regular servlet.
So you cannot invoke the portlet like a servlet by sending a request to the
URL you mentioned below.
You will have to deploy the portlet in a portlet container and add the
portlet to page to invoke it.
Regards, Peter
----- Original Message -----
From: "Mandeep Singh" <ms...@firstrain.com>
To: <ws...@ws.apache.org>
Sent: Monday, February 16, 2004 3:00 PM
Subject: Exception while using proxyPortlet!
> Hi Richard,
>
> My setup consists of tomcat-4.1.29 & wsrp4j.
> I have followed the steps mentioned in portlets/proxyportlet/README.txt
for
> setting up my proxyportlet. After doing all this, when I invoke
proxyportlet
> through my browser using
"http://localhost:8080/proxyportlet/ProxyPortlet/",
> I get an exception saying:
>
> javax.servlet.ServletException: Servlet.init() for servlet ProxyPortlet
> threw exception
> at
>
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:96
> 3)
> at
>
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:668)
> at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> va:210)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:643)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
> va:191)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:643)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
> at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
> )
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:643)
> at
>
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
> java:171)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:641)
> at
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
> )
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:641)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
> :174)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:643)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
> at
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
> ction(Http11Protocol.java:549)
> at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)
> at
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
> a:666)
> at java.lang.Thread.run(Thread.java:536)
>
> root cause
>
> java.lang.IllegalStateException: The prepare method was never called
> at
>
org.apache.pluto.PortletContainerServices.get(PortletContainerServices.java:
> 23)
> at
>
org.apache.pluto.services.information.InformationProviderAccess.getContainer
> Service(InformationProviderAccess.java:77)
> at
>
org.apache.pluto.services.information.InformationProviderAccess.getStaticPro
> vider(InformationProviderAccess.java:67)
> at org.apache.pluto.core.PortletServlet.init(PortletServlet.java:112)
> at
>
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:93
> 5)
> at
>
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:668)
> at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> va:210)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:643)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
> va:191)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:643)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
> at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
> )
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:643)
> at
>
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
> java:171)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:641)
> at
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
> )
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:641)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
> :174)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:643)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
> at
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
> ction(Http11Protocol.java:549)
> at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)
> at
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
> a:666)
> at java.lang.Thread.run(Thread.java:536)
>
> Can you kindly throw some light on this?
>
> Regards
> Mandeep
Exception while using proxyPortlet!
Posted by Mandeep Singh <ms...@firstrain.com>.
Hi Richard,
My setup consists of tomcat-4.1.29 & wsrp4j.
I have followed the steps mentioned in portlets/proxyportlet/README.txt for
setting up my proxyportlet. After doing all this, when I invoke proxyportlet
through my browser using "http://localhost:8080/proxyportlet/ProxyPortlet/",
I get an exception saying:
javax.servlet.ServletException: Servlet.init() for servlet ProxyPortlet
threw exception
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:96
3)
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:668)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:210)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:171)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:549)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:666)
at java.lang.Thread.run(Thread.java:536)
root cause
java.lang.IllegalStateException: The prepare method was never called
at
org.apache.pluto.PortletContainerServices.get(PortletContainerServices.java:
23)
at
org.apache.pluto.services.information.InformationProviderAccess.getContainer
Service(InformationProviderAccess.java:77)
at
org.apache.pluto.services.information.InformationProviderAccess.getStaticPro
vider(InformationProviderAccess.java:67)
at org.apache.pluto.core.PortletServlet.init(PortletServlet.java:112)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:93
5)
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:668)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:210)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:171)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:549)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:666)
at java.lang.Thread.run(Thread.java:536)
Can you kindly throw some light on this?
Regards
Mandeep
Re: wsrp-portlet-handle vs, wsrp-parent-handle in portletentityregistry.xml
Posted by Richard Jacob <ja...@apache.org>.
stephen chi zhang wrote:
> I am testing wsrp4j on two different machines through proxyportlet on
> browsers(forget swing consumer for a while), and I have found that
> after each time the producer returns markups to the consumer, the
> producer also alters the portletentityregistry.xml sitting on
> client-side proxyportlet/WEB-INF/data. What the producer does is to
> replace the value of wrsp-portlet-handle with a long ip address thing,
> and assign the original value of that wsrp-portlet-handle to a new
> element called wsrp-parent-handle. To clarify what i am saying here ,
> i have attached the relevant portion of the portletentityregistry.xml
> at below,
>
Please note first that we are talking about Consumer behaviour here not
Producer behaviour.
The portletentityregistry.xml is used here on the Consumer-side
(proxyportlte).
This changing of data is the "Clone-on-write" behaviour of wsrp.
Initially we set up the proxyportlet to point to a "Prodcer offered
Portlet" or POP (see wsrp spec).
The proxyportlet accesses the remote portlet with "clone-before-write"
flag turned on, which causes the Producer side to clone the portlet
prior to storing data for it, and to returned a new portlet handle (the
handle of the fresh clone).
Now the proxyportlet needs to point to the new "Consumer configured
Portlet" or CCP (see wsrp spec), i.e. store the new handle.
We do that by overwriting the old POP handle with the new CCP handle.
To keep the information from which POP the CCP was clone we store this
information in addition, too.
In a "real world" portal the clone could be made explicitly when the
user puts a remote portlet on his page.
In pluto we have a very simple portal impl with no administation,
therefor we had no means to pre-clone here because the proxyportlet is
staticly placed on a page.
However another option would be to explicitly clone first, before
interacting with the remote portet (we've choosen clone-before-write as
a valid usage scenario here).
Note that both methods would require us first to store the POP handle
somewhere and then to store the CCP handle again somewhere.
Since we don't have a DB here we've choosen to store it in the
portletentityregistry.xml given to us by pluto, so just reusing code here...
>
> This automatical alternation has caused some problem when I move
> wsrp4j stuff onto resin instead of staying at tomcat. Resin failed to
> return any content to my consumer until I changed that long IP string
> back to 0.1 and delete parent-handle. However, this was not a problem
> when I remain in tomcat.
Well, changing the handles is not a solution, since you want to work
with "your" portlet configuration (which the handle is actually a
pointer to).
Our producer uses IP-Adresses as part of the handles just as an
showcase, a handle is anything generated by the Producer allowing it to
identify a particular portlet configuration (or instance if you wish).
The handle is opaque to the Consumer and must not be changed by the
Consumer.
cu
Richard