0

I was using apache commons-compress-1.15.jar and working on mirth connect tool and though the method was found in the java file IOUtils.java still giving out this error in mirth tool readFully(ReadableByteChannel, ByteBuffer) not found. Please help me with this error.

Thank you.

Phani Sai Ram
  • 47
  • 3
  • 10
  • 1
    This typically happens when you run with a different version of the library than was used to compile. – Henry Jan 19 '18 at 15:03
  • @Henry thank you for responding, please explain with an example. I didn't get exactly about the versions. Please make it clear and I was using jdk 1.8 and mirth connect version is 3.5.1. Please elaborate on an example. Thank you. – Phani Sai Ram Jan 20 '18 at 14:41

2 Answers2

1

Mirth already using commons compress jar. You can find the commons compress version which is being used by mirth on below path.

  • {Mirth Installed Location}/server-lib/commons/commons-compress-{version}.jar
  • {Mirth Installed Location}/client-lib/commons-compress-{version}.jar
KevalP
  • 11
  • 3
0

Probably, you are not using commons-compress-1.15.jar but using older version because the method has been introduced since 1.15.

Kohei TAMURA
  • 4,970
  • 7
  • 25
  • 49
  • Hi @KoheiTAMURA, I was using common-compress-1.15.jar and I can find readFully(ReadableByteChannel, ByteBuffer) method in the IOUtils.java file but still, it was returning the NoSuchMethodError while I was running it in mirth connect tool. – Phani Sai Ram Jan 23 '18 at 09:03
  • If possible, you might as well extract and decompile IOUtils in common-compress-1.15.jar to check if there is the method in decompiled IOUtils.java. – Kohei TAMURA Jan 24 '18 at 05:47
  • I can make sure there is a method readFully(ReadableByteChannel, ByteBuffer) in IOUtils.java in common-compress-1.15.jar. It runs well and generates output in NetBeans or eclipse but when it was converted into a single jar file and run in mirth connect tool, it throws NoSuchMethodError - readFully(ReadableByteChannel, ByteBuffer) in IOUtils.java. – Phani Sai Ram Jan 24 '18 at 11:55
  • Probably, mirth connect tool calls another `org.apache.commons.compress.utils.IOUtils` not in `common-compress-1.15.jar`. – Kohei TAMURA Jan 25 '18 at 09:06
  • There is only one version of common compress jar file that is .... common-compress-1.15.jar no other versions are included and how can it deviate from the flow? When I run the application in any ide like NetBeans and Eclipse, it really works well and generating output. But in case of mirth connect while providing the whole java application as the jar file and trying to deploy the channel in Mirth Connect. Then it throws NoSuchMethodError-readFully(ReadableByteChannel, ByteBuffer) even if that method exists inside the jar file. Thank you. – Phani Sai Ram Jan 25 '18 at 12:01