I am upgrading a module to depend on 1.11.6 and it is not able to load annotated beans. I have read that a possible cause is java 8 and I have downgraded to java 7 in vain. The code however compiles well with version 1.9.9. The snipped below shows the code that runs into error which can be found at https://pastebin.com/wV4814fa. I will appreciate any help.
I am noting something very interesting. Even though my java version is 1.7, the module is kind of compiled using oracle java 8. Compiling the module with -X switch produces the following:
I am still looking at it and will share once I get a solution
Finding:
I needed to change javac version as well when I switched between java versions. The compiler still pointed to java 8 even though java version was 7. Switching the compiler version sorted me.
The solution to the problem was to change javac version as well when I switched between java versions. The compiler still pointed to java 8 even though java version was 7. Switching the compiler version sorted me.
To update javac use:
`sudo update-alternatives --config javac`
and specify the version of interest, in my case java 7. I hope this helps.
It seems I’m encountering an error similar to the one reported in this thread. At-least I know that this error is related to the Java compiler version but failed to figure out how to get over it.
So I created a new sub module(api-2.3) and this depends on core 2.3.1-SNAPSHOT. I’m aware that java 8 support is available when you depend on core 2.x and above,
Adding the compiler plugin pointing to 1.8 source to api-2.3 makes spring fail to build the context in the omod sub module: