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 Jason Timmes <Ja...@veritas.com> on 2005/03/26 08:55:35 UTC

Deploying my first portlet failed, not sure why

I'm brand new to JSR 168 and Pluto, but am trying to get up to speed.
 
I'm running on WinXP Pro (SP1), JDK 1.4.2_05, Tomcat 5.0.28, Pluto 1.0.1
rc2 (from sources), and Maven 1.0.2.
 
Initial build of Pluto went fine (after fixing rc1 pluto reference in
testsuite project.xml), deployed to Tomcat fine, and Test portlet looks
great in Pluto.
 
Then I downloaded the sample code for the portal book I just started
reading
(http://www.apress.com/book/supplementDownload.html?bID=362&sID=2420)
 
I built the "first" portlet from chapter02 (basically a hello world type
deal), and using ant, generated a war file.  This should be "proven"
source code... I looked at portlet.xml, and it looks correct:
 

	<?xml version="1.0" encoding="UTF-8"?>
	<portlet-app
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.x
sd
	http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
version="1.0">
	 <portlet>
	         <description>First Portlet for the Apress Portlet book
by Jeff Linwood and David Minter.</description>
	  
	         <portlet-name>FirstPortlet</portlet-name>
	  
	         <display-name>First Portlet</display-name>
	  
	
<portlet-class>com.portalbook.portlets.FirstPortlet</portlet-class>
	 
	         <expiration-cache>-1</expiration-cache>
	          
	         <supports>
	   <mime-type>text/html</mime-type>
	   <portlet-mode>VIEW</portlet-mode>
	  </supports>
	 
	  <portlet-info>
	   <title>First Portlet</title>
	   <short-title>1st Portlet</short-title>
	   <keywords>First, Portlet</keywords>
	  </portlet-info>
	 </portlet>
	 </portlet-app>

 
Deploy (using maven) went fine.  Then I updated my
portletentityregistry.xml:
 

	<?xml version="1.0" encoding="UTF-8"?>
	<portlet-entity-registry>
	    <application id="first">
	        <definition-id>first</definition-id>
	        <portlet id="firstportlet">
	            <definition-id>first.FirstPortlet</definition-id>
	        </portlet>
	    </application>
	</portlet-entity-registry>
	

And finally, my pageregistry.xml:
 

	<?xml version="1.0"?>
	<portal>
	    <fragment name="navigation"
class="org.apache.pluto.portalImpl.aggregation.navigation.TabNavigation"
>
	    </fragment>
	    <fragment name="first" type="page">
	        <navigation>
	            <title>First Portlet</title>
	            <description>...</description>
	        </navigation>
	 
	        <fragment name="row" type="row">
	            <fragment name="col1" type="column">
	                <fragment name="p1" type="portlet">
	                    <property name="portlet"
value="first.firstportlet"/>
	                </fragment>
	            </fragment>
	        </fragment>
	    </fragment>
	</portal>
	

Pluto starts fine, but when I try to open the "First Portlet" page on
the UI, I get a stack trace, a NullPointerException in
PortletEntityImpl.getPortletDefinition().  I did a little debugging, and
found this is null in my method:
 
applicationEntity.getPortletApplicationDefinition()
 
Can anyone help me figure out what I'm doing wrong?  I'm sure this must
be a config thing... either my env is wrong, or the sample code is out
of date with pluto 1.0.1 rc2, or I'm screwing something up.
 
Thanks in advance for the assistance!