Issue Details (XML | Word | Printable)

Key: JS2-444
Type: New Feature New Feature
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Jian Liao
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Jetspeed 2

Run Jetspeed 2.0 on Geronimo V1.0

Created: 12/Dec/05 10:53 AM   Updated: 14/Mar/06 02:03 PM
Return to search
Component/s: None
Affects Version/s: 2.1-dev
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments:
  Size
File Licensed for inclusion in ASF works geronimo-application.xml.20051219 2005-12-19 10:42 PM Jian Liao 10 kB
Zip Archive Licensed for inclusion in ASF works geronimo-j2.zip 2005-12-12 11:06 AM Jian Liao 55 kB
Zip Archive Licensed for inclusion in ASF works geronimo-jetspeed.zip 2006-01-02 01:12 PM David Jencks 79 kB
Zip Archive Licensed for inclusion in ASF works geronimo-jetspeed10.zip 2006-01-24 06:01 AM David Jencks 642 kB
Zip Archive Licensed for inclusion in ASF works geronimo-jetspeed11.zip 2006-01-26 06:50 PM David Jencks 625 kB
Zip Archive Licensed for inclusion in ASF works geronimo-jetspeed12.zip 2006-01-30 10:06 AM David Jencks 115 kB
Zip Archive Licensed for inclusion in ASF works geronimo-jetspeed13.zip 2006-03-14 02:03 PM Jian Liao 86 kB
Zip Archive Licensed for inclusion in ASF works geronimo-jetspeed6.zip 2006-01-05 05:59 PM David Jencks 524 kB
Zip Archive Licensed for inclusion in ASF works geronimo-jetspeed8.zip 2006-01-20 06:16 PM David Jencks 536 kB
Java Source File Licensed for inclusion in ASF works GeronimoSecurityValveImpl.java 2005-12-31 02:43 PM David Jencks 2 kB
Java Archive File Licensed for inclusion in ASF works miscchanges9.jar 2006-01-21 04:56 AM David Jencks 13 kB
File Licensed for inclusion in ASF works patch1.diff 2006-01-02 05:18 PM David Jencks 4 kB
File Licensed for inclusion in ASF works patch4.diff 2006-01-04 04:57 PM David Jencks 54 kB
File Licensed for inclusion in ASF works patch6.diff 2006-01-05 05:59 PM David Jencks 49 kB
File Licensed for inclusion in ASF works patch7.diff 2006-01-09 07:30 PM David Jencks 10 kB
File Licensed for inclusion in ASF works patch8.diff 2006-01-13 12:16 PM David Jencks 13 kB
File Licensed for inclusion in ASF works patch9.diff 2006-01-21 04:56 AM David Jencks 24 kB
File Licensed for inclusion in ASF works patch9a.diff 2006-01-21 04:56 AM David Jencks 8 kB
Environment: WinXP SP2, JDK1.4.2_10


 Description  « Hide
Run Jetspeed V2.0 on Geronimo V1.0.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Jian Liao added a comment - 12/Dec/05 11:06 AM
I've tested with Jetspeed V2.0 Final and Geronimo V1.0-SNAPSHOT (built at December 5th).
I think it will work with Geronimo V1.0 Final.

Geronimo Web Container must be Tomcat.

Jian Liao added a comment - 12/Dec/05 12:06 PM
You can download a complete geronimo which jetspeed had been installed from here(This file could only be kept for 3 days) Size:123 MB

http://monocerosd.mofile.com/1181156268530806/8443411658745338/99/1A6D83FBDF2737EE66842A4FD7C55CB9/geronimo-1.0-SNAPSHOT-j2.zip

or you can download jetspeed.ear from here, Size:29 MB

http://normad.mofile.com/5225197481431815/5009669279725268/99/9EBBFC8A88A367AECAC363F12BF34939/jetspeed.ear

Jian Liao added a comment - 12/Dec/05 10:55 PM
Sorry, the above links had become invalid.

Jian Liao added a comment - 19/Dec/05 10:42 PM
I made some modify on geronimo-application.xml according to the latest change, I've tested it with Geronimo Release Candidate 20051219.
Be sure to enlarge JVM startup memory with(-Xms256m -Xmx512m).

David Jencks added a comment - 31/Dec/05 02:43 PM
If I should start up new jira issues, someone tell me :-)

This is an untested class to replace SecurityValveImpl for running j2 in geronimo. It gets the Subject from the geronimo-specific location where geronimo puts it after login. This should let security work with geronimo managing the login and no need for a second "fake" subject constructed by j2. I haven't had time to figure out how to set up the spring configuration files to use this class instead of the normal J2 one, so it is really untested.

David Jencks added a comment - 02/Jan/06 01:12 PM
I've considerably reorganized this so as to build a geronimo server including jetspeed. To compile, unpack geronimo-jetspeed.zip in app-servers, cd geronimo:maven multiproject:install

This will build the new classes, build a derby database, build an ear including jetspeed and the sample portlet apps, build a geronimo configuration for jetspeed, and build a geronimo server including jetspeed. This is roughly how geronimo builds its distributables, so I think this is the best layout for working on the geronimo integration.

Unfortunately jetspeed won't start properly. Perhaps someone who knows more spring can try it and give a hint about what is wrong?

David Jencks added a comment - 02/Jan/06 05:18 PM
This patch to jetspeed + previous geronimo-jetspeed.zip builds as much of jetspeed as possible without log4j, commons-logging, or cglib included in wars. It also fixes a version in the geronimo plan. At this point I have jetspeed starting with only exceptions from the bridges wars inclusion of commons-logging. Trying to view the portal gives a bunch of IllegalArgumentException exceptions from missing portlet definitions. Any ideas? Bad db setup? Not registering portlet apps with the portal??

David Jencks added a comment - 03/Jan/06 11:02 AM
The reason my setup doesn't work is that it uses wars from the maven repo rather than ones from a successfully started jetspeed/tomcat setup. The web.xml from a successfully started war will have the jetspeedContainerServlet added to it: since my web.xml's didn't, the portlet apps never registered with jetspeed, so it is not too surprising I couldn't see anything.

I think I see how to change the geronimo web module builders (at least the one from jetty) so that geronimo will add this servlet for us.

Ate Douma added a comment - 03/Jan/06 11:21 AM
David,

Jetspeed provide an offline deployer which you might be able to use from within the Geronimo builders:
  http://portals.apache.org/jetspeed-2/multiproject/jetspeed-deploy-tools/deploy-tools.html

Another thing the deployer can do (optionally) is stripping out logger framework jars (log4J, commons-logging) which seems to be needed for Geronimo
too.

I'm planning to work again on some fixes and enhancements for the J2 build and installer, starting tomorrow.
I will also look into the Geronimo integration and try out you setup.

David Jencks added a comment - 04/Jan/06 04:57 PM
With the enclosed patch I have jetspeed running on geronimo. In order to deal with some classloading problems I moved all the jars out of jetspeed.war lib and added dependencies in the ear file. I also had to modify PortletApplicationManager to determine "local" based on whether the war name starts with "jetspeed-", since in my setup all wars are deployed the same, as wars in the ear.

I actually think this will lead to a better solution for environments with reasonably sophisticated classloading, such as geronimo. I plan to have 2 basic configurations (i.e. classloaders) for jetspeed in geronimo: a base configuration that includes basically the jars put into "shared" in tomcat, and a child configuration that includes as dependencies all the jars normally put into jetspeed.war lib. "regular" portlet applications can then be deployed as children of the base configuration, whereas "local" portlet applications can be deployed as children of the child config. In this way the local portlet apps won't need to use special directories in the unpacked jetspeed war and the jetspeed war probably won't need to be unpacked.

However, what I have in this patch is rather crude.

This patch is generated with svk: if anyone has trouble applying it please let me know. To get to my local state you should unpack the zip file i provided, then apply patch1.diff and patch4.diff.

This file includes a modification to JetspeedDeploy from Jian Liao.

Jian Liao added a comment - 04/Jan/06 05:15 PM
I like to contribution my patch for JetspeedDeploy to Apache Jetspeed. I created a new JetspeedDeploy constructor which has 4 parameters, the fourth parameter is for explicitly specify portlet application contextName, since in this case the war file name is not equals to contextName.

David Jencks added a comment - 05/Jan/06 05:59 PM
With these I have the GeronimoSecurityValve working. I added an alternate https access path /jetspeed/secure. I split the jetspeed configuration into jetspeed-base which includes the shared jars and the jetspeed ear which has the non-shared jars as dependencies. I construct a geronimo-jetspeed war that does not have anything in lib, all the jars are geronimo dependencies in the ear. This will only work with the change to PortletApplicationManager from the previous patch that allows deployment of "local" wars as regular wars.

David Jencks added a comment - 09/Jan/06 07:30 PM
I fixed the problems in geronimo-jetty that were leading to loss of login info when accessing an unsecured resource after login. The enclosed incremental patch updates to the current version of geronimo head.

David Jencks added a comment - 13/Jan/06 12:16 PM
This mostly contains some version changes to adapt to the new geronimo version 1.1-SNAPSHOT. Session tracking seems to be working completely under jetty and at least partially under tomcat: the role viewer portlet seems to give correct results consistently.

David Jencks added a comment - 20/Jan/06 06:16 PM
This version works with geronimo JACC and does not use the jetspeed permission manager or policy. It requires the modifications in JS2-475 and some earlier patches to jetspeed from earlier attachments.

Permissions are set only at deployment time in this implementation. A further step will be to enable changing them while the portal is running.

David Sean Taylor added a comment - 21/Jan/06 02:35 AM
David,

I will have time to test this out next week. Been traveling most of January, and falling way behind unfortunately.
Thanks for all the contributions!

David Jencks added a comment - 21/Jan/06 04:56 AM
In an attempt to make it easier for others to reproduce my setup, here are some more files. Instructions:

Make sure you have up to date geronimo-jetty-j2ee-1.1-SNAPSHOT.zip and geronimo-tomcat-j2ee-1.1-SNAPSHOT.zip. These should be downloaded automatically from cvs.apache.org/repository, but you may have better luck building them yourself. I haven't actually checked if this is in the jetspeed repo list.

unpack miscchanges9.jar in jetspeed/trunk
unpack geronimo-jetspeed8.zip in app-servers/geronimo (you have to create the geronimo sub-dir)
get permissions1.jar from JS2-475 and unpack in jetspeed/trunk

Rebuild jetspeed:
maven [-o] allBuild

cd app-servers/geronimo
maven -o multiproject:install
cd jetty-assembly
java -jar target/geronimo-1.1-SNAPSHOT/bin/server.jar --long

Jetspeed should start and run.

The permissions are not very sophisticated: they allow all access to anyone. To change them, look at the end of jetty-config/src/plan/plan.xml.

geronimo-tomcat is not set up to use geronimo jacc security yet.

David Jencks added a comment - 24/Jan/06 06:01 AM
This includes all modified files I've submitted for geronimo integration, JS2-475, JS2-473, and possibly other jira issues, updated to work with j2 rev 371614. To get a diff, I suggest unpacking this zip over a fresh j2 copy and using svn diff.

David Jencks added a comment - 26/Jan/06 06:50 PM
This includes all files for geronmo-jetspeed and jS2-472 and JS2-475. I've removed my patch for JS2-473 since Randy came up with a different (and better) solution.
The tomcat-assembly now works using JACC. I've added a gbean dependency to assure that the "additional" security information is added after the standard servlet security info.

David Le Strat added a comment - 29/Jan/06 04:12 AM
JS2-475 was committed. Is there any chance we could try to get a patch for JS2-444 based on the latest SVN (which includes JS2-475)? Thanks again for all the hard work.

David Jencks added a comment - 30/Jan/06 10:06 AM
This version does not include the JS2-475 or JS2-472 changes. It should run fine without the JS2-472 changes unless you remove the fragment permissions from the geronimo plans, in which case you will see how I found the problem :-)

I've also changed how I build geronimo-jetspeed.war to unpack a normal jetspeed.war and modify it instead of trying to maintain a copy of the entire contents.

David Le Strat added a comment - 30/Jan/06 10:36 AM
Applying the changes from this patch related to the security component:

- Changes to the AuthorizationProviderImpl
- Addition of JaasPolicyCoordinator

Much more elegant way to handle the policy coordination.

Philip Mark Donaghy added a comment - 30/Jan/06 04:21 PM
There is an issue with the geronimo_assembly_plugin_version. The geronimo head is currently building the 1.1.6 version of this plugin.

<GeronimoSrc>/etc/project.properties:geronimo_assembly_plugin_version=1.1.6

So the files tomcat-assembly/project.properties and jetty-assembly/project.properties need to be modified from

geronimo_assembly_plugin_version=1.1.3

to,

geronimo_assembly_plugin_version=1.1.6

Jian Liao added a comment - 14/Mar/06 02:03 PM
An Update for Integration J2 with Geronimo based on David Jencks's previous work.

Version
----------
Geronimo : 1.2-SNAPSHOT(SVN head) built at 03-14-2006
Jetspeed 2: 2.1-dev(SVN head) built at 03-14-2006

Known issues
--------------------
o There is a blocked issue in jetspeed-2 (JS2-511), the workaround is change geronimo default log level from DEBUG to INFO.

o There still have a subject mismatch problem with tomcat-assembly. The subject will be binded to serve thread, but if the serve thread changed, the
   subject will mismatch for a user session and after the user logout, the subject still exist in the original authentication thread, I think it
   should be removed. There is no such issue in jetty-assembly cause each user request got reauthenticated and subject got reset after login.