You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary D. Gregory (Jira)" <ji...@apache.org> on 2022/07/15 12:53:00 UTC
[jira] [Commented] (IO-775) IOUtils.byteArray() java.lang.NoSuchMethodError
[ https://issues.apache.org/jira/browse/IO-775?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17567237#comment-17567237 ]
Gary D. Gregory commented on IO-775:
------------------------------------
You might have some classpath or shading problem. I would guess that whatever "axis2.jar" is, it contains a copy of Apache Commons IO that is not the same as the standalone jar for 2.11.0. So open up axis2.jar and see what's in there.
> IOUtils.byteArray() java.lang.NoSuchMethodError
> -----------------------------------------------
>
> Key: IO-775
> URL: https://issues.apache.org/jira/browse/IO-775
> Project: Commons IO
> Issue Type: Bug
> Components: Streams/Writers
> Affects Versions: 2.11.0
> Environment: OS Name Microsoft Windows 10 Enterprise
> Version 10.0.19044 Build 19044
> Java 1.8
> Eclipse Photon
> poi-5.2.2.jar
> poi-ooxml-5.2.2.jar
> poi-excelant-5.2.2.jar
> log4j-api-2.18.0.jar
> log4j-core-2.18.0.jar
> xmlbeans-5.1.0.jar
> commons-compress-1.21.jar
> org.osgi.framework-1.10.0.jar
> commons-io-2.11.0.jar
>
> Reporter: Douglas Wohlers
> Priority: Major
>
> Exception in thread "main" java.lang.NoSuchMethodError: org/apache/commons/io/IOUtils.byteArray(I)[B (loaded from file:/C:/Users/dwohlers/Maximoworkspace/maximo/lib/axis2.jar by sun.misc.Launcher$AppClassLoader@53fdf001) called from class org.apache.commons.io.output.AbstractByteArrayOutputStream (loaded from file:/C:/Users/dwohlers/Maximoworkspace/maximo/lib/commons-io-2.11.0.jar by sun.misc.Launcher$AppClassLoader@53fdf001).
> at org.apache.commons.io.output.AbstractByteArrayOutputStream.needNewBuffer(AbstractByteArrayOutputStream.java:104)
> at org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream.<init>(UnsynchronizedByteArrayOutputStream.java:51)
> at org.apache.poi.util.IOUtils.peekFirstNBytes(IOUtils.java:139)
> at org.apache.poi.poifs.filesystem.FileMagic.valueOf(FileMagic.java:209)
> at org.apache.poi.openxml4j.opc.internal.ZipHelper.verifyZipHeader(ZipHelper.java:143)
> at org.apache.poi.openxml4j.opc.internal.ZipHelper.openZipStream(ZipHelper.java:175)
> at org.apache.poi.openxml4j.opc.ZipPackage.<init>(ZipPackage.java:130)
> at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:312)
> at org.apache.poi.ooxml.util.PackageHelper.open(PackageHelper.java:59)
> at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:289)
> at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:285)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)