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 Richard Berger <ri...@actiontech.com> on 2004/03/06 01:35:35 UTC

RE: Pluto/Jboss/Windows...(the real solution)

Well, I hope not too many people followed the original instructions - as
they turned out to be incomplete - things were NOT working after step 7.
But the good news is that it did eventually work out on JBoss.  Recall
that for some reason, I was not able to run with the "exploded
directory" deployment that maven generated, so I went with a "war
deployment" approach as described in the original post.  However, to
make things really work I had to make one code change similar to the one
that Russell made - and then I had to ensure that my testsuite.war had a
web.xml file.  More details below.  Note: I have not yet tried deploying
any new portlets, just the ones in testsuite.war.
 
(After following steps 1-7 in the previous post)
8. At this point I ran into a NPE:
java.lang.NullPointerException
  at
org.apache.pluto.portalImpl.om.entity.impl.PortletEntityImpl.getPortletD
efinition(PortletEnt
  at
org.apache.pluto.portalImpl.aggregation.PortletFragment.service(PortletF
ragment.java:147)

As Russell Heywood pointed out
<http://article.gmane.org/gmane.comp.jakarta.pluto.user/395> , Tomcat
deploys testsuite.war into an exploded directory named "testsuite".
However, in jboss the directory name is something like
tmp12345testsuite.war. Thus, Pluto was not able to match these two
differing names. So I added the following slight modification to
Russell's code as follows at line 184 of
PortletDefinitionRegistryFileImpl.java: (Note: I think Russell's works
if you use an exploded directory deployment instead of a .war deployment
- but that is just a guess.)

//RB hack - change webModule from the form of tmp12345foo.war to foo
if (webModule.endsWith(".war") && webModule.startsWith("tmp")) {
  webModule = webModule.substring(8,webModule.length()-4);
}

9. I run "maven fullDeployment" to recreate the pluto.war file (and then
put it in the deploy directory)

10. At this point, I ran into the next NPE
java.lang.NullPointerException
  at org.apache.pluto.portalImpl.aggregation.PortletFragment.service
(PortletFragment.java:156)
..

This was due to my portletDefinition having a null servletDefinition.
Turned out that the reason this was occurring was that my testsuite.war
(created by maven) was lacking a web.xml. Interestingly, the exploded
directory deployment that maven created had the web.xml. So I just
created a version of testsuite.war by zipping up the exploded testsuite
directory structure and put the resulting testsuite.war into jboss's
deploy directory. And then it worked. For real. :)



  _____  

From: Richard Berger 
Sent: Wednesday, March 03, 2004 4:04 PM
To: pluto-user@jakarta.apache.org
Subject: Pluto/Jboss/Windows...


Folks:
 
I looked around for instructions for installing Pluto on JBoss, but
didn't find any.  So here is what worked for me.  I am sure that there
are cleaner ways to do this - any pointers are appreciated.  
 
Enjoy,
RB
 
Installing Pluto on JBoss 3.2.3 on Windows 2000
0. Basic instructions are at:
http://jakarta.apache.org/pluto/install.html, but others recommend
http://cvs.apache.org/viewcvs.cgi/jakarta-pluto/GETTING-STARTED.html.

1. Download Maven (http://maven.apache.org/).   I accepted all the
defaults.  One gotcha - the install did not add the MAVEN_HOME\bin
directory to my path, so I had to do that manually.
 
2. Get the Pluto source.  I installed the source to c:\jakarta-pluto.
 
3. Modify c:\jakarta-pluto\build.properties\build.properties settings
Starting with the c:\jakarta-pluto\build.properties.sample file, I set
  maven.tomcat.home=C:/jboss-3.2.3/server/default
and saved this as build.properties.  
 
4. After adding MAVEN_HOME\bin to my path, I changed directory to the
root of the Pluto project (c:\jakarta-pluto) and ran:
  maven fullDeployment
Everything seemed to complete correctly - and it was actually quite
impressive as maven seemed to go to all the right places and get the
information it needed.
 
5. Then I started JBoss - and noticed many error messages - and of
course the URL http://localhost:8080/pluto/portal failed with an
internal 500 error (context not found IIRC)
 
6. Turns out there were two main problems:
a. Maven deployed pluto.war and testsuite.war as "exploded war files",
but it put them in jboss's default\webapps directory, not in
default/deploy.  However, when I simply copied everything under
default\webapps to default\deploy, things were still failing.  So, I
went with the .war approach instead, and simplied copied pluto.war from
c:\jakarta-pluto\portal\target to default\deploy and I copied
c:\jakarta-pluto\testsuite\target\testsuite.war to default\deploy.  But
then I ran into:
java.lang.NoClassDefFoundError:
org/apache/pluto/PortletContainerException
 at java.lang.Class.getDeclaredConstructors0(Native Method)
 at java.lang.Class.privateGetDeclaredConstructors(Class.java:1590)
 at java.lang.Class.getConstructor0(Class.java:1762)
b. The problem was that Maven deployed pluto-1.0.jar and
portlet-api-1.0.jar to C:\jboss-3.2.3\server\default\shared\lib, rather
than C:\jboss-3.2.3\server\default\lib.  I moved these jar files to
C:\jboss-3.2.3\server\default\lib.
 
7. I then tried http://localhost:8080/pluto/portal/test - and it worked
and the test link on that page worked as well. 
 
Note: I did not need to make the code changes pointed out in
http://article.gmane.org/gmane.comp.jakarta.pluto.user/395, but I have
not yet deployed any portlets, so perhaps I will have to do that as
well.


Twenty Years | One Mission | Accelerating Business Processes 


Richard Berger 
Action Technologies, Inc. 
VP, Product Management 
510.748.1017 (Office) 
510.769.0596 (Fax) 
www.actiontech.com <http://www.actiontech.com/>  



NOTE: The opinions expressed herein are those of the writer and not
necessarily those of Action Technologies, Inc. or its employees or its
affiliates. 



Twenty Years | One Mission | Accelerating Business Processes 


Richard Berger 
Action Technologies, Inc. 
VP, Product Management 
510.748.1017 (Office) 
510.769.0596 (Fax) 
www.actiontech.com 

NOTE: The opinions expressed herein are those of the writer and not necessarily those of Action Technologies, Inc. or its employees or its affiliates.