JKE Banking sample builds failing with "The type java.util.Map$Entry cannot be resolved." for unknown reasons. Any idea how to fix it?
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
I found out that I had to replace the Eclipse Core Batch Java compiler ECJ with a newer version.
- Replace the ecj-3.5.2.jar with the new file ecj-4.6.3.jar, keeping the file name.
- Checkin and test the change fixes the problem.
- Deliver the changes to the stream. Create a component baseline.
- Replace the component Build for all active streams that use baseline Iteration 1 with the newest version.
- Put the ecj-4.6.3.jar into the folder. Remove the file ecj-3.5.2.jar
- 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
- Checkin and test the change fixes the problem.
- Deliver the changes to the stream. Create a component baseline.
- Replace the component Build for all active streams with the newest version.
- Fix all build definitions that use the ANT build and the ECJ as described in step 2.