You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "lhotari (via GitHub)" <gi...@apache.org> on 2025/07/30 08:40:49 UTC
[I] [Enhancement] Add dependency file name information to error message when .nar file validation fails with ZipException [pulsar]
lhotari opened a new issue, #24585:
URL: https://github.com/apache/pulsar/issues/24585
### Search before reporting
- [x] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
### Motivation
While investigating a CI failure, the only error from the end user level was "java.util.zip.ZipException: zip END header not found" when trying to create a Pulsar IO Connector instance.
In this type of case, it would be useful to return the file name of the dependency in META-INF/bundled-dependencies which fails to validate
here's an example exception in function worker logs:
```
196-2025-07-29T22:19:27,036+0000 [function-web-36-4] ERROR org.apache.pulsar.functions.worker.rest.api.SourcesImpl - Invalid register Source request @ /public/default/test-source-debezium-oracle-PROCESS-ikvvswvz
197:java.io.UncheckedIOException: java.util.zip.ZipException: zip END header not found
198- at org.apache.pulsar.functions.utils.FunctionFilePackage.<init>(FunctionFilePackage.java:82) ~[org.apache.pulsar-pulsar-functions-utils-4.0.6-SNAPSHOT.jar:4.0.6-SNAPSHOT]
199- at org.apache.pulsar.functions.utils.io.Connector.getConnectorFunctionPackage(Connector.java:55) ~[org.apache.pulsar-pulsar-functions-utils-4.0.6-SNAPSHOT.jar:4.0.6-SNAPSHOT]
200- at org.apache.pulsar.functions.worker.rest.api.SourcesImpl.validateUpdateRequestParams(SourcesImpl.java:681) ~[org.apache.pulsar-pulsar-functions-worker-4.0.6-SNAPSHOT.jar:4.0.6-SNAPSHOT]
201- at org.apache.pulsar.functions.worker.rest.api.SourcesImpl.registerSource(SourcesImpl.java:153) ~[org.apache.pulsar-pulsar-functions-worker-4.0.6-SNAPSHOT.jar:4.0.6-SNAPSHOT]
202- at org.apache.pulsar.functions.worker.rest.api.v3.SourcesApiV3Resource.registerSource(SourcesApiV3Resource.java:72) ~[org.apache.pulsar-pulsar-functions-worker-4.0.6-SNAPSHOT.jar:4.0.6-SNAPSHOT]
--
256- at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409) ~[org.eclipse.jetty-jetty-util-9.4.57.v20241219.jar:9.4.57.v20241219]
257- at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:?]
258- at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:?]
259- at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[io.netty-netty-common-4.1.122.Final.jar:4.1.122.Final]
260- at java.base/java.lang.Thread.run(Unknown Source) [?:?]
261:Caused by: java.util.zip.ZipException: zip END header not found
262- at java.base/java.util.zip.ZipFile$Source.findEND(Unknown Source) ~[?:?]
263- at java.base/java.util.zip.ZipFile$Source.initCEN(Unknown Source) ~[?:?]
264- at java.base/java.util.zip.ZipFile$Source.<init>(Unknown Source) ~[?:?]
265- at java.base/java.util.zip.ZipFile$Source.get(Unknown Source) ~[?:?]
266- at java.base/java.util.zip.ZipFile$CleanableResource.<init>(Unknown Source) ~[?:?]
```
### Solution
This is where the validation happens:
https://github.com/apache/pulsar/blob/16a43c679ee9e12ba9900da63569c8c7614d2faf/pulsar-functions/utils/src/main/java/org/apache/pulsar/functions/utils/FunctionFilePackage.java#L62-L85
It should be possible to add an exception message that bubbles to the higher levels such as
`throw new UncheckedIOException(new IOException("Loading '" + classpath + "' failed due to " + e.getMessage(), e));`
### Alternatives
_No response_
### Anything else?
_No response_
### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Enhancement] Add dependency file name information to error message when .nar file validation fails with ZipException [pulsar]
Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari closed issue #24585: [Enhancement] Add dependency file name information to error message when .nar file validation fails with ZipException
URL: https://github.com/apache/pulsar/issues/24585
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Enhancement] Add dependency file name information to error message when .nar file validation fails with ZipException [pulsar]
Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on issue #24585:
URL: https://github.com/apache/pulsar/issues/24585#issuecomment-3139524264
btw. The problem where this happened was that a jar file included in `META-INF/bundled-dependencies` wasn't a valid jar file. The fix for Pulsar CI itself is #24586 to prevent the problem. However, it was hard to find out what the problem was since there wasn't a particular file that was mentioned in the exception message.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org