Fixing the JKE Banking Sample Build

I ran into an issue related to the JKE Banking Sample application that ships with ELM beginning of this year. I ran into the same issue again. Here is what happens and how to fix it for and for 7.0.

I use the JKE Banking Sample for presenting ELM and for a variety of other reasons that require to look deeper into ELM and how the Jazz tools work and interact. When I start looking into newer versions, I usually install a local test environment first and deploy the JKE Banking Sample. I also define build engines that allow me to test and demonstrate EWM/RTC build. I installed the environment. When I tried to set up build, I ran into an issue. The build was failing with an error “The type java.util.Map$Entry cannot be resolved.” for unknown reasons. I found the issue and published how to solve it in this forum post. I created defect 500981 to address the issue.

The problem was the Eclipse JDT Core Batch Compiler (ECJ) that ships with the sample code was outdated and needed to be replaced with a newer version.

Recently I set up ELM 7.0.0 on my machine and I ran into the same issue.

As explained in the forum post above, I replace the ECJ Compiler with a current version. See Defect 500981 and .

Download the ECJ here: I chose that version because it is the same version the RTC Eclipse client is shipped with (zip version).

In the JKE Banking example load a repository workspace to disk.  Load the component Build. In the project JKEBuildScripts open the folder libs.

  1. Put the ecj-4.6.3.jar into the folder. Remove the file ecj-3.5.2.jar 
  2. Checkin the changes.
  3. In the Build definition go to the Ant tab. If the ANT argument refers to the old ecj-3.5.2.jar, rename the ant arguments to use the new version: -lib ${outputRootDirectory}\${buildLabel}\JKEBuildScripts\libs\ecj-4.6.3.jar
  4. Test the change fixes the problem by running a personal build against that repository workspace. 
New ECJ version uploaded.

See the fixed ANT Build Tab of the build definition to refer to the new compiler name in the ANT arguments section.

Ant arguments referring to the correct ECJ compiler.

But replacing the ECJ with a new version did not fix the issue entirely. After a while of trying to solve the issue, it became apparent that somehow the ANT build script was not matching the name for some of the libraries that ship with the sample code. The ANT file referenced file names that had been replaced by libraries that had different versions and different file names. Somehow this was overlooked.

So, in addition to changing the version of the ECJ as described in the link above, It is also necessary to change the line that creates the classpath for building in the build.xml highlighted above to

<property name="classpath" value="${applibsdir}/derby.jar;${applibsdir}/swt-win32-win32-x86/swt.jar;${applibsdir}/junit.jar;${applibsdir}/;${applibsdir}/jetty-server-9.4.19.v20190610.jar;${applibsdir}/jetty-util-9.4.19.v20190610.jar;${applibsdir}/jetty-servlet-9.4.19.v20190610.jar;"/>

Please note the name difference for the Jetty related files. Here the location in the build file.

Please make sure to check in and deliver all the changes to the component Build of the stream you are working on. Create a baseline for the component Build. Replace the component Build in the other streams with the new component baseline.

Please also make sure to correct the name of the ECJ in the ANT arguments on the ANT Tab for all ANT Build definitions.

Now the builds should work again.

There is work under way to fix this and potentially ship a backport. See defect 515939.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.