Cfzip failure using Compress tags 1.0.0.7 with Lucee 5.3.9.133

get this error when using cfzip net/lingala/zip4j/io/inputstream/NumberedSplitRandomAccessFile

Changing Compress tags back to 1.0.0.2 solved this error

OS: Linux (4.12.14-122.113-default) 64bit
Java Version: 11.0.8 (Amazon.com Inc.) 64bit
Tomcat Version: Apache Tomcat/9.0.38
Lucee Version: 5.3.9.133

Hi @Dave_Watts , Can you please provide a full stacktrace for the error?.
Also please share an example code to reproduce the issue if possible?

What was in the error log

Code example will have to be later on but was zipping a folder into one file

“ERROR”,“ajp-nio-127.0.0.1-8009-exec-6”,“05/10/2022”,“11:13:46”,"","net/lingala/zip4j/io/inputstream/NumberedSplitRandomAccessFile;lucee.runtime.exp.NativeException: net/lingala/zip4j/io/inputstream/NumberedSplitRandomAccessFile
at org.lucee.extension.zip.tag.Zip.getZip(Zip.java:888)
at org.lucee.extension.zip.tag.Zip.actionZip(Zip.java:602)
at org.lucee.extension.zip.tag.Zip.doEndTag(Zip.java:867)
at trawler.ctd_extract_cfm$cf$pv.call(/data/trawler/ctd_extract.cfm:458)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1012)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:935)
at lucee.runtime.listener.ClassicAppListener._onRequest(ClassicAppListener.java:65)
at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:45)
at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2475)
at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2465)
at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2436)
at lucee.runtime.engine.Request.exe(Request.java:45)
at lucee.runtime.engine.CFMLEngineImpl._service(CFMLEngineImpl.java:1194)
at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:1140)
at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:97)
at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:51)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:432)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1590)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.NoClassDefFoundError: net/lingala/zip4j/io/inputstream/NumberedSplitRandomAccessFile
… 39 more
Caused by: java.lang.ClassNotFoundException: net.lingala.zip4j.io.inputstream.NumberedSplitRandomAccessFile not found by zip4j.2.1.2 [51]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1597)
at org.apache.felix.framework.BundleWiringImpl.access$300(BundleWiringImpl.java:79)
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1982)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at org.apache.felix.framework.BundleWiringImpl.getClassByDelegation(BundleWiringImpl.java:1375)
at org.apache.felix.framework.BundleWiringImpl.searchImports(BundleWiringImpl.java:1618)
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1548)
at org.apache.felix.framework.BundleWiringImpl.access$300(BundleWiringImpl.java:79)
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1982)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
… 39 more

The zip cmd used

turns out there’s a recent update to zip4j 2.10.0

https://luceeserver.atlassian.net/browse/LDEV-3983

Can you try the compress-1.0.0.8-SNAPSHOT

2 Likes

The same failure occurred with 1.0.0.8-SNAPSHOT

Reverted back to 1.0.0.2 and it works fine.

Cheers Dave

Ok sounds like an upstream problem with GitHub - srikanth-lingala/zip4j: A Java library for zip files and streams

can you provide me with an minimal example and file a bug in jira?

looking at the changes, aside from updating the zip4j library, the only other change which might cause this was in 1.0.0.5, does that version work?

bug filed [LDEV-3987] - Lucee

Nope, 1.0.0.5 and 1.0.0.4, do not work either.

did you try the latest 1.0.0.9?

@Zackster , I tried the 1.0.0.9 Snapshot and it’s not working either.

pretty sure it’s a problem in zip4j, but I need a reproducible test case!

@Zackster, maybe this sample code could help? Here’s a simplified version of my scenario, which throws the following exception:

ERROR EXPLANATION
net/lingala/zip4j/io/inputstream/NumberedSplitRandomAccessFile

Type: java.lang.NoClassDefFoundError

<cfzip action="zip" file="#getTempDirectory()#batch.zip" overwrite="true">
	<cfzipparam source="\\path\to\file.jpg">
</cfzip>

We’re running Lucee 5.3.9.141 and have tried the Compressed Tags versions 1.0.0.2, 1.0.0.7, 1.0.0.9 SNAPSHOT.

Thanks, and please let me know if I need to provide any additional detail.

Is that a UNC path, I.e SMB?

Does it work with a normal file path?

I need something which reproduces the error, no pseudo code, something along the lines of

<cfdump var=#extensionList().filter( function(row){ return row.name contains "compress"; }).version#>
<cfflush>
<cfscript>
    zipfile="#getTempDirectory()#batch.zip";
    srcFile=".\100MB.bin";  // https://speed.hetzner.de/
</cfscript>
<cfdump var=#FileInfo(srcfile)#>
<cfzip action="zip" file="#zipfile#" overwrite="true">
	<cfzipparam source="#srcFile#">
</cfzip>
<cfdump var=#FileInfo(zipfile)#>