#java.lang.NoSuchMethodError: 'void org.apache.commons.io.IOUtils.readFully(java.nio.channels.Readabl

1 messages · Page 1 of 1 (latest)

ocean quarryBOT
#

<@&987246399047479336> please have a look, thanks.

ocean quarryBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

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.

deep cairn
#

code and full error message please

frozen vapor
#

You probably have different versions of org.apache.commons in your programming and testing environment.

proven imp
#

in the jar file so I dont know what to do

frozen vapor
#

did you check that the class or the method exists?

proven imp
frozen vapor
#

so in the jar, there is a method with that exact name and exactly these parameters?

#

you don't look into the jar there

proven imp
#
  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);
      }
   }

proven imp
frozen vapor
#

what jar did you upload there

#

the jar your build system made that includes your code?

proven imp
#

And there then the IOUtils.class file

frozen vapor
#

ok

#

then idk what went wrong.

#

can you show your build file (pom.xml or build.gradle)?

proven imp
#

I try upgrading currently ...

#

because I use Gradle 5.6.1

#

xD

frozen vapor
#

that is also a good idea

frozen vapor
#

ok, ill take a look at it

#

you are programming a paper plugin, am i right @proven imp ?

proven imp
#

yessir

#

thing is i dont know gradle enough

#

(v7/v8)

frozen vapor
#

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:

  1. 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.
  2. 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.
proven imp
#

thatswhy I dont know with what to replace compile

proven imp
frozen vapor
#

sadly not.

proven imp
#

ok

#

thankss anyway

#

do you know with what to replace compile in v7

#

and what the difference is between api and implement

frozen vapor
#

no, but you can probably find it in the gradle documentation

proven imp
#

kk