karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Achim Nierbeck <bcanh...@googlemail.com>
Subject Re: Weird behaviour when uninstalling feature with fragment
Date Mon, 29 May 2017 19:39:22 GMT
Hi Steinar ...

Not sure, but at first glance this reminds me of a system.exit somewhere in
the code.
May it be that something in your code fires this on a "change" or Bundle
stop?
But maybe a lib your using might fire this in case of an "error".

regards, Achim

2017-05-29 21:19 GMT+02:00 Steinar Bang <sb@dod.no>:

> >>>>> Steinar Bang <sb@dod.no>:
>
> > When I followed your instructions, and:
> >  - Created a maven module that rebundled the liquibase-slf4j jar into an
> >    OSGi bundle fragment (as outlined in your gist)
> >  - Modified the feature.xml file as outlined in the quoted file above
> >    (the start levels are important)
>
> It works: ie. the feature installs, and liquibase output ends up in
> karaf.log.
>
> However, when I uninstall the feature containing the fragment, karaf
> itself shuts down.
>
> Has anyone else seen something similar?
> Is this expected behaviour of fragments?
>
> If I remove the liquibase-slf4j-osgi fragment OSGi bundle from the
> feature, then liquibase output ends up on the karaf console, but there
> are no strange side effects from uninstalling the feature.
>
> Here's karaf.log output from the shutdown that happens caused by feature
> uninstall (the unexpected stuff is from "2017-05-28T23:30:02,177"
> ("FelixShutdown"):
>
> 2017-05-28T23:30:01,840 | INFO  | pipe-feature:install
> ukelonn-db-derby-test | FeaturesServiceImpl              | 9 -
> org.apache.karaf.features.core - 4.1.1 | Removing features:
> feature:ukelonn-db-derby-test/[1.0.0.SNAPSHOT,1.0.0.SNAPSHOT]
> 2017-05-28T23:30:02,040 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 | Changes to
> perform:
> 2017-05-28T23:30:02,040 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |   Region: root
> 2017-05-28T23:30:02,041 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |     Bundles to
> uninstall:
> 2017-05-28T23:30:02,041 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  derby/10.11.1000001.1616546
> 2017-05-28T23:30:02,041 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  no.priv.bang.ukelonn.api/1.0.0.SNAPSHOT
> 2017-05-28T23:30:02,041 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  no.priv.bang.ukelonn.db.liquibase/1.0.0.SNAPSHOT
> 2017-05-28T23:30:02,041 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  no.priv.bang.ukelonn.db.test/1.0.0.SNAPSHOT
> 2017-05-28T23:30:02,041 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  no.priv.bang.ukelonn.rebundled.liquibase-slf4j-osgi/2.0.0
> 2017-05-28T23:30:02,042 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  org.liquibase.core/3.5.3
> 2017-05-28T23:30:02,042 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  org.ops4j.base.spi/1.5.0
> 2017-05-28T23:30:02,042 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  org.ops4j.pax.jdbc/1.0.1
> 2017-05-28T23:30:02,042 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  org.ops4j.pax.jdbc.derby/1.0.1
> 2017-05-28T23:30:02,042 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  org.osgi.service.jdbc/1.0.0.201505202023
> 2017-05-28T23:30:02,042 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  org.yaml.snakeyaml/1.17.0
> 2017-05-28T23:30:02,043 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 | Stopping bundles:
> 2017-05-28T23:30:02,045 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  org.yaml.snakeyaml/1.17.0
> 2017-05-28T23:30:02,046 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  org.osgi.service.jdbc/1.0.0.201505202023
> 2017-05-28T23:30:02,046 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  org.ops4j.pax.jdbc/1.0.1
> 2017-05-28T23:30:02,049 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  org.ops4j.base.spi/1.5.0
> 2017-05-28T23:30:02,049 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  org.liquibase.core/3.5.3
> 2017-05-28T23:30:02,050 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  no.priv.bang.ukelonn.db.test/1.0.0.SNAPSHOT
> 2017-05-28T23:30:02,051 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  no.priv.bang.ukelonn.db.liquibase/1.0.0.SNAPSHOT
> 2017-05-28T23:30:02,052 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  no.priv.bang.ukelonn.api/1.0.0.SNAPSHOT
> 2017-05-28T23:30:02,052 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  org.ops4j.pax.jdbc.derby/1.0.1
> 2017-05-28T23:30:02,054 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  derby/10.11.1000001.1616546
> 2017-05-28T23:30:02,078 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 | Uninstalling
> bundles:
> 2017-05-28T23:30:02,079 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  derby/10.11.1000001.1616546
> 2017-05-28T23:30:02,084 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  no.priv.bang.ukelonn.api/1.0.0.SNAPSHOT
> 2017-05-28T23:30:02,089 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  no.priv.bang.ukelonn.db.liquibase/1.0.0.SNAPSHOT
> 2017-05-28T23:30:02,094 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  no.priv.bang.ukelonn.db.test/1.0.0.SNAPSHOT
> 2017-05-28T23:30:02,113 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  no.priv.bang.ukelonn.rebundled.liquibase-slf4j-osgi/2.0.0
> 2017-05-28T23:30:02,118 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  org.liquibase.core/3.5.3
> 2017-05-28T23:30:02,123 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  org.ops4j.base.spi/1.5.0
> 2017-05-28T23:30:02,128 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  org.ops4j.pax.jdbc/1.0.1
> 2017-05-28T23:30:02,138 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  org.ops4j.pax.jdbc.derby/1.0.1
> 2017-05-28T23:30:02,150 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  org.osgi.service.jdbc/1.0.0.201505202023
> 2017-05-28T23:30:02,158 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  org.yaml.snakeyaml/1.17.0
> 2017-05-28T23:30:02,168 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 | Refreshing
> bundles:
> 2017-05-28T23:30:02,168 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  derby/10.11.1000001.1616546 (Bundle will be uninstalled)
> 2017-05-28T23:30:02,168 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  no.priv.bang.ukelonn.api/1.0.0.SNAPSHOT (Bundle will be uninstalled)
> 2017-05-28T23:30:02,168 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  no.priv.bang.ukelonn.db.liquibase/1.0.0.SNAPSHOT (Bundle will be
> uninstalled)
> 2017-05-28T23:30:02,169 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  no.priv.bang.ukelonn.db.test/1.0.0.SNAPSHOT (Bundle will be uninstalled)
> 2017-05-28T23:30:02,169 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  no.priv.bang.ukelonn.rebundled.liquibase-slf4j-osgi/2.0.0 (Bundle will
> be uninstalled)
> 2017-05-28T23:30:02,169 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  org.liquibase.core/3.5.3 (Bundle will be uninstalled)
> 2017-05-28T23:30:02,169 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  org.ops4j.base.spi/1.5.0 (Bundle will be uninstalled)
> 2017-05-28T23:30:02,169 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  org.ops4j.pax.jdbc/1.0.1 (Bundle will be uninstalled)
> 2017-05-28T23:30:02,169 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  org.ops4j.pax.jdbc.derby/1.0.1 (Bundle will be uninstalled)
> 2017-05-28T23:30:02,169 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  org.osgi.service.jdbc/1.0.0.201505202023 (Bundle will be uninstalled)
> 2017-05-28T23:30:02,170 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 |
>  org.yaml.snakeyaml/1.17.0 (Bundle will be uninstalled)
> 2017-05-28T23:30:02,177 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>             | 9 - org.apache.karaf.features.core - 4.1.1 | Done.
> 2017-05-28T23:30:02,177 | INFO  | FelixShutdown    | BlueprintExtender
>             | 12 - org.apache.aries.blueprint.core - 1.8.0 | Destroying
> BlueprintContainer for bundle org.apache.karaf.shell.core/4.1.1
> 2017-05-28T23:30:02,186 | INFO  | FelixShutdown    | BlueprintExtender
>             | 12 - org.apache.aries.blueprint.core - 1.8.0 | Destroying
> BlueprintContainer for bundle org.apache.karaf.jaas.blueprint.config/4.1.1
> 2017-05-28T23:30:02,191 | INFO  | FelixShutdown    | BlueprintExtender
>             | 12 - org.apache.aries.blueprint.core - 1.8.0 | Destroying
> BlueprintContainer for bundle org.apache.aries.blueprint.cm/1.1.0
> 2017-05-28T23:30:02,197 | INFO  | FelixShutdown    | BlueprintExtender
>             | 12 - org.apache.aries.blueprint.core - 1.8.0 | Destroying
> BlueprintContainer for bundle org.apache.aries.blueprint.core/1.8.0
> 2017-05-28T23:30:02,210 | INFO  | FelixStartLevel  | CommandExtension
>            | 42 - org.apache.karaf.shell.core - 4.1.1 | Unregistering
> commands for bundle org.apache.karaf.event/4.1.1
> 2017-05-28T23:30:02,213 | INFO  | FelixStartLevel  | CommandExtension
>            | 42 - org.apache.karaf.shell.core - 4.1.1 | Unregistering
> commands for bundle org.apache.karaf.system.core/4.1.1
> 2017-05-28T23:30:02,218 | INFO  | FelixStartLevel  | CommandExtension
>            | 42 - org.apache.karaf.shell.core - 4.1.1 | Unregistering
> commands for bundle org.apache.karaf.shell.ssh/4.1.1
> 2017-05-28T23:30:02,233 | INFO  | FelixStartLevel  | CommandExtension
>            | 42 - org.apache.karaf.shell.core - 4.1.1 | Unregistering
> commands for bundle org.apache.karaf.kar.core/4.1.1
> 2017-05-28T23:30:02,234 | INFO  | FelixStartLevel  | CommandExtension
>            | 42 - org.apache.karaf.shell.core - 4.1.1 | Unregistering
> commands for bundle org.apache.karaf.diagnostic.core/4.1.1
> 2017-05-28T23:30:02,234 | INFO  | FelixStartLevel  | CommandExtension
>            | 42 - org.apache.karaf.shell.core - 4.1.1 | Unregistering
> commands for bundle org.apache.karaf.package.core/4.1.1
> 2017-05-28T23:30:02,235 | INFO  | FelixStartLevel  | CommandExtension
>            | 42 - org.apache.karaf.shell.core - 4.1.1 | Unregistering
> commands for bundle org.apache.karaf.shell.commands/4.1.1
> 2017-05-28T23:30:02,235 | INFO  | FelixStartLevel  | CommandExtension
>            | 42 - org.apache.karaf.shell.core - 4.1.1 | Unregistering
> commands for bundle org.apache.karaf.deployer.kar/4.1.1
> 2017-05-28T23:30:02,236 | INFO  | FelixStartLevel  | CommandExtension
>            | 42 - org.apache.karaf.shell.core - 4.1.1 | Unregistering
> commands for bundle org.apache.karaf.features.command/4.1.1
> 2017-05-28T23:30:02,238 | INFO  | FelixStartLevel  | CommandExtension
>            | 42 - org.apache.karaf.shell.core - 4.1.1 | Unregistering
> commands for bundle org.apache.karaf.service.core/4.1.1
> 2017-05-28T23:30:02,238 | INFO  | FelixStartLevel  | CommandExtension
>            | 42 - org.apache.karaf.shell.core - 4.1.1 | Unregistering
> commands for bundle org.apache.karaf.bundle.core/4.1.1
> 2017-05-28T23:30:02,239 | INFO  | FelixStartLevel  | CommandExtension
>            | 42 - org.apache.karaf.shell.core - 4.1.1 | Unregistering
> commands for bundle org.apache.karaf.config.core/4.1.1
> 2017-05-28T23:30:02,242 | INFO  | FelixStartLevel  | CommandExtension
>            | 42 - org.apache.karaf.shell.core - 4.1.1 | Unregistering
> commands for bundle org.apache.karaf.jaas.command/4.1.1
> 2017-05-28T23:30:02,244 | INFO  | FelixStartLevel  | CommandExtension
>            | 42 - org.apache.karaf.shell.core - 4.1.1 | Unregistering
> commands for bundle org.apache.karaf.instance.core/4.1.1
> 2017-05-28T23:30:02,244 | INFO  | FelixStartLevel  | CommandExtension
>            | 42 - org.apache.karaf.shell.core - 4.1.1 | Unregistering
> commands for bundle org.apache.karaf.log.core/4.1.1
> 2017-05-28T23:30:02,254 | INFO  | FelixStartLevel  | core
>            | 16 - org.apache.aries.jmx.core - 1.1.7 | Unregistering
> org.osgi.jmx.service.cm.ConfigurationAdminMBean to MBeanServer
> com.sun.jmx.mbeanserver.JmxMBeanServer@67117f44 with name
> osgi.compendium:service=cm,version=1.3,framework=org.
> apache.felix.framework,uuid=46d6c27b-ef98-45cb-a32f-36e224a1c18d
> 2017-05-28T23:30:02,255 | INFO  | FelixStartLevel  | core
>            | 16 - org.apache.aries.jmx.core - 1.1.7 | Unregistering
> org.osgi.jmx.framework.ServiceStateMBean to MBeanServer
> com.sun.jmx.mbeanserver.JmxMBeanServer@67117f44 with name
> osgi.core:type=serviceState,version=1.7,framework=org.
> apache.felix.framework,uuid=46d6c27b-ef98-45cb-a32f-36e224a1c18d
> 2017-05-28T23:30:02,256 | INFO  | FelixStartLevel  | core
>            | 16 - org.apache.aries.jmx.core - 1.1.7 | Unregistering
> org.osgi.jmx.framework.BundleStateMBean to MBeanServer
> com.sun.jmx.mbeanserver.JmxMBeanServer@67117f44 with name
> osgi.core:type=bundleState,version=1.7,framework=org.
> apache.felix.framework,uuid=46d6c27b-ef98-45cb-a32f-36e224a1c18d
> 2017-05-28T23:30:02,256 | INFO  | FelixStartLevel  | core
>            | 16 - org.apache.aries.jmx.core - 1.1.7 | Unregistering
> org.osgi.jmx.framework.wiring.BundleWiringStateMBean to MBeanServer
> com.sun.jmx.mbeanserver.JmxMBeanServer@67117f44 with name
> osgi.core:type=wiringState,version=1.1,framework=org.
> apache.felix.framework,uuid=46d6c27b-ef98-45cb-a32f-36e224a1c18d
> 2017-05-28T23:30:02,256 | INFO  | FelixStartLevel  | core
>            | 16 - org.apache.aries.jmx.core - 1.1.7 | Unregistering
> org.osgi.jmx.framework.FrameworkMBean to MBeanServer
> com.sun.jmx.mbeanserver.JmxMBeanServer@67117f44 with name
> osgi.core:type=framework,version=1.7,framework=org.
> apache.felix.framework,uuid=46d6c27b-ef98-45cb-a32f-36e224a1c18d
> 2017-05-28T23:30:02,257 | INFO  | FelixStartLevel  | core
>            | 16 - org.apache.aries.jmx.core - 1.1.7 | Unregistering
> org.osgi.jmx.framework.PackageStateMBean to MBeanServer
> com.sun.jmx.mbeanserver.JmxMBeanServer@67117f44 with name
> osgi.core:type=packageState,version=1.5,framework=org.
> apache.felix.framework,uuid=46d6c27b-ef98-45cb-a32f-36e224a1c18d
> 2017-05-28T23:30:02,258 | WARN  | FelixStartLevel  | core
>            | 16 - org.apache.aries.jmx.core - 1.1.7 | Task rejected for JMX
> Notification dispatch of event [org.osgi.framework.
> ServiceEvent[source=[javax.management.MBeanServer]]] - Dispatcher may
> have been shutdown
> 2017-05-28T23:30:02,286 | INFO  | FelixStartLevel  | core
>            | 16 - org.apache.aries.jmx.core - 1.1.7 | Stopping JMX OSGi
> agent
> 2017-05-28T23:30:02,287 | INFO  | FelixStartLevel  | core
>            | 16 - org.apache.aries.jmx.core - 1.1.7 | Unregistering MBean
> with ObjectName [osgi.compendium:service=cm,version=1.3,framework=org.
> apache.felix.framework,uuid=46d6c27b-ef98-45cb-a32f-36e224a1c18d] for
> service with service.id [12]
> mai 28, 2017 11:30:02 PM org.apache.karaf.main.lock.SimpleFileLock lock
> INFO: Trying to lock C:\ProgramFiles\apache-karaf-4.1.1\lock
> mai 28, 2017 11:30:02 PM org.apache.karaf.main.lock.SimpleFileLock lock
> INFO: Lock acquired
>
>


-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Mime
View raw message