ZipException when installing mvn bundle

Solution Verified - Updated -

Issue

When installing a bundle from a maven repository, the following error is encountered:

09:45:01,309 | DEBUG | l Console Thread | HttpURLConnection                |  -  -  | sun.net.www.MessageHeader@60b214f56 pairs: {null: HTTP/1.1 301 Moved Permanently}{Location: https://blog.goodstuff.im/repo-releases/com/redhat/support/examples/camel-helloworld/1.0.0/camel-helloworld-1.0.0.jar}{Server: Caddy}{Date: Wed, 14 Dec 2016 14:45:01 GMT}{Content-Length: 152}{Content-Type: text/html; charset=utf-8}
09:45:01,311 | INFO  | l Console Thread | Console                          | 17 - org.apache.karaf.shell.console - 2.3.0.redhat-610379 | Exception caught while executing command
org.apache.karaf.shell.console.MultiException: Error installing bundles:
    Unable to install bundle mvn:com.redhat.support.examples/camel-helloworld/1.0.0
    at org.apache.karaf.shell.console.MultiException.throwIf(MultiException.java:91)
    at org.apache.karaf.shell.osgi.InstallBundle.doExecute(InstallBundle.java:70)[31:org.apache.karaf.shell.osgi:2.3.0.redhat-610379]
    at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:39)[17:org.apache.karaf.shell.console:2.3.0.redhat-610379]
    at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)[17:org.apache.karaf.shell.console:2.3.0.redhat-610379]
    at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[15:org.apache.felix.gogo.runtime:0.11.0.redhat-610379]
    at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)[15:org.apache.felix.gogo.runtime:0.11.0.redhat-610379]
    at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)[15:org.apache.felix.gogo.runtime:0.11.0.redhat-610379]
    at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[15:org.apache.felix.gogo.runtime:0.11.0.redhat-610379]
    at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[15:org.apache.felix.gogo.runtime:0.11.0.redhat-610379]
    at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[15:org.apache.felix.gogo.runtime:0.11.0.redhat-610379]
    at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)[15:org.apache.felix.gogo.runtime:0.11.0.redhat-610379]
    at org.apache.karaf.shell.console.jline.Console.run(Console.java:189)[17:org.apache.karaf.shell.console:2.3.0.redhat-610379]
    at org.apache.karaf.shell.console.jline.DelayedStarted.run(DelayedStarted.java:61)[17:org.apache.karaf.shell.console:2.3.0.redhat-610379]
Caused by: java.lang.Exception: Unable to install bundle mvn:com.redhat.support.examples/camel-helloworld/1.0.0
    at org.apache.karaf.shell.osgi.InstallBundle.doExecute(InstallBundle.java:45)[31:org.apache.karaf.shell.osgi:2.3.0.redhat-610379]
    ... 11 more
Caused by: org.osgi.framework.BundleException: Unable to cache bundle: mvn:com.redhat.support.examples/camel-helloworld/1.0.0
    at org.apache.felix.framework.Felix.installBundle(Felix.java:3121)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
    at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:165)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
    at org.apache.karaf.shell.osgi.InstallBundle.doExecute(InstallBundle.java:43)[31:org.apache.karaf.shell.osgi:2.3.0.redhat-610379]
    ... 11 more
Caused by: java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)[:1.7.0_79]
    at java.util.zip.ZipFile.<init>(ZipFile.java:215)[:1.7.0_79]
    at java.util.zip.ZipFile.<init>(ZipFile.java:145)[:1.7.0_79]
    at java.util.zip.ZipFile.<init>(ZipFile.java:159)[:1.7.0_79]
    at org.apache.felix.framework.util.SecureAction.openZipFile(SecureAction.java:623)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
    at org.apache.felix.framework.util.WeakZipFileFactory$WeakZipFile.<init>(WeakZipFileFactory.java:191)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
    at org.apache.felix.framework.util.WeakZipFileFactory$WeakZipFile.<init>(WeakZipFileFactory.java:173)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
    at org.apache.felix.framework.util.WeakZipFileFactory.create(WeakZipFileFactory.java:76)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
    at org.apache.felix.framework.cache.JarRevision.<init>(JarRevision.java:84)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
    at org.apache.felix.framework.cache.BundleArchive.createRevisionFromLocation(BundleArchive.java:878)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
    at org.apache.felix.framework.cache.BundleArchive.reviseInternal(BundleArchive.java:550)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
    at org.apache.felix.framework.cache.BundleArchive.<init>(BundleArchive.java:153)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
    at org.apache.felix.framework.cache.BundleCache.create(BundleCache.java:277)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
    at org.apache.felix.framework.Felix.installBundle(Felix.java:3117)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
    ... 13 more

Environment

  • Red Hat JBoss Fuse and Red Hat JBoss A-MQ
    • 6.0.x
    • 6.1.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.