Skip to content

Instantly share code, notes, and snippets.

@cristcost
Last active March 21, 2016 15:11
Show Gist options
  • Save cristcost/4a5c554ccbb9577c690e to your computer and use it in GitHub Desktop.
Save cristcost/4a5c554ccbb9577c690e to your computer and use it in GitHub Desktop.
Log outputs of test deleting the endorsed Exception
# prepared clean installations of Karaf 4.0.4, ServiceMix 5.3.0, 6.1.0 and 7.0.0
# clone the repo with the fixes
Handwritten:test cristcost$ git clone https://github.com/cristcost/karaf.git
# compile the patched JARs
Handwritten:test cristcost$ cd karaf/
Handwritten:karaf cristcost$ git checkout fix-karaf-4429-2.4.0
Switched to branch 'fix-karaf-4429-2.4.0'
Handwritten:karaf cristcost$ mvn clean install -q -pl exception
Handwritten:karaf cristcost$ cp exception/target/org.apache.karaf.exception-2.4.0.jar ..
Handwritten:karaf cristcost$ git checkout fix-karaf-4429-3.0.5
Switched to branch 'fix-karaf-4429-3.0.5'
Handwritten:karaf cristcost$ mvn clean install -q -pl exception
Handwritten:karaf cristcost$ cp exception/target/org.apache.karaf.exception-3.0.5.jar ..
Handwritten:karaf cristcost$ git checkout fix-karaf-4429-4.0.4
Switched to branch 'fix-karaf-4429-4.0.4'
Handwritten:karaf cristcost$ mvn clean install -q -pl exception
Handwritten:karaf cristcost$ cp exception/target/org.apache.karaf.exception-4.0.4.jar ..
Handwritten:karaf cristcost$ cd ..
Handwritten:test cristcost$ ll
total 72
drwxr-xr-x@ 15 cristcost staff 510 21 Mar 15:47 apache-karaf-4.0.4
drwxr-xr-x@ 16 cristcost staff 544 21 Mar 15:50 apache-servicemix-5.3.0
drwxr-xr-x@ 15 cristcost staff 510 21 Mar 11:56 apache-servicemix-6.1.0
drwxrwxr-x@ 15 cristcost staff 510 21 Mar 11:56 apache-servicemix-7.0.0.M1
drwxr-xr-x 49 cristcost staff 1666 21 Mar 15:56 karaf
-rw-r--r-- 1 cristcost staff 8833 21 Mar 15:54 org.apache.karaf.exception-2.4.0.jar
-rw-r--r-- 1 cristcost staff 9147 21 Mar 15:55 org.apache.karaf.exception-3.0.5.jar
-rw-r--r-- 1 cristcost staff 9147 21 Mar 15:57 org.apache.karaf.exception-4.0.4.jar
# copy the JARs to the installations
Handwritten:test cristcost$ cp org.apache.karaf.exception-2.4.0.jar apache-servicemix-5.3.0/lib/endorsed/
Handwritten:test cristcost$ cp org.apache.karaf.exception-3.0.5.jar apache-servicemix-6.1.0/lib/endorsed/
Handwritten:test cristcost$ cp org.apache.karaf.exception-4.0.4.jar apache-servicemix-7.0.0.M1/lib/endorsed/
Handwritten:test cristcost$ cp org.apache.karaf.exception-4.0.4.jar apache-karaf-4.0.4/lib/endorsed/
Handwritten:test cristcost$ apache-karaf-4.0.4/bin/karaf
__ __ ____
/ //_/____ __________ _/ __/
/ ,< / __ `/ ___/ __ `/ /_
/ /| |/ /_/ / / / /_/ / __/
/_/ |_|\__,_/_/ \__,_/_/
Apache Karaf (4.0.4)
Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown Karaf.
karaf@root()> log:clear
karaf@root()> install foo
Bundle IDs:
Error executing command: Error installing bundles:
Unable to install bundle foo
karaf@root()> log:display
2016-03-21 16:01:16,715 | ERROR | nsole user karaf | ShellUtil | 44 - org.apache.karaf.shell.core - 4.0.4 | Exception caught while executing command
org.apache.karaf.shell.support.MultiException: Error installing bundles:
Unable to install bundle foo
at org.apache.karaf.shell.support.MultiException.throwIf(MultiException.java:61)
at org.apache.karaf.bundle.command.Install.execute(Install.java:116)[24:org.apache.karaf.bundle.core:4.0.4]
at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:83)[44:org.apache.karaf.shell.core:4.0.4]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67)[44:org.apache.karaf.shell.core:4.0.4]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:87)[44:org.apache.karaf.shell.core:4.0.4]
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)[44:org.apache.karaf.shell.core:4.0.4]
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)[44:org.apache.karaf.shell.core:4.0.4]
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[44:org.apache.karaf.shell.core:4.0.4]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182)[44:org.apache.karaf.shell.core:4.0.4]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119)[44:org.apache.karaf.shell.core:4.0.4]
at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94)[44:org.apache.karaf.shell.core:4.0.4]
at org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:270)[44:org.apache.karaf.shell.core:4.0.4]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_60]
Caused by: java.lang.Exception: Unable to install bundle foo
at org.apache.karaf.bundle.command.Install.execute(Install.java:79)[24:org.apache.karaf.bundle.core:4.0.4]
... 11 more
Caused by: org.osgi.framework.BundleException: Unable to cache bundle: foo
at org.apache.felix.framework.Felix.installBundle(Felix.java:2975)[org.apache.felix.framework-5.4.0.jar:]
at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:167)[org.apache.felix.framework-5.4.0.jar:]
at org.apache.karaf.bundle.command.Install.execute(Install.java:77)[24:org.apache.karaf.bundle.core:4.0.4]
... 11 more
Caused by: java.net.MalformedURLException: no protocol: foo
at java.net.URL.<init>(URL.java:586)[:1.8.0_60]
at org.apache.felix.framework.util.SecureAction.createURL(SecureAction.java:255)[org.apache.felix.framework-5.4.0.jar:]
at org.apache.felix.framework.cache.JarRevision.initialize(JarRevision.java:148)[org.apache.felix.framework-5.4.0.jar:]
at org.apache.felix.framework.cache.JarRevision.<init>(JarRevision.java:77)[org.apache.felix.framework-5.4.0.jar:]
at org.apache.felix.framework.cache.BundleArchive.createRevisionFromLocation(BundleArchive.java:878)[org.apache.felix.framework-5.4.0.jar:]
at org.apache.felix.framework.cache.BundleArchive.reviseInternal(BundleArchive.java:550)[org.apache.felix.framework-5.4.0.jar:]
at org.apache.felix.framework.cache.BundleArchive.<init>(BundleArchive.java:153)[org.apache.felix.framework-5.4.0.jar:]
at org.apache.felix.framework.cache.BundleCache.create(BundleCache.java:277)[org.apache.felix.framework-5.4.0.jar:]
at org.apache.felix.framework.Felix.installBundle(Felix.java:2971)[org.apache.felix.framework-5.4.0.jar:]
... 13 more
karaf@root()>
Handwritten:test cristcost$ apache-servicemix-5.3.0/bin/servicemix
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0
Please wait while Apache ServiceMix is starting...
100% [========================================================================]
____ _ __ __ _
/ ___| ___ _ ____ _(_) ___ ___| \/ (_)_ __
\___ \ / _ \ '__\ \ / / |/ __/ _ \ |\/| | \ \/ /
___) | __/ | \ V /| | (_| __/ | | | |> <
|____/ \___|_| \_/ |_|\___\___|_| |_|_/_/\_\
Apache ServiceMix (5.3.0)
Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or 'osgi:shutdown' to shutdown ServiceMix.
karaf@root> log:clear
karaf@root> install foo
Bundle IDs:
Error executing command: Error installing bundles:
Unable to install bundle foo
karaf@root> log:display
2016-03-21 16:02:48,516 | ERROR | l Console Thread | Console | ? ? | 20 - org.apache.karaf.shell.console - 2.4.0 | Exception caught while executing command
org.apache.karaf.shell.console.MultiException: Error installing bundles:
Unable to install bundle foo
at org.apache.karaf.shell.console.MultiException.throwIf(MultiException.java:91)
at org.apache.karaf.shell.osgi.InstallBundle.doExecute(InstallBundle.java:70)[22:org.apache.karaf.shell.osgi:2.4.0]
at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)[20:org.apache.karaf.shell.console:2.4.0]
at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)[20:org.apache.karaf.shell.console:2.4.0]
at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[20:org.apache.karaf.shell.console:2.4.0]
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)[20:org.apache.karaf.shell.console:2.4.0]
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)[20:org.apache.karaf.shell.console:2.4.0]
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[20:org.apache.karaf.shell.console:2.4.0]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[20:org.apache.karaf.shell.console:2.4.0]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[20:org.apache.karaf.shell.console:2.4.0]
at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:92)[20:org.apache.karaf.shell.console:2.4.0]
at org.apache.karaf.shell.console.jline.Console.run(Console.java:196)[20:org.apache.karaf.shell.console:2.4.0]
at org.apache.karaf.shell.console.jline.DelayedStarted.run(DelayedStarted.java:79)[20:org.apache.karaf.shell.console:2.4.0]
Caused by: java.lang.Exception: Unable to install bundle foo
at org.apache.karaf.shell.osgi.InstallBundle.doExecute(InstallBundle.java:45)[22:org.apache.karaf.shell.osgi:2.4.0]
... 11 more
Caused by: org.osgi.framework.BundleException: Unable to cache bundle: foo
at org.apache.felix.framework.Felix.installBundle(Felix.java:2878)[org.apache.felix.framework-4.4.1.jar:]
at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:165)[org.apache.felix.framework-4.4.1.jar:]
at org.apache.karaf.shell.osgi.InstallBundle.doExecute(InstallBundle.java:43)[22:org.apache.karaf.shell.osgi:2.4.0]
... 11 more
Caused by: java.net.MalformedURLException: no protocol: foo
at java.net.URL.<init>(URL.java:586)[:1.8.0_60]
at org.apache.felix.framework.util.SecureAction.createURL(SecureAction.java:254)[org.apache.felix.framework-4.4.1.jar:]
at org.apache.felix.framework.cache.JarRevision.initialize(JarRevision.java:148)[org.apache.felix.framework-4.4.1.jar:]
at org.apache.felix.framework.cache.JarRevision.<init>(JarRevision.java:77)[org.apache.felix.framework-4.4.1.jar:]
at org.apache.felix.framework.cache.BundleArchive.createRevisionFromLocation(BundleArchive.java:878)[org.apache.felix.framework-4.4.1.jar:]
at org.apache.felix.framework.cache.BundleArchive.reviseInternal(BundleArchive.java:550)[org.apache.felix.framework-4.4.1.jar:]
at org.apache.felix.framework.cache.BundleArchive.<init>(BundleArchive.java:153)[org.apache.felix.framework-4.4.1.jar:]
at org.apache.felix.framework.cache.BundleCache.create(BundleCache.java:277)[org.apache.felix.framework-4.4.1.jar:]
at org.apache.felix.framework.Felix.installBundle(Felix.java:2874)[org.apache.felix.framework-4.4.1.jar:]
... 13 more
karaf@root>
Handwritten:test cristcost$ apache-servicemix-6.1.0/bin/servicemix
Please wait while Apache ServiceMix is starting...
100% [========================================================================]
Karaf started in 6s. Bundle stats: 236 active, 236 total
____ _ __ __ _
/ ___| ___ _ ____ _(_) ___ ___| \/ (_)_ __
\___ \ / _ \ '__\ \ / / |/ __/ _ \ |\/| | \ \/ /
___) | __/ | \ V /| | (_| __/ | | | |> <
|____/ \___|_| \_/ |_|\___\___|_| |_|_/_/\_\
Apache ServiceMix (6.1.0)
Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or 'osgi:shutdown' to shutdown ServiceMix.
karaf@root>log:clear
karaf@root>install foo
Bundle IDs:
Error executing command: Error installing bundles:
Unable to install bundle foo
karaf@root>log:display
2016-03-21 16:10:36,029 | ERROR | l for user karaf | ShellUtil | 27 - org.apache.karaf.shell.console - 3.0.5 | Exception caught while executing command
org.apache.karaf.shell.console.MultiException: Error installing bundles:
Unable to install bundle foo
at org.apache.karaf.shell.console.MultiException.throwIf(MultiException.java:92)
at org.apache.karaf.bundle.command.Install.doExecute(Install.java:69)
at org.apache.karaf.shell.console.AbstractAction.execute(AbstractAction.java:33)[27:org.apache.karaf.shell.console:3.0.5]
at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:39)[27:org.apache.karaf.shell.console:3.0.5]
at org.apache.karaf.shell.commands.basic.AbstractCommand.execute(AbstractCommand.java:33)[27:org.apache.karaf.shell.console:3.0.5]
at Proxye816775e_f1f1_47a6_b230_fa1d2776681f.execute(Unknown Source)[:]
at Proxye816775e_f1f1_47a6_b230_fa1d2776681f.execute(Unknown Source)[:]
at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[27:org.apache.karaf.shell.console:3.0.5]
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)[27:org.apache.karaf.shell.console:3.0.5]
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)[27:org.apache.karaf.shell.console:3.0.5]
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[27:org.apache.karaf.shell.console:3.0.5]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182)[27:org.apache.karaf.shell.console:3.0.5]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119)[27:org.apache.karaf.shell.console:3.0.5]
at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94)
at org.apache.karaf.shell.console.impl.jline.ConsoleImpl.run(ConsoleImpl.java:210)
at org.apache.karaf.shell.console.impl.jline.LocalConsoleManager$2$1$1.run(LocalConsoleManager.java:109)
at java.security.AccessController.doPrivileged(Native Method)[:1.8.0_60]
at org.apache.karaf.jaas.modules.JaasHelper.doAs(JaasHelper.java:57)[28:org.apache.karaf.jaas.modules:3.0.5]
at org.apache.karaf.shell.console.impl.jline.LocalConsoleManager$2$1.run(LocalConsoleManager.java:102)[27:org.apache.karaf.shell.console:3.0.5]
Caused by: java.lang.Exception: Unable to install bundle foo
at org.apache.karaf.bundle.command.Install.doExecute(Install.java:45)
... 17 more
Caused by: org.osgi.framework.BundleException: Unable to cache bundle: foo
at org.apache.felix.framework.Felix.installBundle(Felix.java:2870)
at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:165)
at org.apache.karaf.bundle.command.Install.doExecute(Install.java:43)
... 17 more
Caused by: java.net.MalformedURLException: no protocol: foo
at java.net.URL.<init>(URL.java:586)[:1.8.0_60]
at org.apache.felix.framework.util.SecureAction.createURL(SecureAction.java:254)
at org.apache.felix.framework.cache.JarRevision.initialize(JarRevision.java:148)
at org.apache.felix.framework.cache.JarRevision.<init>(JarRevision.java:77)
at org.apache.felix.framework.cache.BundleArchive.createRevisionFromLocation(BundleArchive.java:878)
at org.apache.felix.framework.cache.BundleArchive.reviseInternal(BundleArchive.java:550)
at org.apache.felix.framework.cache.BundleArchive.<init>(BundleArchive.java:153)
at org.apache.felix.framework.cache.BundleCache.create(BundleCache.java:277)
at org.apache.felix.framework.Felix.installBundle(Felix.java:2866)
... 19 more
karaf@root>
Handwritten:test cristcost$ apache-servicemix-7.0.0.M1/bin/servicemix
Please wait while Apache ServiceMix is starting...
100% [========================================================================]
Karaf started in 0s. Bundle stats: 10 active, 10 total
____ _ __ __ _
/ ___| ___ _ ____ _(_) ___ ___| \/ (_)_ __
\___ \ / _ \ '__\ \ / / |/ __/ _ \ |\/| | \ \/ /
___) | __/ | \ V /| | (_| __/ | | | |> <
|____/ \___|_| \_/ |_|\___\___|_| |_|_/_/\_\
Apache ServiceMix (7.0.0.M1)
Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or 'osgi:shutdown' to shutdown ServiceMix.
karaf@root>log:clear
karaf@root>install foo
Bundle IDs:
Error executing command: Error installing bundles:
Unable to install bundle foo
karaf@root>log:display
2016-03-21 16:11:36,869 | ERROR | Thread-15 | ShellUtil | 124 - org.apache.karaf.shell.core - 4.0.4 | Exception caught while executing command
org.apache.karaf.shell.support.MultiException: Error installing bundles:
Unable to install bundle foo
at org.apache.karaf.shell.support.MultiException.throwIf(MultiException.java:61)
at org.apache.karaf.bundle.command.Install.execute(Install.java:116)[101:org.apache.karaf.bundle.core:4.0.4]
at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:83)[124:org.apache.karaf.shell.core:4.0.4]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67)[124:org.apache.karaf.shell.core:4.0.4]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:87)[124:org.apache.karaf.shell.core:4.0.4]
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)[124:org.apache.karaf.shell.core:4.0.4]
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)[124:org.apache.karaf.shell.core:4.0.4]
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[124:org.apache.karaf.shell.core:4.0.4]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182)[124:org.apache.karaf.shell.core:4.0.4]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119)[124:org.apache.karaf.shell.core:4.0.4]
at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94)[124:org.apache.karaf.shell.core:4.0.4]
at org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:270)[124:org.apache.karaf.shell.core:4.0.4]
at org.apache.karaf.shell.impl.console.osgi.DelayedStarted.run(DelayedStarted.java:75)[124:org.apache.karaf.shell.core:4.0.4]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_60]
Caused by: java.lang.Exception: Unable to install bundle foo
at org.apache.karaf.bundle.command.Install.execute(Install.java:79)[101:org.apache.karaf.bundle.core:4.0.4]
... 12 more
Caused by: org.osgi.framework.BundleException: Unable to cache bundle: foo
at org.apache.felix.framework.Felix.installBundle(Felix.java:2975)[org.apache.felix.framework-5.4.0.jar:]
at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:167)[org.apache.felix.framework-5.4.0.jar:]
at org.apache.karaf.bundle.command.Install.execute(Install.java:77)[101:org.apache.karaf.bundle.core:4.0.4]
... 12 more
Caused by: java.net.MalformedURLException: no protocol: foo
at java.net.URL.<init>(URL.java:586)[:1.8.0_60]
at org.apache.felix.framework.util.SecureAction.createURL(SecureAction.java:255)[org.apache.felix.framework-5.4.0.jar:]
at org.apache.felix.framework.cache.JarRevision.initialize(JarRevision.java:148)[org.apache.felix.framework-5.4.0.jar:]
at org.apache.felix.framework.cache.JarRevision.<init>(JarRevision.java:77)[org.apache.felix.framework-5.4.0.jar:]
at org.apache.felix.framework.cache.BundleArchive.createRevisionFromLocation(BundleArchive.java:878)[org.apache.felix.framework-5.4.0.jar:]
at org.apache.felix.framework.cache.BundleArchive.reviseInternal(BundleArchive.java:550)[org.apache.felix.framework-5.4.0.jar:]
at org.apache.felix.framework.cache.BundleArchive.<init>(BundleArchive.java:153)[org.apache.felix.framework-5.4.0.jar:]
at org.apache.felix.framework.cache.BundleCache.create(BundleCache.java:277)[org.apache.felix.framework-5.4.0.jar:]
at org.apache.felix.framework.Felix.installBundle(Felix.java:2971)[org.apache.felix.framework-5.4.0.jar:]
... 14 more
karaf@root>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment