[
https://issues.apache.org/jira/browse/FELIX-1715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12764664#action_12764664
]
Guillaume Nodet commented on FELIX-1715:
----------------------------------------
Not sure how to handle this use case.
The problem is that the url for the installed bundle directly points to the xml
(non transformed artifact) file.
So if you run "osgi:update", the deployer is bypassed and the osgi framework
try to update from the non transformed artifact, which obviously fails in this
case.
One possible enhancement would be to have fileinstall use a different url. We
could force custom deployment listeners to always go through a custom url
handler and have the transformed artifact be done on the fly. I think this
would solve the problem.
FWIW, you don't really need to to an osgi:update on transformed artifacts,
because those are already updated as soon as a change is detected by
fileinstall, but I guess that's not really the point.
> osgi:update on xml deployments will cause ZIPExceptions
> -------------------------------------------------------
>
> Key: FELIX-1715
> URL: https://issues.apache.org/jira/browse/FELIX-1715
> Project: Felix
> Issue Type: Bug
> Components: File Install, Karaf
> Affects Versions: karaf-1.0.0
> Reporter: Lars Heinemann
>
> I deployed a Spring xml file by copying it to deploy folder. It was installed
> fine.
> When trying to run
> osgi:update
> on that bundle then it throws exceptions:
> -------------------------------------------------
> ka...@root> update 195
>
> ERROR: Unable to update the bundle. (java.util.zip.ZipException: error in
> opening zip file)
>
> java.util.zip.ZipException: error in opening zip file
>
> at java.util.zip.ZipFile.open(Native Method)
>
> at java.util.zip.ZipFile.<init>(ZipFile.java:114)
>
> at java.util.jar.JarFile.<init>(JarFile.java:133)
>
> at java.util.jar.JarFile.<init>(JarFile.java:97)
>
> at org.apache.felix.framework.util.JarFileX.<init>(JarFileX.java:36)
>
> at
> org.apache.felix.framework.util.SecureAction.openJAR(SecureAction.java:592)
>
> at
> org.apache.felix.framework.cache.JarRevision.getManifestHeader(JarRevision.java:90)
>
> at
> org.apache.felix.framework.BundleImpl.createModule(BundleImpl.java:1090)
>
> at org.apache.felix.framework.BundleImpl.revise(BundleImpl.java:1044)
>
> at org.apache.felix.framework.Felix.updateBundle(Felix.java:1835)
>
> at org.apache.felix.framework.BundleImpl.update(BundleImpl.java:908)
>
> at org.apache.felix.framework.BundleImpl.update(BundleImpl.java:895)
>
> at
> org.apache.felix.karaf.shell.osgi.UpdateBundle.doExecute(UpdateBundle.java:37)
>
> at
> org.apache.felix.karaf.shell.osgi.BundleCommand.doExecute(BundleCommand.java:42)
>
> at
> org.apache.felix.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:41)
>
> at
> org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:34)
>
> at
> org.apache.felix.gogo.runtime.shell.CommandProxy.execute(CommandProxy.java:45)
>
> at
> org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:211)
>
> at
> org.apache.felix.gogo.runtime.shell.Closure.executeStatement(Closure.java:146)
>
> at org.apache.felix.gogo.runtime.shell.Pipe.run(Pipe.java:91)
>
> at
> org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:75)
>
> at
> org.apache.felix.gogo.runtime.shell.CommandSessionImpl.execute(CommandSessionImpl.java:71)
> at
> org.apache.felix.karaf.shell.console.jline.Console.run(Console.java:115)
> at java.lang.Thread.run(Thread.java:619)
> org.osgi.framework.BundleException: Update of bundle
> net.compart.dbesb.examples.webservice.mill [195] failed.
> at org.apache.felix.framework.Felix.updateBundle(Felix.java:1966)
> at org.apache.felix.framework.BundleImpl.update(BundleImpl.java:908)
> at org.apache.felix.framework.BundleImpl.update(BundleImpl.java:895)
> at
> org.apache.felix.karaf.shell.osgi.UpdateBundle.doExecute(UpdateBundle.java:37)
> at
> org.apache.felix.karaf.shell.osgi.BundleCommand.doExecute(BundleCommand.java:42)
> at
> org.apache.felix.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:41)
> at
> org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:34)
> at
> org.apache.felix.gogo.runtime.shell.CommandProxy.execute(CommandProxy.java:45)
> at
> org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:211)
> at
> org.apache.felix.gogo.runtime.shell.Closure.executeStatement(Closure.java:146)
> at org.apache.felix.gogo.runtime.shell.Pipe.run(Pipe.java:91)
> at
> org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:75)
> at
> org.apache.felix.gogo.runtime.shell.CommandSessionImpl.execute(CommandSessionImpl.java:71)
> at
> org.apache.felix.karaf.shell.console.jline.Console.run(Console.java:115)
> at java.lang.Thread.run(Thread.java:619)
> Caused by: java.util.zip.ZipException: error in opening zip file
> at java.util.zip.ZipFile.open(Native Method)
> at java.util.zip.ZipFile.<init>(ZipFile.java:114)
> at java.util.jar.JarFile.<init>(JarFile.java:133)
> at java.util.jar.JarFile.<init>(JarFile.java:97)
> at org.apache.felix.framework.util.JarFileX.<init>(JarFileX.java:36)
> at
> org.apache.felix.framework.util.SecureAction.openJAR(SecureAction.java:592)
> at
> org.apache.felix.framework.cache.JarRevision.getManifestHeader(JarRevision.java:90)
> at
> org.apache.felix.framework.BundleImpl.createModule(BundleImpl.java:1090)
> at org.apache.felix.framework.BundleImpl.revise(BundleImpl.java:1044)
> at org.apache.felix.framework.Felix.updateBundle(Felix.java:1835)
> ... 14 more
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.