- This topic has 10 replies, 3 voices, and was last updated 3 years, 2 months ago by Brian Fernandes.
-
AuthorPosts
-
stchadParticipantHello,
I have a new laptop i have loaded MYE 2021 on and trying to get the application we are in a POC running along with using the Angular aspect that is still supported thankfully.The app is java 1.8 still. I had a java/annotation/processing/AbscractProcessor error I posted almost 2 years ago for another NYC banking project that told me to mod the .ini file to point to jdk1.8 instead of 11. I used the same solution to start this POC. But now the 2021 .ini file seems to have a configuration folder that ends logging an error.
I am attaching the orig .ini file you have on install, the modified .ini file of the original one that I did in the MYE 2020 and then the log file I found in the configuration folder…. again in 2020 there was not a configuration folder present in the .ini
Overall, I am looking to add Lombok, increase some memory size, and start the MYE2021 with 1.8 and not 11.
Thanks for any immediate help – very appreciated. Excited to see this working smoothly into one IDE as previous I kept MYE running for Spring Boot App and then used AngularIDE for the front end in separate processes on the box.
Best,
Scott
support-swapnaModeratorScott,
Sorry that you are seeing this issue. Firstly, MyEclipse 2021 requires Java 11 or higher version to start. It will not start with Java 8.
1. Is the app a Maven based one?’ Can you please go to Preferences > Maven and change the JDK specified there to Java 8, and restart – does this help?
2. Not sure if you have tried it earlier, but Brian in his previous response mentioned about the alternative way of fixing this would be to examine the libraries in your project to see which one is causing this issue as discussed here : https://stackoverflow.com/questions/48238014/how-can-be-solved-java-lang-noclassdeffounderror-javax-annotation-generated
3. Have you added the Lombok jar to the project? Similar issue with steps to fix in Eclipse for older version of Lombok jars is discussed here : https://github.com/redhat-developer/vscode-java/issues/580#issuecomment-443302372
You can apply the same in MyEclipse and check if it helps.If none of the suggestions help, then can you please create a smaller test project which exhibits the problem and share that with us to help us investigate further?
–Swapna
Genuitec Support
stchadParticipantHi there – thank you for getting back to me so quickly.
Last time I tried the ini changes and they worked like a charm. I actually modified these two entries (in addition to adding Lombok) and things compiled and exeecuted. I see the .ini files uploaded you may not have gotten. I will paste them below.
First you are saying that as opposed to 2020 install, 2021 needs Java11 to run. That means these two entries in the .ini file cannot be this but the original during install, is this correct?? I will try to revert to 11
1). -vm C:\Program Files\Java\jdk1.8.0_261\bin\javaw.exe
2). -Dosgi.requiredJavaVersion=1.8I could not tell if the Lombok worked as it never opened generating the log file.
This is how it was set up in the past (2020), I am assuming it should work as well.-vmargs
-javaagent:lombok.jar
-Xbootclasspath/a:lombok.jar*lombok.jar is in install dir with .ini
Let me try your suggestion – of reverting the ini to 11 and ensuring maven prefs remain set to 1.8 and see if that does it.
Many thanks Swapna
support-swapnaModerator
stchadParticipantI reverted to launching with Java 11. I also tried to add the java annotation to my pom (#2 what Brian suggested) and as an external jar file on the project build path.
What happens is when I have the project -> Build Automatically selected/checked, the MYE environment will begin the build process and constantly loops in the ide with the detail error of “An Internal Error Occurred during validating <project>” javax/annotation/processing/AbstractProcessor”
The build process loops and sticks on a percentage at the bottom right (29%).
So is there somehow I can provide the jar file to the build environment of the ide and not of the project? Does that make sense — as somehow the build automated process does not have it with Java 11 still even though it is in the project path as an external jar and pom.
stchadParticipantFYI Regarding Lombok — the configuration I have seems to prove ok as I can see the annotations for a class and can see the set and get’s for a given property in a random class I reviewed.
So it is now down to how to get my 1.8 solution running with Java 11 IDE runtime; with adding the javax annotation jar file onto the project classpath as an external jar and in the pom and trying to have the ‘build automatically’ working….
—-
PS – One other issue I have had since 2020 is that I am getting a clash where when doing an update maven project the project somehow thinks I have dynamic web module selected and utility module selected for facets along with JavaEE Maven.ERROR — One or more constraints have not been satisfied: Utility Module and Dynamic Web Module cannot both be selected.
Any thoughts on that?
Thank you for all your help – Scott
stchadParticipantI spent some time and fixed the PS issue above….
I still cannot get the build automatically with eclipse ide running java 11
I have in the pom the maven version set to 3.5.1 which is a 1.8 valid one.
I have added against VM Java 11 the annotation processor jar or 1.3.2 as an external jar
I have added both in the pom as a dependency and as an external jar on the build path the annotations jar/reference…
————
Nothing has worked when i try to set the build automatically to selected in 2021I fixed this in 2020 build by starting up the 2020 ide with required version of 1.8 and -vm for 1.8
Thanks – Scott
Brian FernandesModeratorScott,
First, just wanted to be sure you had tried this suggestion by Swapna?
1. Is the app a Maven based one?’ Can you please go to Preferences > Maven and change the JDK specified there to Java 8, and restart – does this help?
If that doesn’t work, it would seem that we somehow have to add the annotation JAR to the classpath of the Java instance that is being used to run Eclipse. Again, the simple ways in which this was possible earlier (adding a JAR to the endorsed / ext folder) no longer works with Java 11, and I’m afraid I don’t have a way of testing this right now.
As Swapna requested, would it be possible to send us a small dummy project that exhibits the issue? We can use that to try various solutions at our end.
stchadParticipantHi Brian,
I could only grab so much time last week and haven’t had time until probably this weekend (fun!).Let me reply to your note above and ask a few questions that may help me.
1). The app is Maven based — I did try goto Pref->Mvn and added the JDK of 1.8 on the tab. Funny thing is that once I did that, the drop down did not seem to show the name of JDK 1.8 and was blank — so there was a blank entry and then J11 for choice. Trying the blank entry didn’t do anything. I don’t know if I did a restart from last week before trying or not- will try that… I will note that I entered the version of Java as 1.8 and I think a version of 3.5.1 (from memory) in the maven config.
From your text: “If that doesn’t work, it would seem that we somehow have to add the annotation JAR to the classpath of the Java instance that is being used to run Eclipse. Again, the simple ways in which this was possible earlier (adding a JAR to the endorsed / ext folder) no longer works with Java 11, and I’m afraid I don’t have a way of testing this right now”
>>>>> What I did attempt was after finding the versions installed and seeing 11 and then the 1.8, I added an external jar to each… Is that what you meant by above — it didn’t seem to work and I believe I tried with a restart for this, although cannot remember as it was pretty late both times and I was swinging at the fences for something to work lol.Questions:
Scott#1 — If what I did noted below your text what not what you meant, could you share the process where I could try that.
Scott#2 — in the 2020 MYE you had me use -VM and that pointed to 1.8 and it worked… does -vm work if it mapped to J11? What if I installed J11 in an external folder, added the abstract processor jar to it in that folder(not sure how) and then start 2021 would that be better than what I did above (thinking out loud). If you think so, would you pen your thoughts as to the steps you would do for that?
Scott#3 — for the sample project, what would you be looking for – the maven pom with a project and having it just start up?
Scott#4 — Am I doing something old school/old way where new things are not using abstract processor – is it something you would know off hand? I need to google more but if you know of anything feel free to comment.Thanks guys – Scott
stchadParticipantAnything on this further?
Brian FernandesModeratorScott,
Apologies, your last reply was somehow missed.
Scott#1 — If what I did noted below your text what not what you meant, could you share the process where I could try that.
I did not have a solution, unfortunately, only that I did not know how to do what we could in Java 8. Adding a JAR to the JDK – assuming you just placed the JAR in the JDK’s lib folder, or something similar, won’t work.
Scott#2 — in the 2020 MYE you had me use -VM and that pointed to 1.8 and it worked… does -vm work if it mapped to J11?
Yes, you can point it to any compatible JDK (i.e. JDK version 11 or higher). Unfortunately, as per Scott#1, we don’t know how to add a JAR to any JDK.
Scott#3 — for the sample project, what would you be looking for – the maven pom with a project and having it just start up?
I guess we don’t even need for it to start up. Just the smallest unit that we can import into MyEclipse and reproduce the error. If we can reproduce this locally, then we can work out some workarounds at our end, including changes to plugins in MyEclipse (or maybe a custom plugin for you) if necessary.
Scott#4 — Am I doing something old school/old way where new things are not using abstract processor – is it something you would know off hand?
I can’t say too much without knowing more about your project, but the fact is that the libraries that are missing have also now been replaced. Java has moved from
javax.annotation
tojakarta.annotation
– though of course, I just realized that your application is still Java 1.8 based. If you do update it, quite sure this will get fixed. -
AuthorPosts