You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-user@portals.apache.org by David Lemanowicz <da...@flashline.com> on 2004/09/30 16:30:11 UTC

Portlet config problem

I've been trying to develop just a "hello world" portlet for pluto and I've been stuck for several days at the same point.  It's apparently a configuration problem because it's not getting as far as my GenericPortlet derived class.

I was able to see the 2 test portlets by pointing my browser to http://localhost:8080/pluto/portal/ and clicking the test link.

I tried to replace one of the test portlets with my own.  I created my <application> in portletentityregistry.xml and I changed on of the references in pageregistry.xml to refer to my application and portlet instead of the sample test portlet.  I created a webapp to house my portlet and gave it a web.xml and a portlet.xml.

Now, my portlet comes up in place of one of the test portlets, and the title bar is correct but the content of the portlet says "Error occurred in portlet!"

The error that occurred was:
  java.lang.IllegalStateException: The prepare method was never called

PortletContainerServices.prepare IS being called for my portlet but what's happening is that when PortletContainerServices.get is called later the static currentContainerService is a different object than it was when the prepare was called.  So the returned currentContainerServiceStack object is empty, so it assumes that prepare wasn't called.

When the testportlet is rendered the static currentContainerService remains the same.

That sounds like it would be a threading problem but in eclipse it LOOKS like it's all on the same thread.  Also I don't know how my configuration could cause a threading problem.

Any ideas for what I should try?