Building eXo Portal with JDK 6 and JOnAS 5.0.2
Hacking eXo Portal to use JOnAS 5 and JDK 6
This page is wrote on 2008/04/09, and at this date, eXo Portal is not yet compatible with JOnAS 5.
First of all, I'm neither a member of JOnAS team, nor eXo Team... just a poor lonesome "warrior" struggling for a working eXo Portal under JOnAS !
Thanks to members of each teams, and individual subscribers of the lists in helping me to do that work.
The script below indends to hack some files in eXo repository, in order to make it build eXo's EAR. At this time, the EAR is build, but there's some unknown dependancies in eXo code which make the EAR deployment fails.
So some adaptation may be used on earlier versions of eXo Portal... I hope it would be soon unecessary !
The script
See the file attached
Its usage is :
example :
This script pretends to find in $1 those files :
- apache-maven-2.0.8-bin.tar.bz2
- exoportal_src.tbz2 : source files checkout from eXo SVN repository
- jdk-6u5-linux-i586.bin
- jonas-osgi-5.0.2-bin.tar.gz
- usr/exo/java/exo-working/exo-jonas/unix/eXo.sh : the file to replace further (directory tree needed)
Please note that there may be a bug if you add "/" add the end of specified directories. Script is still aplha....quickly written ...
Quickly explained
Starting from eXo WIKI, I've adopted another directory structure, very close from eXo's WIKI :
java/
exo-dependencies/
jonas
repository
exo-working/
exo-jonas/
java
maven
softs/
apache-maven-2.0.8/
eXoProjects/
jdk1.6.0_05/
jonas-osgi-5.0.2/
Here's a short explanation :
Directory | What's for ? |
---|---|
/usr/exo/java/exo-dependencies/jonas | is a symlink to /usr/exo/softs/jonas-osgi-5.0.2 |
/usr/exo/java/exo-dependencies/repository | is the directory where maven puts eXo's stuff while building |
/usr/exo/java/exo-working/exo-jonas | is a the final directory where everything is build |
/usr/exo/java/java | is a symlink to /usr/exo/softs/jdk1.6.0_05 |
/usr/exo/java/maven | is a symlink to /usr/exo/softs/apache-maven-2.0.8 |
Plese note all those directories are setup in the script !
What it does ?
Please note also that at the moment, the installation script does not ends because of my lacks in Bash programming ; you must finish manually the process :
exobuild --product=portal --build --deploy=jonas 2>&1> exobuild.log
cd $EXO_DEST_DIR/java/exo-working/exo-jonas/bin
cp $EXO_SRC_DIR/`pwd`/unix/eXo.sh unix/eXo.sh
ln -s unix/eXo.sh
chmod +x eXo.sh jonas setenv unix/*.sh
You see that the installation scripts replace /usr/exo/java/exo-working/exo-jonas/bin/unix/eXo.sh original file by another made by my 10 fingers that you'll can find
. I think this script is more convenient.When build finished, you'll find a working JOnAS environment in /usr/exo/java/exo-working/exo-jonas.
Running JOnAS IS working
BUT there is at this moment some things that I can't explain (waiting for exo mailing list's answer...)
First :
java.lang.RuntimeException: Cannot instantiate component
class org.exoplatform.services.scheduler.impl.QuartzSheduler
[...]
Caused by: java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method
"org.quartz.impl.StdScheduler.setJobFactory(Lorg/quartz/spi/JobFactoryV" the
class loader (instance of org/ow2/easybeans/loader/EasyBeansClassLoader) of
the current class,
org/quartz/impl/StdScheduler, and the class loader
(instance of org/apache/felix/framework/searchpolicy/ContentClassLoader) for interface org/quartz/Scheduler have different
Class objects for the type org/quartz/spi/JobFactory used in the signature
Second :
ERROR: cannot create portal container. ServletContext: org.apache.catalina.core.ApplicationContextFacade@48c85b
java.lang.RuntimeException: Cannot instantiate component class
org.exoplatform.services.jcr.ext.hierarchy.impl.NodeHierarchyCreatorImpl
[...]
Caused by: java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSourceFactory
Third :
java.lang.NullPointerException
at org.exoplatform.portal.application.PortalController.init(PortalController.java:67)
Fourth : (happened more than one time)
class org.exoplatform.services.portletcontainer.impl.servlet.PortletApplicationListener
java.lang.NoClassDefFoundError: com/sun/org/apache/xerces/internal/dom/DOMInputImpl
[...]
Caused by: java.lang.ClassNotFoundException: com.sun.org.apache.xerces.internal.dom.DOMInputImpl
Fitfh : (happened more than one time)
java.lang.NullPointerException
at org.exoplatform.portal.webui.skin.SkinService.processMergeRecursively(SkinService.java:155)
Sixth :
java.lang.IncompatibleClassChangeError: Implementing class
So this work is still in progress !
I'll update this wiki as soon as my work will go furher...
Steph33560, le 9 avril 2008
- Project
- Demos
- Services
- Documentation
- Downloads
- Community
- Developers