Present a nice error message if a bundle update is not possible
---------------------------------------------------------------
Key: FELIX-3308
URL: https://issues.apache.org/jira/browse/FELIX-3308
Project: Felix
Issue Type: Improvement
Components: Web Console
Affects Versions: webconsole-3.1.8
Reporter: Felix Meschberger
If a bundle has a bundle location which cannot be used to update the bundle
through the Bundle.update() method, a nasty error message is logged and
displayed:
ERROR: Unable to update the bundle. (java.net.MalformedURLException: Unknown
protocol: jcrinstall)
java.net.MalformedURLException: Unknown protocol: jcrinstall
at java.net.URL.<init>(URL.java:601)
at org.apache.felix.framework.util.SecureAction.createURL
(SecureAction.java:238)
at org.apache.felix.framework.cache.JarRevision.initialize
(JarRevision.java:153)
at org.apache.felix.framework.cache.JarRevision.<init>(JarRevision.java:82)
at org.apache.felix.framework.cache.JarRevision.<init>(JarRevision.java:60)
at org.apache.felix.framework.cache.BundleArchive.createRevisionFromLocation
(BundleArchive.java:868)
at org.apache.felix.framework.cache.BundleArchive.reviseInternal
(BundleArchive.java:549)
at org.apache.felix.framework.cache.BundleArchive.revise
(BundleArchive.java:521)
at org.apache.felix.framework.BundleImpl.revise(BundleImpl.java:1078)
at org.apache.felix.framework.Felix.updateBundle(Felix.java:1959)
at org.apache.felix.framework.BundleImpl.update(BundleImpl.java:940)
at org.apache.felix.framework.BundleImpl.update(BundleImpl.java:927)
at
org.apache.felix.webconsole.internal.core.UpdateHelper.updateFromBundleLocation
(UpdateHelper.java:108)
at org.apache.felix.webconsole.internal.core.UpdateHelper.doRun
(UpdateHelper.java:74)
at org.apache.felix.webconsole.internal.core.BaseUpdateInstallHelper.run
(BaseUpdateInstallHelper.java:121)
at java.lang.Thread.run(Thread.java:680)
The Web Console UpdateHelper.updateFromBundleLocation should catch this error
and return a nicer message indicating that this kind of update is not possible.
Maybe the display could be improved to disable the update button if the
location URL cannot be used (e.g. with a "simple" URL creation check)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira