Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Portals Wiki" for 
change notification.

The "Jetspeed2/JBossHowToDetailed" page has been changed by MattReed.
http://wiki.apache.org/portals/Jetspeed2/JBossHowToDetailed?action=diff&rev1=13&rev2=14

--------------------------------------------------

  = Setting up and running Jetspeed 2 on JBoss =
+ ''' Important: Updated instruction on using JBoss 5.1 can be found on 
http://wiki.apache.org/portals/Jetspeed2/JBoss5HowTo.  '''
+ 
  This page details installation and setup instructions for the Jetspeed 2 
Enterprise Portal in JBoss.  It also contains information on how Jetspeed 2 
runs and behaves in JBoss and how the deployment of portlets works in this 
environment - all from the point of view of someone completely new to Jetspeed 
2 (and also somewhat new to JBoss). Please feel free to clarify any 
misunderstandings on the author's part.
  
  Jetspeed 2 contains official installation instructions and instructions on 
deploying it in Tomcat at 
http://portals.apache.org/jetspeed-2/getting-started.html and the page here is 
intended as a supplement to http://wiki.apache.org/portals/Jetspeed2/JbossHowTo.
@@ -18, +20 @@

  === Maven Installation ===
  To err on the safe side, you should have the following environment variables 
set up (Windows examples):
  
-  '''HOME''' C:\Documents and Settings\someuser
+  . '''HOME''' C:\Documents and Settings\someuser
- 
   '''JAVA_HOME''' C:\j2sdk1.4.2_06
- 
   '''MAVEN_HOME''' C:\maven
- 
   '''MAVEN_REPO''' C:\Documents and Settings\someuser\.maven\repository
- 
   '''Path''' ''add'' C:\maven\bin
- 
   '''USER_HOME''' C:\Documents and Settings\someuser
  
  If you experience problems during the Jetspeed 2 build, add the following 
lines to the build.properties:
  
-  
maven.repo.remote=http:''''''//www.bluesunrise.com/maven,http:''''''//www.ibiblio.org/maven,http:''''''//dist.codehaus.org,http:''''''//cvs.apache.org/repository
+  . 
maven.repo.remote=http:''''''//www.bluesunrise.com/maven,http:''''''//www.ibiblio.org/maven,http:''''''//dist.codehaus.org,http:''''''//cvs.apache.org/repository
- 
   maven.tomcat.home=C:/tomcat     ''... or different, depending on where you 
put Tomcat''
- 
   maven.tomcat.version.major='''5'''
  
  === Build properties, configuration, and building Jetspeed 2 ===
@@ -48, +43 @@

  
  At this stage, Jetspeed 2 is not yet deployed in JBoss, but it is built, 
essentially resulting in the files (inside the Tomcat directory):
  
-  \shared\lib\pluto-1.0.1-rc1.jar ('''M2:''' pluto-1.0.1-RC2-PATCHED.jar has 
to be gotten from binary M2 distribution)
+  . \shared\lib\pluto-1.0.1-rc1.jar ('''M2:''' pluto-1.0.1-RC2-PATCHED.jar has 
to be gotten from binary M2 distribution)
- 
   \shared\lib\portals-bridges-common-0.1.jar ('''M2:''' 
portals-bridges-common-0.2.jar)
- 
   \shared\lib\jetspeed-commons-2.0-M1.jar ('''M2:''' 
jetspeed-commons-2.0-M2.jar)
+  \shared\lib\jetspeed-api-2.0-M1.jar ('''M2:''' jetspeed-api-2.0-M2.jar) 
\shared\lib\portlet-api-1.0.jar \webapps\jetspeed.war 
\webapps\jetspeed\WEB-INF\deploy\jetspeed-layouts.war 
\webapps\jetspeed\WEB-INF\deploy\struts-demo.war 
\webapps\jetspeed\WEB-INF\deploy\php.war 
\webapps\jetspeed\WEB-INF\deploy\perl.war 
\webapps\jetspeed\WEB-INF\deploy\security.war 
\webapps\jetspeed\WEB-INF\deploy\demo.war 
\webapps\jetspeed\WEB-INF\deploy\pam.war 
\webapps\jetspeed\WEB-INF\deploy\jsf-demo.war 
\webapps\jetspeed\WEB-INF\deploy\rss.war
- 
-  \shared\lib\jetspeed-api-2.0-M1.jar ('''M2:''' jetspeed-api-2.0-M2.jar)
- 
-  \shared\lib\portlet-api-1.0.jar
- 
-  \webapps\jetspeed.war
- 
-  \webapps\jetspeed\WEB-INF\deploy\jetspeed-layouts.war
- 
-  \webapps\jetspeed\WEB-INF\deploy\struts-demo.war
- 
-  \webapps\jetspeed\WEB-INF\deploy\php.war
- 
-  \webapps\jetspeed\WEB-INF\deploy\perl.war
- 
-  \webapps\jetspeed\WEB-INF\deploy\security.war
- 
-  \webapps\jetspeed\WEB-INF\deploy\demo.war
- 
-  \webapps\jetspeed\WEB-INF\deploy\pam.war
- 
-  \webapps\jetspeed\WEB-INF\deploy\jsf-demo.war
- 
-  \webapps\jetspeed\WEB-INF\deploy\rss.war
  
  '''M2:''' Additional portlet war files: palm.war, jpetstore.jar, 
jsf-demo-myfaces.war
  
@@ -94, +64 @@

  First, make sure JBoss is '''not''' running.
  
  The procedure at http://wiki.apache.org/portals/Jetspeed2/JBossHowTo can be 
largely followed with a few notes and adjustments (the instructions on that web 
page were for an alpha release as opposed to Milestone 1):
+ 
   1. Unzip the jetspeed.war (can be found in Tomcat's webapps dir or in the 
portal/target dir of the Jetspeed 2 source (after a build of course) into a 
directory called jboss/server/default/deploy/jetspeed.war - inside this 
directory you will then find a directory WEB-INF/deploy.
-  2. Copy the following 5 jars (can be found in Tomcat's shared\lib dir) into 
your JBoss' server/default/lib directory
+  1. Copy the following 5 jars (can be found in Tomcat's shared\lib dir) into 
your JBoss' server/default/lib directory
+ 
  pluto-1.0.1-rc1.jar ('''M2:''' pluto-1.0.1-RC2-PATCHED.jar)
  
  portals-bridges-common-0.1.jar ('''M2:''' portals-bridges-common-0.2.jar)
@@ -104, +76 @@

  
  jetspeed-api-2.0-M1.jar ('''M2:''' jetspeed-api-2.0-M2.jar)
  
- portlet-api-1.0.jar 
+ portlet-api-1.0.jar
+ 
-  1.#3 Copy the JBoss datasource definition jetspeed-ds.xml from the Jetspeed 
2 source's /portal/src/resources directory to your JBoss' server/default/deploy 
directory.
+  1. Copy the JBoss datasource definition jetspeed-ds.xml from the Jetspeed 2 
source's /portal/src/resources directory to your JBoss' server/default/deploy 
directory.
-  4. Delete JBoss' server/default/lib/hsqldb.jar file and instead copy 
Jetspeed's hsqldb-1.7.1.jar file into the server/default/lib directory.
+  1. Delete JBoss' server/default/lib/hsqldb.jar file and instead copy 
Jetspeed's hsqldb-1.7.1.jar file into the server/default/lib directory.
-  5. '''Move''' the following jars out of jetspeed.war/WEB-INF/lib into your 
JBoss' server/default/lib directory:
+  1. '''Move''' the following jars out of jetspeed.war/WEB-INF/lib into your 
JBoss' server/default/lib directory:
+ 
- commons-logging-1.0.3.jar 
+ commons-logging-1.0.3.jar
  
  log4j-1.2.8.jar
  
  xerces-2.3.0.jar
  
  xml-apis-2.0.2.jar
+ 
-  1.#6 In jetspeed-spring.xml, locate the bean with the 
id="org.apache.jetspeed.tools.pamanager.servletcontainer.Application''''''Server''''''Manager".
 Comment out the current bean definition, which is targeted at Tomcat 4/5, and 
uncomment the bean definition below that one, which is targeted at JBoss.
+  1. In jetspeed-spring.xml, locate the bean with the 
id="org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManager".
 Comment out the current bean definition, which is targeted at Tomcat 4/5, and 
uncomment the bean definition below that one, which is targeted at JBoss.
+ 
- '''M2:'''The jetspeed-spring.xml may not contain the JBoss 
Application''''''Server''''''Manager definition, so here it is (copy/paste into 
the jetspeed-spring.xml):
+ '''M2:'''The jetspeed-spring.xml may not contain the JBoss 
ApplicationServerManager definition, so here it is (copy/paste into the 
jetspeed-spring.xml):
+ 
  {{{
  <bean 
id="org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManager"
        
class="org.apache.jetspeed.tools.pamanager.servletcontainer.JBossManager"
        init-method="start" />
  }}}
-  1.#7 ''You can now start JBoss'' - if you previously deployed portlets (e.g. 
in Tomcat), they may still be registered and have to be un-deployed first and 
then re-deployed (see 4.1).
+  1. ''You can now start JBoss'' - if you previously deployed portlets (e.g. 
in Tomcat), they may still be registered and have to be un-deployed first and 
then re-deployed (see 4.1).
-  8. For the demo portlets to show up you will need to copy the following 9 
wars into your JBoss' server/default/deploy/jetspeed.war/WEB-INF/deploy 
directory (created when you unzipped the jetspeed.war file in the previous 
step):
+  1. For the demo portlets to show up you will need to copy the following 9 
wars into your JBoss' server/default/deploy/jetspeed.war/WEB-INF/deploy 
directory (created when you unzipped the jetspeed.war file in the previous 
step):
+ 
  jetspeed-layouts.war
  
- struts-demo.war 
+ struts-demo.war
  
- php.war 
+ php.war
  
- perl.war 
+ perl.war
  
- security.war 
+ security.war
  
- demo.war 
+ demo.war
  
  pam.war
  
@@ -147, +125 @@

  These files can be found in Tomcat's webapps/jetspeed/WEB-INF/deploy 
directory or in their respective target directories in the Jetspeed 2 source 
(after a build of course).  For M1, keep copies of these files handy!
  
  '''Note:''' To get the locale selector and login portlet to display, you have 
to change the web.xml inside /WEB-INF in the demo.war to change the role name 
in the auth-contraint from tomcat to '''*'''
+ 
  {{{
    <security-constraint>
      <web-resource-collection>
@@ -161, +140 @@

  Put the modified demo.war (with the changed web.xml) into your handy copy of 
the 9 portlet war files and also replace the demo.war file in your JBoss' 
server/default/deploy/jetspeed.war/WEB-INF/deploy directory with the just 
modified one.
  
  === Login Portlet ===
- JBoss does not have a ''tomcat-users.xml'' file. Instead, look inside the 
''server/default/conf/login-config.xml'' file.  In there, you will find an 
application policy "other", which is used if the realm (= security domain) 
"jetspeed" is not found.  This application policy uses the 
org.jboss.security.auth.spi.Users''''''Roles''''''Login''''''Module as a 
default, which is driven by the two files "users.properties", and 
"roles.properties" in the directory 
server/default/deploy/http-invoker.sar/invoker.war/WEB-INF/classes.
+ JBoss does not have a ''tomcat-users.xml'' file. Instead, look inside the 
''server/default/conf/login-config.xml'' file.  In there, you will find an 
application policy "other", which is used if the realm (= security domain) 
"jetspeed" is not found.  This application policy uses the 
org.jboss.security.auth.spi.UsersRolesLoginModule as a default, which is driven 
by the two files "users.properties", and "roles.properties" in the directory 
server/default/deploy/http-invoker.sar/invoker.war/WEB-INF/classes.
  
  To be able to login, you have to add the users and roles that exist in the 
HSQL database (populated by the init db script) to these two files.
  
@@ -175, +154 @@

  
  The auto-deployer writes to the log file jetspeed.war/logs/deployment.log - 
watch this file to see what the auto-deployer is doing and always wait for it 
to finish.
  
- '''M2:''' The auto-deployer now copies the .war files from Jetspeed 2's 
deploy directory to JBoss' deploy directory and afterwards deletes them from 
Jetspeed 2's deploy directory (which can be thought of aas a staging 
directory).  
- Also, it is completely stable as far as shutting down/starting up JBoss is 
concerned, '''''solving the deployment/un-deployment issues described in the 
sections below!'''''
+ '''M2:''' The auto-deployer now copies the .war files from Jetspeed 2's 
deploy directory to JBoss' deploy directory and afterwards deletes them from 
Jetspeed 2's deploy directory (which can be thought of aas a staging 
directory).   Also, it is completely stable as far as shutting down/starting up 
JBoss is concerned, '''''solving the deployment/un-deployment issues described 
in the sections below!'''''
+ 
  ----
  
  === Deploying ===
@@ -201, +180 @@

  ''Precondition:'' A working JBoss / Jetspeed 2 is running (if no JBoss is 
running, check whether you need to do step 3 and then continue with step 4 to 
6).
  
  '''Shutdown'''
+ 
   1. Un-deploy all portlets by deleting all war files from Jetspeed 2's deploy 
directory. If this is not done, you will either get exceptions then next time 
JBoss is started (if 2. is not done either), or you will get empty portlets (if 
this step was not done, but step 2 was done).
-  2. Shutdown JBoss.
+  1. Shutdown JBoss.
-  3. Delete all automatically created .war-directories in JBoss' deploy 
directory (e.g. for the portlet in demo.war, the directory 
server/default/deploy/demo.war) and all their contents. If this is not done, 
you will get exceptions the next time JBoss is started.
+  1. Delete all automatically created .war-directories in JBoss' deploy 
directory (e.g. for the portlet in demo.war, the directory 
server/default/deploy/demo.war) and all their contents. If this is not done, 
you will get exceptions the next time JBoss is started.
  
  ''You now have a clean, shut down state with no portlets deployed or 
registered.''
  
  '''M2:''' Simply shut down JBoss - when you start it up again, all portlets 
will still be registered and deployed.
  
  '''Startup'''
+ 
-  1.#4 Start JBoss and wait for it to finish (for M1, the last message stating 
that JBoss has started can be found in the file 
server/default/deploy/jetspeed.war/logs/jetspeed.log).
+  1. Start JBoss and wait for it to finish (for M1, the last message stating 
that JBoss has started can be found in the file 
server/default/deploy/jetspeed.war/logs/jetspeed.log).
-  5. Go to or refresh http://localhost:8080/jetspeed - this will show an error 
500. If this is not done, you will get a blank Jetspeed home page after 
deployment of the portlets. '''M2:''' This step is not necessary anymore.
+  1. Go to or refresh http://localhost:8080/jetspeed - this will show an error 
500. If this is not done, you will get a blank Jetspeed home page after 
deployment of the portlets. '''M2:''' This step is not necessary anymore.
-  6. Deploy the portlets by copying the (e.g. 9 example) portlet war files 
into the Jetspeed 2 deploy directory and wait until the auto-deployer has 
finished deploying them (see jetspeed.war/logs/deployment.log).
+  1. Deploy the portlets by copying the (e.g. 9 example) portlet war files 
into the Jetspeed 2 deploy directory and wait until the auto-deployer has 
finished deploying them (see jetspeed.war/logs/deployment.log).
+ 
  ''You now have a working, running JBoss / Jetspeed 2.''
  
  == Troubleshooting ==
@@ -244, +226 @@

  === Miscellaneous ===
  To get rid of the following warning in the jetspeed.log:
  
- org.apache.catalina.startup.Context''''''Config - Missing application 
web.xml, using defaults only 
Standard''''''Engine[jboss.web].Standard''''''Host[localhost].Standard''''''Context[/demo]
+ org.apache.catalina.startup.ContextConfig - Missing application web.xml, 
using defaults only 
StandardEngine[jboss.web].StandardHost[localhost].StandardContext[/demo]
  
  put the demo portlet's web.xml into the empty demo-directory in the JBoss 
deploy directory (not the demo.war-directory, and not into any sub-directory 
inside the demo directory).
  

Reply via email to