You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrp4j-dev@portals.apache.org by Diego Louzán <dl...@apache.org> on 2005/08/28 21:35:26 UTC

Default producer doesn't work, some thoughts too

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

As now I'm migrating the producer code, first of all I tried to consume one
portlet locally using current producer. Then I started getting some weird
exceptions, the producer code didn't work out-of-the-box! The problem seems
related to the last example portlet addition, the one named "calc" by Michel.
By default, the calc definition is included in producer's
portletentityregistry.xml and I got this exception:

java.lang.NullPointerException
	at
org.apache.pluto.portalImpl.om.entity.impl.PortletEntityImpl.getPortletDefinition(PortletEntityImpl.java:81)
[...]

This seems related to PLUTO-130, resolved (I hope) in pluto-1.0.1-rc4 (current
producer code uses pluto-1.0.1-rc3). As stated in the issue description:
"[...]For example if the portletentityregistry.xml defines an entity that
doesn't exist, currently an NPE is thrown in
o.a.p.portalImpl.om.entity.impl.PortletEntityImpl's getPortletDefinition()
method (because the PortletApplicationEntity cannot load the corresponding -
non-existant - PortletApplicatonDefinition)[...]"

So we must be very careful with the default portlets loaded by the producer, if
the portlet isn't loaded in webapps/ but included in portletentityregistry.xml,
then we'll get an NPE.

On the other hand, I found that tomcat goes crazy when I deploy the producer &
consumer code to the same instance and there are errors/exceptions. The log
mixes messages from the two webapps, very weird. The best way I found to avoid
this and being able to run the two webapps on the same machine was deploying
two different tomcat instances, so they won't interfere with each other.

Regards.
Diego.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFDEhH+gyzZYflJelERAjVgAJoCaGy1r4UBnmM1ya9XjuXngwM/iQCeNlEB
0oXBOPzPZZDhRQ0rq6GQzEk=
=prrT
-----END PGP SIGNATURE-----

Re: Default producer doesn't work, some thoughts too

Posted by Carsten Ziegeler <cz...@apache.org>.
Diego Louzán wrote:
> 
> This seems related to PLUTO-130, resolved (I hope) in pluto-1.0.1-rc4 (current
> producer code uses pluto-1.0.1-rc3). 
Pluto rc4 is now available from the maven repository, so you can update
to rc4.

> So we must be very careful with the default portlets loaded by the producer, if
> the portlet isn't loaded in webapps/ but included in portletentityregistry.xml,
> then we'll get an NPE.
> 
If this NPE is still raises in rc4, it's something we have to fix in Pluto.
On the other hand, I think our build process should create a correct
portletentityregistry.xml during building wsrp4j.

Carsten

-- 
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/


Re: Default producer doesn't work, some thoughts too

Posted by Michel Alessandrini <ws...@gmx-topmail.de>.
Hi Diego,

> So we must be very careful with the default portlets loaded by the 
> producer, if
> the portlet isn't loaded in webapps/ but included in 
> portletentityregistry.xml,
> then we'll get an NPE.

I thought for testing the consumer it is very useful to get two different 
portlets therefore I added that one.
Nevertheless you are right. We should not load too much portlets by default.

regards
Michel