Pentaho Migration 5.1 to 5.2 [Almost Working]

This are not the final instructions, but they will allow you to test the new server with your content and data as you have them now.

—————————————————————————————————————

This are the steps I took for my Pentaho 5.0 to 5.1 and 5.1 to 5.2 upgrades. My installation uses MySql for hibernate, quartz and business databases and I keep the Jackrabbit repository on filesystem. The steps are the same on Linux and Windows.

First Part: Install New Software

  1. Make an inventory: Marketplace, Config (datasources), Reports [That’s optional].
  2. Stop the Pentaho service.
  3. Rename your folder with the current version to something like ‘Pentaho5-old’.
  4. Create a new Pentaho5 directory an unzip your BI Apps into that folder, then:
    • For Pentaho Report Designer:
      1. Rename the folder to report-designer as it used to be named.
      2. Copy your development folder from the ‘backup’.
      3. Also copy your DB drivers: mysql-connector-java-5.1.17.jar, ojdbc14.jar, orai18n.jar, -IT is using Oracle 9, and still works- from your backup to report-designer/lib/jdbc
    • For PDI/Kettle
      1. Copy your development folder from the backup.
      2. Copy your DB drivers (mysql-connector-java-5.1.17.jar, ojdbc14.jar, orai18n.jar) from your backup to data-integration/bin.
    • For the BI Server itself:
      1. Copy your DB drivers -other than MySql- (ojdbc14.jar, orai18n.jar) from your backup folder to biserver-ce/tomcat\lib
  5. Start your demo:
    ./start-pentaho.sh
    Check out what’s new at http://localhost:8080/pentaho
    The Marketplace throwed several connection errors, until it was succesfull.
  6. Stop the server:
    ./stop-pentaho.sh

Second Part: Modify Configuration Files

Compare your config files before copying them, and verify they are in utf-8 format. Remember that you have the backup folder and you only need to rename it to recover to a working system.

  1. Delete the file
    biserver-ce/tomcat/conf/Catalina/localhost/pentaho.xml
    It will be created as a copy from the one you edit in point 2
  2. Copy
    biserver-ce/tomcat/webapps/pentaho/META-INF/context.xml
    mine has MySql connection strings already
  3. Copy
    biserver-ce/tomcat/webapps/pentaho/WEB-INF/web.xml
    Only needed changes on line 73 and 205, to comment HSQLDB from starting
    and:
    At line 539 change your session-timeout. Its’ in seconds, I use: 180
  4. Copy
    biserver-ce/pentaho-solutions/system/hibernate/hibernate-settings.xml
    The only change is to replace mysql: mysql5.hibernate.cfg.xml
  5. Copy jindi datasources:
    biserver-ce/pentaho-solutions/system/simple-jndi/jdbc.properties
  6. Copy MySql config for Hibernate:
    biserver-ce/pentaho-solutions/system/applicationContext-spring-security-hibernate.properties
  7. Copy
    biserver-ce/pentaho-solutions/system/applicationContext-spring-security-jdbc.properties
    It contains:

    datasource.driver.classname=com.mysql.jdbc.Driver
    datasource.url=jdbc:mysql://localhost:3306/hibernate
    datasource.username=hibuser
    datasource.password=password
    datasource.validation.query=SELECT 1
  8. Copy
    biserver-ce/pentaho-solutions/system/pentaho.xml
    I changed:

    SampleData
    localhost
    MySql
    3306
    pentaho_user
    password
    select 1

    And turn off the default users select combo at login page (that should be disabled in your administration console) in line 20:

    <login-show-sample-users-hint>false</login-show-sample-users-hint>
  9. This is where I had trouble:
    This didn’t work: I first ran the update on
    biserver-ce/data/mysql5/create_quartz_mysql.sql
    to make shure I had de correct quartz5 prefixed tables, then created upper/lower cased tables, tables, deleted conten on different folders, and so on. But ran on errors at startup about listener problems:

    1. Cannot create JDBC driver of class
    2. SystemListener.xml
    3. EmbeddedQuartzSystemListener.ERROR_0007_SQLERROR
    4. PentahoSystem.ERROR_0014 org.pentaho.platform.scheduler2.quartz.EmbeddedQuartzSystemListener
      with no luck on making it work.

    This did work

    1. Dropping the quartz database and ran the SQL script at:
      biserver-ce/data/create_quartz_mysql.sql
      that creates qrtz5_ prefixed tables and also updates user permissions.
    2. Modified as suggested in the script:
      biserver-ce/pentaho-solutions/system/quartz.properties
      that’s the quartz config, to:

      org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
    3. [skip this one, Marcelo suggested a better option]
      Edit biserver-ce/pentaho-solutions/system/systemListeners.xml and stopped Quartz Listener from runnig. That is the problem with this instructions: your system won’t be able to schedule jobs as it is:

      <!--bean id="quartzSystemListener" class="org.pentaho.platform.scheduler2.quartz.EmbeddedQuartzSystemListener" /-->
    4. Move to a backup folder -away from Pentaho- the following file:
       biserver-ce/tomcat/webapps/pentaho/WEB-INF/lib/pentaho-hadoop-hive-jdbc-shim-5.2.0.0-209.jar

Part Three: Move in Your Content

  1. Copy your content from your backup folder in
    biserver-ce/pentaho-solutions
    This is where I keep my .xmi, .mondrian.xml files and solution folders
  2. Delete and then replace your repository folder:
    biserver-ce/pentaho-solutions/system/jackrabbit
  3. Start your server. Clear your browser’s cache, reset your pentaho solutions and reload.

Part Four: Apply your Look and Feel

To finish

  1. Copy your images, .html , messages files with your modifications from your backup folder to the new one. There is a previous checklist.
    Note: Had only to modify directly the .properties files (insted of the _es.properties) on biserver-ce/tomcat/webapps/pentaho/mantle/ (browser & home/properties) for my localized text as the i18n calls didn’t work for the left panels.
  2. Update your plugins on the marketplace

Now you can try your new and beautifull NEW 5.2 BI system.

———————————

Notes on the 5.2 – MySql – Quartz Problem

There are some Quartz listener/socket problems reported since v3.6, but every recomendation on forums or blogs hasn’t worked so far. The error is present on windows/ubuntu, java 32/64 bits, mysql/mariadb.

This is what I found so far:

  1. The problem is not IN the database as no query appears on the MySql general log, until the Pentaho shows the problem.
  2. The 1st error in the log makes me think of a Tomcat config problem :
    eduler2.quartz.EmbeddedQuartzSystemListener
    EmbeddedQuartzSystemListener.ERROR_0007_SQLERROR
    Cannot create JDBC driver of class ‘com.mysql.jdbc.Driver’ for connect URL ‘jdbc:mysql://localhost:3306/quartz’
  3. The diff in config files shows more classes on the new version, but the driver configurations remais the same

Notes on 5.x Migration

BI projects in Mexico have been slow for me so I haven’t posted much information lately. But the release of 5.1 CE in par with the EE version deserves a mention and a post.

Moreover since webdetails has made Dashboards development something doable interactively, coherent and documented but at the same time a nightmare for each time you upgarade their ctools plugins an improvement on them messes up your dashboard’s looks.

Well, I have just upgrated with the CE release from 5.01 to 5.1 and kudos for making that an easy job. Thanks for thinking on us that can only use Open Source products.


Notes on the 5.x version

For years from 2.5 up to 4.8 version the BI Server, the link between the individual Pentaho projects was guided by a Pentaho team, but somehow decided to unload the web project to a new partner for for the 5.01 release.

So some changes on its infrastructure were expected, this is what I have notice so far:

  • The repository (a fancy way to describe the pentaho-solutions folder on the CE standar edition) was migrated to a encrypted structure on the pentaho-solutions/system that you can set on folder or in a database.
    So now you have to ‘upload’ some of your files to this structure like reports, resources (images, css) so they can be found by the BI web server. Some others like the .ktr transformations can still live on normal files, it depends on how you code the paths on your programs. I like this as version control can be maintained on them.
    The users, new roles and datasources have also been moved from a database to the Jackrabit Content Repository (JCR).
    All the administration can be done from the BI web server.
  • The important configuration files retain their functionallity and location, but others are being taken to pieces or relocated so they can be consolidated on new ones.
    They are being commented so the inconvenience is minimal.
  • The console or web interface has a new paradigm, so you and your users will need a video or a presentation to get full use of it. Navigation between browsing programs, results, administration or home page is controlled by a selector on your upper left insted of the older tabbed interface.
  • Most of your development will need to be done or maintened.
    The sequencing actions (.xactions) files are deprecated and can be migrated once you know to:
    – Edit them without special characters (use unicode) speccially in the name.
    – Save them in UTF-8 or cant be uploaded.
    – Change <viewer>Pivot</viewer> to <viewer>plugin/jpivot/Pivot</viewer>
    – Change <model><![CDATA[solution:your-path/your-model.mondrian.xml]]></model>
    to <model><![CDATA[mondrian:/your-model]]></model>.
    Note: You have to upload the model to the repository. You browse to your folder on the web UI and click on upload.
    – The Design Studio is no longer maintained and a text editor can be used
  • The Report Designer has new attributes and quirks but its ok. Now you can ‘publish’ yor reports to your server.
    I used to specify which formats could the user select for output on a parameter, now is a default and you can select a default on the PRD.
  • The Metadata editor can read the models and publish them to the BI server too.
  • Once you save a .ktr file you won’t be allowed to read it in the olver PDI version.
  • What I miss is the Saiku Reporter as it has not been migrated yet.
    Those programs and the ones on Ad-hoc queries (now on WAQR plugin on the marketplace) had to be built from scratch so documentation of your site is very important on this migration.
  • The changes on CDE are many, really, many things have changed: The protovis library it uses has been deprecated, the version changed from 1.0 to 2.0 as a result interface fields have changed and a few don’t work as advertised. Check next section so you’ll be warned.

Dashboard Changes

Graphical representation is a key in information visualization, to make graph libraries present the way you desire you need documentation.

The webdetails site has good documentation on the CDE to get started but some later changes are not explained for ‘advanced topics’. you’ll need to browse the protovis site or look for tips like this one on vesion changes Main_Changes_New_Features_CCC_v2.

Some changes are minimal, as an example, you used to set an extension point as a pair: pie_innerRadius,50. Now you use: slice_innerRadiusEx,50%. You can see that you will need lots of time to make your dashboard behave like it used to.

Other point of difficulty are functions and how you pass a parameter, You used to format a tooltip:

function f(value){return ('$'+sprintf("%.1f", value)+'m')}

now you pass an object and has to specify the full path:

function f(scene){
    return ('Puesto '+scene.vars.category.value+' , con '+scene.vars.value.value+' personas');
}

The problem is that the object has a few variations and can be navigated on some others.

Tip: The code to trigger a change on a click change from:

function d(a,b,c){ updateParamFunc("PARAM_MARKET", b) }

to

function d(scene){ updateParamFunc("PARAM_MARKET", scene.vars.category.value) }

Heres an article on the pentaho forum that talks about extension points.

I noticed also than table rendering has changed from 5.01 to 5.1, now its better as has several divs to control format but you will have to use your firebug plugin to tame them with .css files (that has to be uploaded to the repository).