0

Due to where I work I am mot allowed to use screenshots although it is just one error anyway.

Friday I upgraded to Eclipse 2021-03 and AdoptOpenSDK 16. My main project (ActivePivot webapp) built successfully with Java 8 so I went home all happy and ready to come back Monday for the main plan!

Monday I obtained the vendor's Java11 only libs and added stuff to my repo. I have lots to do for the Java 11 cut but that is another story. (Feel free to tell me to go back to the LTS 11 if this is better although I thought I should be able to have two projects; 1 at 8 and 1 at 11 for time being).

Where I added the newer libs to the repo it obviously broke my Java 8 project. I thought it would be a simple case of just adding version tags for the many libraries/folders but of course, maybe it just me, but I've seen Maven get itself in a right old state before. And it did this time... :)

Eclipse launched the store and suggested I install some stuff to help with the project and it had detected I need Maven Natures. So I went with it. After that I now see this error:

'Could not initialize class org.apache.maven.plugin.war.util.WebappStructureSerializer pom.xml /cacib-activepivot line 1 Maven Configuration Problem'.

Has anyone seen this before? I can't seem to find much on it!

Thanks in advance for your assistance.

Leigh tilleytech.com

TilleyTech
  • 441
  • 5
  • 13
  • 2
    Running Eclipse with Java 16 might cause issues in some plugins because of more stricter permissions. In `eclipse.ini` adding `--illegal-access=permit` should fix that (see e.g. [here](https://stackoverflow.com/a/67430120/6505250)). Eclipse 2021-03 was released at the same time as Java 16 and therefore has no built-in Java 16 support yet. Independent from the Java used to run Eclipse, for using Java 16 in your projects, install [Java 16 Support for Eclipse 2021-03 (4.19)](https://marketplace.eclipse.org/content/java-16-support-eclipse-2021-03-419), but there might plugins left without support – howlger May 19 '21 at 10:12
  • OK thanks I will check that. Iguess I was being a bit cavalier and jumping right to the latest without checking compatibility etc! :) – TilleyTech May 19 '21 at 11:14
  • @howlger - Thanks I downloaded AdoptOpenJDK 11 LTS as for the vendor supplied code I only need 11 really. And now the above error is gone and I can focus on getting the 8 and 11 projects and their respective POMs working! I can't vote for your answer as it's just a comment but thanks! :) – TilleyTech May 19 '21 at 13:49
  • Oh wow, can you believe that there is a bug in the UI of Eclipse 2021-03 for facets? So the project was getting stuck and mentioned Facets which ive never had to change before. So I found it, set at 11, tried to change it to 1.8 and I got an index out of bounds type error. I then learnt about the facets xml and changed it there to 1.8 and rebooted Eclipse! – TilleyTech May 20 '21 at 09:39
  • Re the Facets error, for the first time in my life I just submitted to Bugzilla - Bug 573661 – TilleyTech May 20 '21 at 10:03

1 Answers1

3

Eclipse 2021-03 was released at the same time as Java 16 and therefore has no built-in Java 16 support yet and was only able to be tested with early-access builds of Java 16.

Running Eclipse with Java 16 might cause issues in some plugins because of more stricter permissions in Java 16:

In eclipse.ini adding --illegal-access=permit should fix that (see e.g. here).

For using Java 16 in your projects (which is independent from the Java used to run Eclipse), install Java 16 Support for Eclipse 2021-03 (4.19), try a developer build or wait for Eclipse 2020-06, which will be released on 16 Juni, 2021. Also make sure that additionally installed plugins are up to date.

howlger
  • 31,050
  • 11
  • 59
  • 99
  • 1
    Hey, great thx for the follow up so I could mark it as the answer. For now I've gone for AdoptOpenJDK 11 LTS, and along with the facets stuff I commented on above, the 1.8 project is now building. I will now look at the Java 11 project. I will bear in mind and download the support for 16 component you mentioned for when I use the installed 16 later. ;) – TilleyTech May 20 '21 at 14:52