It's all about the answers!

Ask a question

JKE Banking sample builds failing with "The type java.util.Map$Entry cannot be resolved." for unknown reasons. Any idea how to fix it?


0
1
Ralph Schoon (63.1k33646) | asked Mar 09 '20, 12:40 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Mar 09 '20, 12:41 p.m.
Hi,

I had to install ELM 6.0.6.1 for demo purposes.
The EWM/RTC and the other servers uses the java VM that is shipped with the product. All is vanilla, no patches etc. installed.
I had this version running in the past as well.

I installed the 6.0.6.1 RTC CLient (zip version).
The related Jazz Build engine is also installed (zip version).

They come with their own Java Runtime which I used.

I am trying to get the JKE Banking sample builds to run. Unfortunately they fail with several compiler errors. Typically the compiler complains not to be able to find some very basic classes. For example:

   [javac] Compiling 45 source files to C:\ELM2019\6.0.6.1\jazz\buildsystem\buildengine\eclipse\JKEBuild\I20200309-1515\build\bin
    [javac] ----------
    [javac] 1. ERROR in C:\ELM2019\6.0.6.1\jazz\buildsystem\buildengine\eclipse\JKEBuild\I20200309-1515\JKEBusinessData\src\com\jke\beans\AccountBean.java (at line 112)
    [javac]     accountObj.put("accountNumber", new Long(getAccountNumber()));
    [javac]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [javac] The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files


I had this working in the past. It works in Eclipse with the shipped and the 1.8 JRE/JDK.
One suggestion I found in the internet was to try using to use Java 7 instead of Java 8.
It seems to become very hard to get a Java 7 version from anywhere. I will continue to look into this. In case someone has an idea what is going wrong, please share. Thanks.

Accepted answer


permanent link
Ralph Schoon (63.1k33646) | answered Mar 10 '20, 3:48 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Mar 10 '20, 4:28 a.m.

 I found out that I had to replace the Eclipse Core Batch Java compiler ECJ with a newer version.

  
Download the ECJ: https://archive.eclipse.org/eclipse/downloads/drops4/R-4.6.3-201703010400/download.php?dropFile=ecj-4.6.3.jar. 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 component Build. 
In the project JKEBuildScripts open the folder libs.

Option 1:  
  1. Replace the ecj-3.5.2.jar with the new file ecj-4.6.3.jar, keeping the file name. 
  2. Checkin and test the change fixes the problem. 
  3. Deliver the changes to the stream. Create a component baseline.  
  4. Replace the component Build for all active streams that use baseline Iteration 1 with the newest version. 

Option 2:
  1. Put the ecj-4.6.3.jar into the folder. Remove the file ecj-3.5.2.jar 
  2. In the Build definition go to the Ant tab. If the 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
  3. Checkin and test the change fixes the problem. 
  4. Deliver the changes to the stream. Create a component baseline. 
  5. Replace the component Build for all active streams with the newest version. 
  6. Fix all build definitions that use the ANT build and the ECJ as described in step 2.  

Ralph Schoon selected this answer as the correct answer

Comments
Ralph Schoon commented Mar 10 '20, 5:35 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.