[ 
https://issues.apache.org/jira/browse/ARIES-2124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17772234#comment-17772234
 ] 

Amichai Rothman commented on ARIES-2124:
----------------------------------------

For example, here's an exception I see where it seems to be messing with karaf 
feature deployer:


java.util.zip.ZipException: Exception in opening zip file: 
/opt/myapp/apache-karaf-4.4.4/data/cache/org.eclipse.osgi/279/0/.cp/lib/geronimo-osgi-locator.jar
at 
org.eclipse.osgi.framework.util.SecureAction.getZipFile(SecureAction.java:356) 
~[?:?]
at 
org.eclipse.osgi.storage.bundlefile.ZipBundleFile.doOpen(ZipBundleFile.java:51) 
~[?:?]
at 
org.eclipse.osgi.storage.bundlefile.CloseableBundleFile.internalOpen(CloseableBundleFile.java:140)
 ~[?:?]
at 
org.eclipse.osgi.storage.bundlefile.CloseableBundleFile.lockOpen(CloseableBundleFile.java:78)
 ~[?:?]
at 
org.eclipse.osgi.storage.bundlefile.CloseableBundleFile.getEntry(CloseableBundleFile.java:274)
 ~[?:?]
at 
org.eclipse.osgi.internal.loader.classpath.ClasspathEntry.loadManifest(ClasspathEntry.java:230)
 ~[?:?]
at 
org.eclipse.osgi.internal.loader.classpath.ClasspathEntry.<init>(ClasspathEntry.java:77)
 ~[?:?]
at 
org.eclipse.osgi.internal.loader.ModuleClassLoader.createClassPathEntry(ModuleClassLoader.java:267)
 ~[?:?]
at 
org.eclipse.osgi.internal.loader.classpath.ClasspathManager.createClassPathEntry(ClasspathManager.java:343)
 ~[?:?]
at 
org.eclipse.osgi.internal.loader.classpath.ClasspathManager.getClasspath(ClasspathManager.java:295)
 ~[?:?]
at 
org.eclipse.osgi.internal.loader.classpath.ClasspathManager.addStandardClassPathEntry(ClasspathManager.java:213)
 ~[?:?]
at 
org.eclipse.osgi.internal.loader.classpath.ClasspathManager.addClassPathEntry(ClasspathManager.java:205)
 ~[?:?]
at 
org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassPathEntry(ClasspathManager.java:188)
 ~[?:?]
at 
org.eclipse.osgi.internal.loader.classpath.ClasspathManager.buildClasspath(ClasspathManager.java:166)
 ~[?:?]
at 
org.eclipse.osgi.internal.loader.classpath.ClasspathManager.<init>(ClasspathManager.java:94)
 ~[?:?]
at 
org.eclipse.osgi.internal.loader.EquinoxClassLoader.<init>(EquinoxClassLoader.java:54)
 ~[?:?]
at 
org.eclipse.osgi.internal.loader.BundleLoader.createClassLoaderPrivledged(BundleLoader.java:345)
 ~[?:?]
at 
org.eclipse.osgi.internal.loader.BundleLoader.getModuleClassLoader(BundleLoader.java:262)
 ~[?:?]
at 
org.eclipse.osgi.internal.loader.BundleLoader.findEntries(BundleLoader.java:888)
 ~[?:?]
at org.eclipse.osgi.container.ModuleWiring.findEntries(ModuleWiring.java:285) 
~[?:?]
at 
org.eclipse.osgi.storage.ManifestLocalization.findResource(ManifestLocalization.java:234)
 ~[?:?]
at 
org.eclipse.osgi.storage.ManifestLocalization.lookupResourceBundle(ManifestLocalization.java:165)
 ~[?:?]
at 
org.eclipse.osgi.storage.ManifestLocalization.getResourceBundle(ManifestLocalization.java:136)
 ~[?:?]
at 
org.eclipse.osgi.storage.ManifestLocalization.getHeaders(ManifestLocalization.java:78)
 ~[?:?]
at 
org.eclipse.osgi.storage.BundleInfo$Generation.getHeaders(BundleInfo.java:190) 
~[?:?]
at 
org.eclipse.osgi.internal.framework.EquinoxBundle.privGetHeaders(EquinoxBundle.java:520)
 ~[?:?]
at 
org.eclipse.osgi.internal.framework.EquinoxBundle.getHeaders(EquinoxBundle.java:515)
 ~[?:?]
at 
org.eclipse.osgi.internal.framework.EquinoxBundle.getHeaders(EquinoxBundle.java:509)
 ~[?:?]
at 
org.apache.karaf.features.internal.service.Deployer.lambda$removeFragmentsAndBundlesInState$2(Deployer.java:1304)
 ~[?:?]
at java.util.Collection.removeIf(Collection.java:544) ~[?:?]
at 
org.apache.karaf.features.internal.service.Deployer.removeFragmentsAndBundlesInState(Deployer.java:1303)
 ~[?:?]
at 
org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:1031) 
~[?:?]
at 
org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1069)
 ~[?:?]
at 
org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:1004)
 ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) 
~[?:?]
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) 
~[?:?]
at java.lang.Thread.run(Thread.java:829) [?:?]
Caused by: java.util.zip.ZipException: Invalid CEN header (invalid extra data 
field size for tag: 0xbfef at 55)
at java.util.zip.ZipFile$Source.zerror(ZipFile.java:1769) ~[?:?]
at java.util.zip.ZipFile$Source.checkExtraFields(ZipFile.java:1274) ~[?:?]
at java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1734) ~[?:?]
at java.util.zip.ZipFile$Source.<init>(ZipFile.java:1463) ~[?:?]
at java.util.zip.ZipFile$Source.get(ZipFile.java:1426) ~[?:?]
at java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:742) ~[?:?]
at java.util.zip.ZipFile$CleanableResource.get(ZipFile.java:859) ~[?:?]
at java.util.zip.ZipFile.<init>(ZipFile.java:257) ~[?:?]
at java.util.zip.ZipFile.<init>(ZipFile.java:186) ~[?:?]
at java.util.zip.ZipFile.<init>(ZipFile.java:200) ~[?:?]
at 
org.eclipse.osgi.framework.util.SecureAction.getZipFile(SecureAction.java:342) 
~[?:?]
... 37 more

> Embedded jar file is corrupt
> ----------------------------
>
>                 Key: ARIES-2124
>                 URL: https://issues.apache.org/jira/browse/ARIES-2124
>             Project: Aries
>          Issue Type: Bug
>          Components: jax-rs-whiteboard
>    Affects Versions: jax-rs-whiteboard-2.0.2
>            Reporter: Amichai Rothman
>            Priority: Critical
>
> The aries-jax-rs-whiteboard karaf feature requires the bundle 
> mvn:org.apache.aries.spec/org.apache.aries.javax.jax.rs-api/1.0.1. This 
> bundle, in turn, contains an embedded jar and Bundle-ClassPath = 
> .,lib/geronimo-osgi-locator.jar.
> This embedded jar is corrupt:
> {quote}
> $ unzip -t lib/geronimo-osgi-locator.jar        
> Archive:  lib/geronimo-osgi-locator.jar 
>    testing: META-INF/                OK 
>    testing: META-INF/MANIFEST.MF    bad extra-field entry: 
>      EF block length (61373 bytes) exceeds remaining EF data (4 bytes)
> $jar tf lib/geronimo-osgi-locator.jar  
> java.util.zip.ZipException: Invalid CEN header (invalid zip64 extra data 
> field size) 
>        at java.base/java.util.zip.ZipFile$Source.zerror(ZipFile.java:1736)
> {quote}
> Even worse, other mechanisms that scan for resources within bundles balk at 
> this (with the same ZipException) when scanning this bundle even if they have 
> nothing to do with the jaxrs whiteboard. So this issue also breaks various 
> unrelated application components.
> Note that the ZipFile exception may be related to changes in the JDK 
> (11.0.20?) that added stricter validity checks on zip files, however even 
> after and additional fix in JDK-8313765, using 11.0.20.1, this still occurs - 
> presumably because the file is truly corrupt (as shown by the unzip/jar 
> tools). Also setting the system property 
> -Djdk.util.zip.disableZip64ExtraFieldValidation=true (as referenced in some 
> of the linked JDK issues) doesn't help in this case.
> btw I couldn't find where the source for org.apache.aries.javax.jax.rs-api 
> is, and maven central has a few newer releases up to 1.0.4, but all contain 
> the same embedded corrupt jar. Further, I'm not sure where the corrupt 
> geronimo-osgi-locator.jar came from. Maven central has a 
> geronimo-osgi-locator-1.0.jar and a geronimo-osgi-locator-1.1.jar, neither of 
> which are corrupt.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to