Friday, February 4, 2011

UnsupportedClassVersionError of the OracleDriver when installing Quickr 8.5 on WebSphere Portal

When you want to install IBM Lotus Quickr 8.5 with oracle as an underlying database, you have to specify the driver jar file in the installation wizard.

Now the funny part is that the installation wizard runs with java 6 jre, and will only accept the ojdbc6.jar file (the drivers compiled with java 6) for the drivers. When the ojdbc5.jar is selected, the wizard pops up an error message.

The installation will fail later on with this message in wpinstall.log:
(Feb 2, 2011 2:38:00 PM), Quickr.install, com.ibm.wps.install.ExternalCommandAction$OutputWatcher, msg2, StdOut:      [echo] domain       'release'
(Feb 2, 2011 2:38:00 PM), Quickr.install, com.ibm.wps.install.ExternalCommandAction$OutputWatcher, msg2, StdOut:      [echo] DbtDbDriver  'oracle.jdbc.OracleDriver'
(Feb 2, 2011 2:38:00 PM), Quickr.install, com.ibm.wps.install.ExternalCommandAction$OutputWatcher, msg2, StdOut:      [echo] DbtDbLibrary 'C:/drivers/oracle/ojdbc5.jar'
(Feb 2, 2011 2:38:00 PM), Quickr.install, com.ibm.wps.install.ExternalCommandAction$OutputWatcher, msg2, StdOut:      [echo] DbtDbUser    'quickr'
(Feb 2, 2011 2:38:00 PM), Quickr.install, com.ibm.wps.install.ExternalCommandAction$OutputWatcher, msg2, StdOut:      [echo] DbtDbUrl     'jdbc:oracle:thin:@localhost:1521:QUICKR'
(Feb 2, 2011 2:38:00 PM), Quickr.install, com.ibm.wps.install.ExternalCommandAction$OutputWatcher, msg2, StdOut:      [echo] DbtDbName    'QUICKR'
(Feb 2, 2011 2:38:00 PM), Quickr.install, com.ibm.wps.install.ExternalCommandAction$OutputWatcher, msg2, StdOut:      [java] Exception in thread "main" java.lang.UnsupportedClassVersionError: (oracle/jdbc/OracleDriver) bad major version at offset=6

 This clearly indicates that te OracleDriver class is not of the desired version. The underlying WebSphere Portal for the Quickr will use a java 5 runtime.

Now how can we use the ojdbc5.jar driver package during the installation? A good ol' switcheroo of files will do the trick! Rename the ojdbc6.jar driver to ojdbc5.jar, select that file in the wizard, and when you arrive on the summary screen of the wizard (before the installation starts), you replace the renamed ojdbc5.jar by the real ojdbc5.jar.

We fooled the wizard, the installer will use the correct oracle drivers.

Wednesday, December 22, 2010

Modelling in WebSphere Lombardi: parallel paths and tokens

When modelling a process in the Lombardi authoring environment, it is possible that different paths are executed in parallel.
You can implement this using a gateway, as done here:

Running this process, will result in three process threads. In Lombardi they call these threads "tokens".
Using the inspector, the different tokens are visualized with red markers:
  (there is a bug here, activity 3 has no red marker, while it should have).

And you can see the different tokens in the execution state view:

 A process will end, when all tokens have finished an End Event, or when one token reaches a Terminate Event.

There are other ways to create and finish tokens. Using Intermediate Message Events you can start a new token somewhere else in your process, while releasing or not releasing previous tokens.

In this next example, an Intermediate Message Event will create an extra thread. If the "Close Attached Activity" property is not checked, the token in activity 1 will not move to activity 2 when the message arrives, but a second token will be created. This second token will move along the wire to activity 2.
If the "Close Attached Activity" is checked, the token will move along the wire. No new tokens will be created.

This is the result when testing this process in the Inspector:
When in activity 1, the message was sent. A new token moved to activity 2, the token that was at activity one stayed there. Again, there should be another red marker for the token in activity 1.