java.lang.NoSuchMethodError: 'byte[] org.apache.commons.io.IOUtils.byteArray(int)

165 Views Asked by At

I have encountered a problem. I have some universal application which it is work with plugin. We make plugins for this application like FatJar. Application and plugins has common interface. When the application in progress a plugin upload to UrlClassLoader and also being performed. But some libraries don't wont to work that way. Exactly org.apache.commons.io.IOUtils. We make plugin by java without frameworks, use gradle. Application use Spring Boot 3.0.0 and Maven, for run plugin application start virtualthread. When i run plugin into application I get the following error:

Exception is 'java.lang.NoSuchMethodError: 'byte[] org.apache.commons.io.IOUtils.byteArray(int)''

I tried to use different ways for get FatJar but unfortunately it did not bring results. This library is always present in FatJar.

The only solution is add this dependency to application. But this may inflate the application in the future.

If anyone has encountered such behavior, I will be grateful for your help.

0

There are 0 best solutions below