java.lang.NoSuchMethodError: java.util.Properties: method <init>(I)V not found

2022-09-28 15:43:56,617 ERROR [http-nio-7990-exec-13]  o.a.c.c.C.[.[.[/].[plugins] Servlet.service() for servlet [plugins] in context with path [] threw exception [Servlet execution threw an exception] with root cause
java.lang.NoSuchMethodError: java.util.Properties: method <init>(I)V not found

How is it possible?

Thanks in advance.
Cheers.

Hi

Looks like in JDK 8 there is no constructor with an initial capacity.
While in JDK 11+ (not sure since when) and newer there is.

So, you compiled against a newer JDK (11 or so), and then try to run on JDK 8.
Ensure you compile against JDK 8 as well, otherwise you might use a method which was introduced later.

1 Like

You’re right! :man_facepalming:
Thank you for your support.
Cheers.

1 Like