deploying Pentaho BI 2.0.0.RC1 on JBoss/MySQL
I'd like to share with you the steps that I needed to take in order to deploy Pentaho BI 2.0.0.RC1 on an existing JBoss 4.2.3.GA server, connected to a MySQL database.
Download and unpack
Download the necessary files from SourceForge (the download area of the Pentaho site doesn't list them):
Unpack the zip files. This results in two directories: biserver-ce and biserver-manual-ce.
Build customized ear file
In order to build an ear file that is customized for Jboss/MySQL, go to the biserver-manual-ce folder. Run "ant -p" to view the project help information. The build targets are shown. Build the JBoss/MySQL target without portal: "ant ear-pentaho-jboss-mysql-no-portal". This results in the file build/pentaho-ears/jboss/no-portal/mysql5/pentaho.ear.
Deploy the pentaho.ear in exploded form
Create a directory pentaho.ear in the deploy directory of the JBoss server. Unpack the pentaho.ear archive in this directory.
Fix the pentaho.ear deployment
Prepare the MySQL database
Configure pentaho
Pentaho is configured using the content of the biserver-ce/pentaho-solutions directory.
Download and unpack
Download the necessary files from SourceForge (the download area of the Pentaho site doesn't list them):
- 2.0.0-RC1-readme_v2.html
- biserver-ce-2.0.0-RC1.zip
- biserver-manual-ce-2.0.0-RC1.zip
Unpack the zip files. This results in two directories: biserver-ce and biserver-manual-ce.
Build customized ear file
In order to build an ear file that is customized for Jboss/MySQL, go to the biserver-manual-ce folder. Run "ant -p" to view the project help information. The build targets are shown. Build the JBoss/MySQL target without portal: "ant ear-pentaho-jboss-mysql-no-portal". This results in the file build/pentaho-ears/jboss/no-portal/mysql5/pentaho.ear.
Deploy the pentaho.ear in exploded form
Create a directory pentaho.ear in the deploy directory of the JBoss server. Unpack the pentaho.ear archive in this directory.
Fix the pentaho.ear deployment
- The file pentaho.war, which is referenced by META-INF/application.xml, is missing in the pentaho.ear directory. Copy this file from biserver-manual-ce/build/pentaho-ears/jboss/no-portal/pentaho.war to the pentaho.ear directory.
- Copy quartz-1.5.2.jar from biserver-manual-ce/pentaho-third-party to the pentaho.ear/lib directory.
- Remove pentaho-vfs-1.0.jar from the lib subdirectory and from META-INF/application.xml. This prevents the error “multiple providers for URL scheme 'solution'” when starting the pentaho application.
- Explode the pentaho.war file into a directory with the same name.
- Go to the folder deploy/pentaho.ear/pentaho.war/WEB-INF. Open the file web.xml and change the solution-path parameter to the absolute path of the folder biserver-ce/pentaho-solutions.
Prepare the MySQL database
- Configure a MySQL process that listens to port 3306.
- Go to the biserver-ce/data subdirectory.
- Edit the file load_sample_users_mysql.sql: change the line that is used to insert a row into the datasource table:
Code:INSERT INTO DATASOURCE VALUES('SampleData',20,'com.mysql.jdbc.Driver',5,'pentaho_user', 'cGFzc3dvcmQ=','jdbc:mysql://localhost:3306/sampledata','select 1 from dual',1000);
- Prepare the MySQL databases by running the sql scripts.
Configure pentaho
Pentaho is configured using the content of the biserver-ce/pentaho-solutions directory.
- Go to the system subdirectory.
- Comment out the versionCheckerSystemListener bean in systemListeners.xml.
- Set the managed property to true in the system/hibernate/hibernate-settings.xml file, and change the config-file property to system/hibernate/hibernate-jboss-managed.xml.
- Edit system/hibernate/hibernate-jboss-managed.xml: add a cache.provider_class property and change the value of the dialect property:
Code:<property name="cache.provider_class">org.hibernate.cache.EhCacheProvider</property> <property name="dialect">org.pentaho.platform.repository.hibernate.MySQL5InnoDBDialect</property>
- Change the dataSource bean in applicationContext-acegi-security-jdbc.xml: change the url to jdbc:mysql://localhost:3306/hibernate, and change the driverclassname to com.mysql.jdbc.Driver.