I thought I would post some of the blockers and solutions I came across when trying to get CBF (Community Build Framework) running. It took a while to get CBF running smoothly but in the long run the effort was worth it.

My client required 3 BA servers (standard setup):
  1. Development
  2. Staging
  3. Production

They also wanted a white label BA server to run on/with the following:
  • Debian 6
  • PostgreSQL 8.4
  • Custom Login.jsp (not part of this post)
  • Custom theme (not part of this post)
  • No samples (not part of this post)

There are various threads, blog articles and the CBF website itself which can guide you on your installation/configuration of CBF but here are links which I found the most helpful:

So lets get started


You will need to make sure you have the following installed/configured:
  • Oracle (Sun) Java 6
  • Apache Ant (Latest stable release)
  • Apache Ant Ivy (Latest stable release)
  • xmltask.jar
  • Apache Tomcat 6.0.36
  • Subversion (Latest stable release)
  • CBF 5.7

Oracle (Sun) Java 6
$ sudo vi /etc/apt/sources.list
# add the line below
deb squeeze main non-free
$ sudo apt-get update
$ sudo apt-get install sun-java6-bin sun-java6-javadb sun-java6-jdk sun-java6-plugin
$ java -version
# output on your java version etc.
$ export JAVA_HOME=/usr/lib/jvm/java-6-sun
(Probably best to add your environment variables to your bash script)

Apache Ant v1.8.4
$ wget
$ tar -xvf apache-ant-1.8.4-bin.tar.gz
$ sudo mv apache-ant-1.8.4 /usr/share/
# create a symbolic link
$ sudo ln -s /usr/share/ant/bin/ant /usr/bin/ant
$ ant -version
# output on your apache ant version etc.
$ cd /usr/local/ant/
# grab apache ant dependencies
$ ant -f fetch.xml -Ddest=user
$ export ANT_HOME=/usr/share/apache-ant-1.8.4
(Probably best to add your environment variables to your bash script)

Apache Ant Ivy v2.3.0 and xmltask.jar
$ wget
$ tar -xvf apache-ivy-2.3.0-bin.tar.gz
$ cd apache-ivy-2.3.0
$ cp ivy-2.3.0.jar /usr/share/ant/
$ cd /usr/share/ant/
$ ant -f fetch.xml -Ddest=user
$ cd ~/.ant/lib
# need to get xmltask.jar
$ wget --no-check-certificate
$ mv download xmltask.jar
$ cd /usr/share/ant/
$ ant -f fetch.xml -Ddest=user

$ sudo apt-get install subversion

Apache Tomcat v6.0.36

$ wget
$ tar -xvf apache-tomcat-6.0.36.tar.gz
(Remember this location of Apache Tomcat as we will need to put it into our CBF folder later on.)


Now its time to get started with CBF. The first step is to create the skeleton directory structure, I won't go into too much detail about what each directory does etc. (it is all on the webdetails website). As an example this is what mine looked like:

Before I look at the project-development directory (where the magic occurs) lets grab some needed files/folders/packages before continuing.

CBF 5.7
$cd cbf
$wget --no-check-certificate
$cd cbf
$svn co ./pentaho-4.8/
Apache Tomcat
$cd cbf
$mv ../apache-tomcat-6.0.36 ./tomcat
project-* (project-development)
The project-* (in this example project-development) contains your build properties, patches and solutions necessary for your BA server. As I said above I won't go into too much detail but here is what my project-development looks like (I have also attached a copy of it if anyone wants it):

├── config
│   ├──
│   └──
├── patches
│   ├── project-development
│   │   └── solution
│   │       └── system
│   │           ├──
│   │           ├── applicationContext-spring-security-hibernate.xml
│   │           ├── hibernate
│   │           │   ├── hibernate-settings.xml
│   │           │   └── postgresql.hibernate.cfg.xml
│   │           ├── quartz
│   │           │   └──
│   │           └── simple-jndi
│   │               └──
│   ├── target-build
│   │   └── bi-platform-assembly
│   │       └── build-res
│   │           └── assembly_shared.xml
│   └── target-dist
│       ├── administration-console
│       │   └── jdbc
│       │       └── postgresql-9.2-1002.jdbc3.jar
│       └── server
│           ├── conf
│           │   └── Catalina
│           │       └── localhost
│           │           └── pentaho.xml
│           ├── lib
│           │   └── postgresql-9.2-1002.jdbc3.jar
│           └── webapps
│               ├── host-manager
│               ├── manager
│               └── pentaho
│                   ├── META-INF
│                   │   └── context.xml
│                   └── WEB-INF
│                       └── web.xml
└── solution
So there are some files/folders which aren't part of any of the tutorials that I have seen (maybe someone who uses CBF often can chime in to why or if they have fixes to how I don't need to use them), so here is an explanation as to why I added them in (these are in italics).


I kept getting this error message:

/home/pentaho/work/cbf/build.xml:291: The following error occurred while executing this line:
/home/pentaho/work/cbf/target-build/bi-platform-assembly/build-res/assembly_shared.xml:19:  !!! Blacklisted class javax.servlet.Servlet found in a retrieved jar .   Assembly cannot proceed !!!
Apparently this shouldn't be happening but to get around this I added a new file (as a patch - CBF magic!) which had the following argument added (in bold):

<available property="Servlet.class.present" classname="javax.servlet.Servlet" ignoresystemclasses="true">
host-manager/ and manager/

For some bizzarre reason when I went to run a new build I received the follow error:

SEVERE: Error starting static Resources java.lang.IllegalArgumentException: Document base [..]webapps\host-manager does not exist or is not a readable directory
To fix this I just went ahead and copied the host-manager and manager (not sure if this was needed but did it in case) to the directory listed above as a patch.

For those that don't want to download the attachment here is my

javac.path = /usr/lib/jvm/java-6-sun/bin
solution.path = /home/prashant/cbf/project-development/solution
copy.pentaho.samples = true = tomcat
tomcat.path = /home/prashant/cbf/tomcat/
java.opts = -Dfile.encoding=utf-8 -Xmx512m -XX:MaxPermSize=512m -Xrunjdwp:transport=dt_socket,address=8765,server=y,suspend=n
pentaho.dir = pentaho-4.8/ = target-build/
I should have a lot more in here i.e. database connection settings etc. but this was just a quick and dirty to see if I could get this working.

Finally all you have to do is:

ant -Dproject=development -Denv=prashant dist-clean all run
I should put this together as a blog post and go through the finer details i.e. database connection variables and changing the theme, login page and removing samples but hopefully this helps a potential CBF'er, I mean Community Build Frameworker :P.