#java.lang.NoSuchMethodError: 'void org.apache.commons.io.IOUtils.readFully(java.nio.channels.Readabl
1 messages · Page 1 of 1 (latest)
While you are waiting for getting help, here are some tips to improve your experience:
If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.
Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.
code and full error message please
You probably have different versions of org.apache.commons in your programming and testing environment.
thing is that I checked if it exists and it exists
in the jar file so I dont know what to do
did you check that the class or the method exists?
it exists both
so in the jar, there is a method with that exact name and exactly these parameters?
you don't look into the jar there
public static void readFully(ReadableByteChannel input, ByteBuffer buffer) throws IOException {
int expected = buffer.remaining();
int actual = read(input, buffer);
if (actual != expected) {
throw new EOFException("Length to read: " + expected + " actual: " + actual);
}
}
no I checked there for dependency overrides
what jar did you upload there
the jar your build system made that includes your code?
only the .class file out of the jar file (7Zip) from path: org.apache.commons.io
And there then the IOUtils.class file
ok
then idk what went wrong.
can you show your build file (pom.xml or build.gradle)?
that is also a good idea
so good?
ok, ill take a look at it
you are programming a paper plugin, am i right @proven imp ?
afaik the minecraft server has its own version of apache commons already bundled.
It looks like that version doesn't have the method you are using.
There are 2 options i know:
- use shading with relocation. This way all apache commons stuff you use gets renamed so it can be loaded in addition to minecraft's version.
- use the version of apache commons that is bundled in minecraft. Since it looks like you want this plugin to work on different mc versions, this is not the preverable option.
thatswhy I dont know with what to replace compile
Could you maybe help me with upgrading to gradle v7?
sadly not.
ok
thankss anyway
do you know with what to replace compile in v7
and what the difference is between api and implement
no, but you can probably find it in the gradle documentation
kk