Saturday, January 08, 2005

Moulding Plone

Well, Plone is turning out to be very easy to use. I am keeping notes as I go along, and I'll post them here when they are at a reasonably complete stage. In the space of a couple of days I have managed to get far more customisation done that with any of the J2EE portals I have tried so far. There is even a blog add-in available that installs as smoothly as eels through seagrass. I think I will have to create a blogroll portlet from scratch, but having had a go at a bit of customisation, I am not daunted. The documentation available is also very useful. A lot of the tweaks I have made so far have been done following the instructions on the Plone site.

Obviously, Plone being built using Python and not Java, it is not JSR168-compliant, but I think for demonstration purposes, it will do just fine. It's a relief to get to this stage - I can now concentrate on the customisation rather than the evaluation.

Wednesday, January 05, 2005

eXo build notes

Here are my notes from my experiments with eXo. They contain some solutions to problems that came up, especially the unsatisfied dependencies. The last couple of sections were issues with the way the system appeared to work. I posted the file manager questions on the eXo support forum - no reply yet...
----------------------------

Build

All directories are created under /opt
Add the following lines to /etc/profile:

#### Start of Java/portal entries ####

pathmunge /opt/SUNWappserver/jdk/bin/ after
JAVA_HOME=/opt/SUNWappserver/jdk/
J2EE_CLASSPATH=

MAVEN_HOME=/opt/maven-1.0.2
pathmunge /opt/maven-1.0.2/bin

export MAVEN_HOME JAVA_HOME J2EE_CLASSPATH

#### End of Java/portal entries ####


Download maven from http://maven.apache.org/start/download.html
Install maven – instructions at http://maven.apache.org/start/install.html
Update /etc/profile entry if version number is different
Refresh profile (. /etc/profile)
Initialise maven by running with no arguments

Download latest exo SVN project ( SVN = Subversion source repository tool) from http://forge.objectweb.org/plugins/scmsvn/index.php?group_id=151
Create directory /opt/projects
Untar SVN hierarchy under here
Follow build instructions at http://www.exoplatform.com
Download exo src tree from http://www.exoplatform.org/
Update build.properties file to include this line:
maven.repo.remote=http://www.ibiblio.org/maven/,
file:/home/Brian/exoplatform/lib,
file:${base.directory}/exoplatform/lib
Change path of src distribution if necessary

PROBLEM:
Maven multiproject:install takes a long time to run (30 mins on a slow PC)
Build fails with unsatisfied dependencies:
cp ../lib/jbpm/jars/jbpm-2.0-beta2.jar /opt/maven/repo/repository/jbpm/jars/
change version of httpunit.jar to 1.5.4 in these files:
exoplatform/test/webunit-suites/project.xml
exoplatform/test/webunit-framework/project.xml
Download httpunit from http://sourceforge.net/project/showfiles.php?group_id=6550
Copy httpunit.jar to /opt/maven/repo/repository/httpunit/jars/

Download common-fileupload from http://jakarta.apache.org/site/binindex.cgi#commons-fileupload
cp commons-fileupload-1.0/commons-fileupload-1.0.jar /opt/maven/repo/repository/commons-fileupload/jars/

Download aspectjtools-1.2.jar from http://www.ibiblio.org/maven/aspectj/jars/
(maybe not required if maven.repo.remote set correctly?

cp /home/Brian/exoplatform/lib/jaxrpc/jars/jaxrpc-1.0.jar /opt/maven/repo/repository/jaxrpc/jars/
cp /home/Brian/exoplatform/lib/saaj/jars/saaj-1.1.jar /opt/maven/repo/repository/saaj/jars/

PROBLEM:
Maven failed to download the following files, and the build failed because of related dependencies:
jsf-api-1.1.jar
jsf-impl-1.1.jar
jstl.jar
jstl_el.jar
jta-spec-1.0.1.jar
hsqldb.jar

Resolved by copying versions of these files from the exo-tomcat binary distribution into the following destination directories:
jsf-api-1.1.jar ==> /opt/maven/repo/repository/jsf/jars/
jsf-impl-1.1.jar ==> /opt/maven/repo/repository/jsf/jars/
jstl.jar ==> /opt/maven/repo/repository/jstl/jars/
jstl_el.jar ==> /opt/maven/repo/repository/jstl/jars/
jta-spec-1.0.1.jar ==> /opt/maven/repo/repository/misc/jars/
hsqldb.jar ==> /opt/maven/repo/repository/hsqldb/jars/

PROBLEM:
Maven failed to download the following files, and the build failed because of related dependencies:
exoplatform.commons-1.0.jar
exoplatform.jsf-components-1.0.jar
exoplatform.container-1.0.jar
exoplatform.services.common.api-1.0.jar
exoplatform.services.database.api-1.0.jar
exoplatform.services.resources.api-1.0.jar
exoplatform.services.portlet-container.api-1.0.jar
exoplatform.services.portlet-registry.api-1.0.jar
exoplatform.services.portal.api-1.0.jar
exoplatform.services.organization.api-1.0.jar
exoplatform.services.id-generator.api-1.0.jar
exoplatform.services.security.api-1.0.jar
exoplatform.test.framework-1.0.jar
exoplatform.test.webunit-framework-1.0.jar
exoplatform.services.id-generator.impl-1.0.jar
exoplatform.services.common.impl-1.0.jar
exoplatform.services.database.impl-1.0.jar
exoplatform.services.resources.impl-1.0.jar
exoplatform.services.portal.impl-1.0.jar
exoplatform.services.backup.api-1.0.jar
exoplatform.services.organization.impl-1.0.jar
exoplatform.services.backup.impl-1.0.jar
exoplatform.services.portlet-container.impl-1.0.jar
exoplatform.services.portlet-registry.impl-1.0.jar

Resolved by copying binaries from the exo-tomcat distribution into maven repository


File explorer

Problems:
1. Create new folder
2. Set default start folder
3. No tooltips or verification on action icons


1. Create new folder
Clicking the link does not seem to work. The screen refreshes, but that’s all.
I can create a folder in the file system under the content directory, but it only appears in the portlet display if I go into edit mode and back out, or if I log out and back in again.

2. Set default start folder
I want to allow portal users to create documents in a sub-folder but not to see the top-level ones (eg META-INF, WEB-INF, skin, etc). The options in the edit dialog appear to offer this possibility, but if I change the base-dir value, I get the following error:
The portlet has a fatal error. Click here to restart the portletClick

Can this be configured differently for different communities?

3. No tooltips or verification on action icons
The meaning of the icons is not obvious, and there is no verification step when deleting a file. It would be perfectly possible for a user who is experimenting to remove a file by accident.

Workflow

Creating the xml and java representations for realistic business process could be very time consuming. It doesn’t look too difficult, but there is a lot to go wrong. Added to this, I would need to work out a way of tapping into the group assignments of individual users in order to make the task assignments work properly. In the sample process definitions, there are a couple of dummy string entries which only work for the two hard-coded usernames (see below). For a class of 120+ where the roles are changing on a regular basis, a hard-coded solution would be infeasible.
public class BossAssignementHandler implements AssignmentHandler{

public String selectActor(AssignmentContext assignmentContext) {
System.out.println("In selectActor of BossAssignementHandler : ");
System.out.println(" --> Previous actor : " + assignmentContext.getPreviousActorId());
if("benj".equals(assignmentContext.getPreviousActorId())
"bossOfBenj".equals(assignmentContext.getPreviousActorId())){
System.out.println(" --> Next actor : bossOfBenj");
return "bossOfBenj";
}
return assignmentContext.getPreviousActorId();
}
}

This also means that I have not been able to test whether the task assignment portlet refreshes automatically or not – probably not judging by the others.


Demo portal

I am teaching a module about J2EE portals, and I am looking for an appropriate platform to use. My institution uses WebCT which is hopeless - not a portal, not even a nice web environment, although we are promised an upgrade - added to which, I would like to teach the material using the tools themselves. So far, I have had a go with uPortal, Liferay and eXo, and I have only just thought about putting the experience in the blog.

Thoughts so far?

uPortal
Seems quite simple to administer; somewhat restrictive in terms of layout options, though. I haven't spent much time with this one, but I didn't like the way that porlets take over the whole display space when active. Maybe this can be configured...

Liferay
Again relatively simple to install, but restrictive in terms of layout - I assume you can get down into the depths, but I don't have that kind of time. Seemed to come with a lot of portlets, including the ones I was particularly interested in using. However, some of the important ones didn't work (chat, instant message, meeting room). Refresh rate was a bit slow - default 15 mins - but again, I guess that could be changed...

eXo
This was as easy to install as the others in the first instance when I just got the binary distribution. However, I spent a long time trying to work out how to change the content of the default pages, and was about to give up in despair when I came across a little forum message saying that there was a bug in the current distribution. Thanks for making that obvious, guys! The soution required the building of the jars from scratch which proved to be a lot more difficult. This process first required the installation of Apache maven. This in itself proved difficult because of unsatisfied dependencies. The same sort of thing happened when trying to use maven to build eXo. I ended up scavenging the missing jars from the eXo src distribution (yet another download).
I persevered with eXo because its interface was the most attractive and flexible (in theory). However, a number of problem came up that made me look elsewhere. These and the dependency problems are documented in the next post.

The documentation for all of these systems is sketchy. The only way to really tell what functioanlity is included is to download it an try it out, and that takes a great deal of time. Also, there seems to be a dearth of information about JSR168-compliant portlets that are available to download. There is a project called GEMS at java.net which intends to build up a portlet collection, but there's not much there yet. Perhaps the developers at uPortal, Liferay and eXo could start posting their portlets there...?

I am currently looking at Zope/Plone which is not strictly speaking a J2EE portal, but may well be the easiest option for use in the module. More on this to follow...