Hi, I have an issue after installing webconsole, when refreshing a bundle using spring-dm. I use linux version of karaf 2.2.9. Environment is : Java 1.6, Ubuntu 10.04. Here's how to reproduce:
Install karaf 2.2.9. Install feature spring-dm. Deploy (I use deploy folder) a bundle using spring. For example a simple bundle built with maven-bundle-plugin. with spring configuration without any bean declared, and no code. Such as: http://karaf.922171.n3.nabble.com/file/n4025939/test-webconsole-dm-1.0-SNAPSHOT.jar test-webconsole-dm-1.0-SNAPSHOT.jar Here is my spring config in META-INF/spring/ <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> </beans> And here is the pom : <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>test-webconsole-dm</groupId> <version>1.0-SNAPSHOT</version> <artifactId>test-webconsole-dm</artifactId> <packaging>bundle</packaging> <build> <plugins> <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <version>2.0.1</version> <extensions>true</extensions> <configuration> <instructions> <Bundle-SymbolicName>test-webconsole-dm</Bundle-SymbolicName> </instructions> </configuration> </plugin> </plugins> </build> </project> This bundle is correctly declared has started in karaf console and can be refreshed properly. Then: Install webconsole feature. Try to refresh the bundle Here is what I get in the logs : 2012-09-05 16:53:35,386 | DEBUG | Timer-1 | WaiterApplicationContextExecutor | 62 - org.springframework.osgi.extender - 1.2.1 | Closing appCtx for OsgiBundleXmlApplicationContext(bundle=test-webconsole-dm, config=osgibundle:/META-INF/spring/*.xml) 2012-09-05 16:53:35,386 | DEBUG | Timer-1 | WaiterApplicationContextExecutor | 62 - org.springframework.osgi.extender - 1.2.1 | Shutting down normally appCtx OsgiBundleXmlApplicationContext(bundle=test-webconsole-dm, config=osgibundle:/META-INF/spring/*.xml) *2012-09-05 16:53:45,385 | ERROR | elixPackageAdmin | RunnableTimedExecution | 62 - /org.springframework.osgi.extender - 1.2.1 | Closing runnable for context OsgiBundleXmlApplicationContext(bundle=test-webconsole-dm, config=osgibundle:/META-INF/spring/*.xml) did not finish in 10000ms; consider taking a snapshot and then shutdown the VM in case the thread still hangs/* 2012-09-05 16:53:45,386 | DEBUG | elixPackageAdmin | NamespacePlugins | 62 - org.springframework.osgi.extender - 1.2.1 | Removing handler test-webconsole-dm (test-webconsole-dm) 2012-09-05 16:53:45,389 | DEBUG | lixDispatchQueue | test-webconsole-dm | 64 - test-webconsole-dm - 1.0.0.SNAPSHOT | BundleEvent STOPPED 2012-09-05 16:53:45,389 | DEBUG | lixDispatchQueue | test-webconsole-dm | 64 - test-webconsole-dm - 1.0.0.SNAPSHOT | BundleEvent UNRESOLVED 2012-09-05 16:53:45,389 | DEBUG | elixPackageAdmin | ContextLoaderListener | 62 - org.springframework.osgi.extender - 1.2.1 | Scanning bundle [test-webconsole-dm (test-webconsole-dm)] for configurations... 2012-09-05 16:53:45,390 | DEBUG | elixPackageAdmin | ContextLoaderListener | 62 - org.springframework.osgi.extender - 1.2.1 | Creating an application context for bundle [test-webconsole-dm (test-webconsole-dm)] 2012-09-05 16:53:45,390 | INFO | elixPackageAdmin | ultOsgiApplicationContextCreator | 62 - org.springframework.osgi.extender - 1.2.1 | Discovered configurations {osgibundle:/META-INF/spring/*.xml} in bundle [test-webconsole-dm (test-webconsole-dm)] 2012-09-05 16:53:45,391 | DEBUG | elixPackageAdmin | ContextLoaderListener | 62 - org.springframework.osgi.extender - 1.2.1 | Asynchronous context creation for bundle [test-webconsole-dm (test-webconsole-dm)] 2012-09-05 16:53:45,391 | DEBUG | elixPackageAdmin | ContextLoaderListener | 62 - org.springframework.osgi.extender - 1.2.1 | Setting globally defined wait-for-dependencies timeout value=300000 ms, for bundle [test-webconsole-dm (test-webconsole-dm)] 2012-09-05 16:53:45,393 | DEBUG | ExtenderThread-7 | WaiterApplicationContextExecutor | 62 - org.springframework.osgi.extender - 1.2.1 | Starting first stage of refresh for OsgiBundleXmlApplicationContext(bundle=test-webconsole-dm, config=osgibundle:/META-INF/spring/*.xml) 2012-09-05 16:53:45,393 | DEBUG | elixPackageAdmin | BlueprintExtender | 9 - org.apache.aries.blueprint - 0.3.2 | Scanning bundle test-webconsole-dm for blueprint application 2012-09-05 16:53:45,393 | DEBUG | ExtenderThread-7 | WaiterApplicationContextExecutor | 62 - org.springframework.osgi.extender - 1.2.1 | Calling preRefresh on OsgiBundleXmlApplicationContext(bundle=test-webconsole-dm, config=osgibundle:/META-INF/spring/*.xml) 2012-09-05 16:53:45,394 | DEBUG | elixPackageAdmin | BlueprintExtender | 9 - org.apache.aries.blueprint - 0.3.2 | No blueprint application found in bundle test-webconsole-dm 2012-09-05 16:53:45,394 | INFO | ExtenderThread-7 | OsgiBundleXmlApplicationContext | 56 - org.springframework.context - 3.0.7.RELEASE | Refreshing OsgiBundleXmlApplicationContext(bundle=test-webconsole-dm, config=osgibundle:/META-INF/spring/*.xml): startup date [Wed Sep 05 16:53:45 CST 2012]; root of context hierarchy 2012-09-05 16:53:45,394 | INFO | ExtenderThread-7 | OsgiBundleXmlApplicationContext | 56 - org.springframework.context - 3.0.7.RELEASE | Application Context service already unpublished 2012-09-05 16:53:45,395 | INFO | raf-2.2.9/deploy | fileinstall | 6 - org.apache.felix.fileinstall - 3.2.4 | Started bundle: file:/home/gabriel/apache-karaf-2.2.9/deploy/test-webconsole-dm-1.0-SNAPSHOT.jar 2012-09-05 16:53:45,396 | DEBUG | lixDispatchQueue | test-webconsole-dm | 64 - test-webconsole-dm - 1.0.0.SNAPSHOT | BundleEvent RESOLVED 2012-09-05 16:53:45,396 | DEBUG | lixDispatchQueue | test-webconsole-dm | 64 - test-webconsole-dm - 1.0.0.SNAPSHOT | BundleEvent STARTED 2012-09-05 16:53:45,396 | DEBUG | lixDispatchQueue | framework | 0 - org.apache.felix.framework - 3.2.2 | FrameworkEvent PACKAGES REFRESHED 2012-09-05 16:53:45,398 | INFO | ExtenderThread-7 | XmlBeanDefinitionReader | 54 - org.springframework.beans - 3.0.7.RELEASE | Loading XML bean definitions from URL [bundle://64.0:0/META-INF/spring/webconsole-dm-test.xml] 2012-09-05 16:53:45,401 | DEBUG | ExtenderThread-7 | DefaultDocumentLoader | 54 - org.springframework.beans - 3.0.7.RELEASE | Using JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl] 2012-09-05 16:53:45,401 | DEBUG | Timer-1 | test-webconsole-dm | 64 - test-webconsole-dm - 1.0.0.SNAPSHOT | ServiceEvent UNREGISTERING 2012-09-05 16:53:45,402 | INFO | Timer-1 | OsgiBundleXmlApplicationContext | 56 - org.springframework.context - 3.0.7.RELEASE | Unpublishing application context OSGi service for bundle test-webconsole-dm (test-webconsole-dm) 2012-09-05 16:53:45,402 | INFO | Timer-1 | OsgiBundleXmlApplicationContext | 56 - org.springframework.context - 3.0.7.RELEASE | Closing OsgiBundleXmlApplicationContext(bundle=test-webconsole-dm, config=osgibundle:/META-INF/spring/*.xml): startup date [Wed Sep 05 16:51:53 CST 2012]; root of context hierarchy 2012-09-05 16:53:45,405 | DEBUG | Timer-1 | DefaultListableBeanFactory | 54 - org.springframework.beans - 3.0.7.RELEASE | Returning cached instance of singleton bean 'lifecycleProcessor' 2012-09-05 16:53:45,406 | INFO | Timer-1 | DefaultListableBeanFactory | 54 - org.springframework.beans - 3.0.7.RELEASE | Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5bab2ddb: defining beans []; root of factory hierarchy 2012-09-05 16:53:45,406 | DEBUG | Timer-1 | OsgiBundleXmlApplicationContext | 56 - org.springframework.context - 3.0.7.RELEASE | Destroying existing bundle scope beans... 2012-09-05 16:53:45,406 | INFO | Timer-1 | ContextLoaderListener | 62 - org.springframework.osgi.extender - 1.2.1 | Application context succesfully closed (OsgiBundleXmlApplicationContext(bundle=test-webconsole-dm, config=osgibundle:/META-INF/spring/*.xml)) 2012-09-05 16:53:45,410 | DEBUG | ExtenderThread-7 | PluggableSchemaResolver | 54 - org.springframework.beans - 3.0.7.RELEASE | Loading schema mappings from [META-INF/spring.schemas] 2012-09-05 16:53:45,410 | DEBUG | ExtenderThread-7 | PluggableSchemaResolver | 54 - org.springframework.beans - 3.0.7.RELEASE | Loaded schema mappings: {} 2012-09-05 16:53:45,411 | DEBUG | ExtenderThread-7 | NamespacePlugins | 62 - org.springframework.osgi.extender - 1.2.1 | Trying to resolving entity for null|http://www.springframework.org/schema/beans/spring-beans.xsd 2012-09-05 16:53:45,412 | DEBUG | ExtenderThread-7 | PluggableSchemaResolver | 54 - org.springframework.beans - 3.0.7.RELEASE | Found XML schema [http://www.springframework.org/schema/beans/spring-beans.xsd] in classpath: org/springframework/beans/factory/xml/spring-beans-3.0.xsd 2012-09-05 16:53:45,412 | DEBUG | ExtenderThread-7 | NamespacePlugins | 62 - org.springframework.osgi.extender - 1.2.1 | XML schema for null|http://www.springframework.org/schema/beans/spring-beans.xsd found inside Spring Beans (org.springframework.beans) 2012-09-05 16:53:45,424 | DEBUG | ExtenderThread-7 | aultBeanDefinitionDocumentReader | 54 - org.springframework.beans - 3.0.7.RELEASE | Loading bean definitions 2012-09-05 16:53:45,425 | DEBUG | ExtenderThread-7 | XmlBeanDefinitionReader | 54 - org.springframework.beans - 3.0.7.RELEASE | Loaded 0 bean definitions from location pattern [osgibundle:/META-INF/spring/*.xml] 2012-09-05 16:53:45,425 | DEBUG | ExtenderThread-7 | OsgiBundleXmlApplicationContext | 56 - org.springframework.context - 3.0.7.RELEASE | Bean factory for OsgiBundleXmlApplicationContext(bundle=test-webconsole-dm, config=osgibundle:/META-INF/spring/*.xml): org.springframework.beans.factory.support.DefaultListableBeanFactory@18e2c931: defining beans []; root of factory hierarchy 2012-09-05 16:53:45,425 | DEBUG | ExtenderThread-7 | OsgiBundleXmlApplicationContext | 56 - org.springframework.context - 3.0.7.RELEASE | Registering BundleContext as a bean named bundleContext 2012-09-05 16:53:45,426 | DEBUG | ExtenderThread-7 | WaiterApplicationContextExecutor | 62 - org.springframework.osgi.extender - 1.2.1 | Pre-refresh completed; determining dependencies... 2012-09-05 16:53:45,426 | DEBUG | ExtenderThread-7 | DependencyServiceManager | 62 - org.springframework.osgi.extender - 1.2.1 | Discovered local dependency factories: [] 2012-09-05 16:53:45,426 | DEBUG | ExtenderThread-7 | DependencyServiceManager | 62 - org.springframework.osgi.extender - 1.2.1 | 0 OSGi service dependencies, 0 unsatisfied (for beans []) in OsgiBundleXmlApplicationContext(bundle=test-webconsole-dm, config=osgibundle:/META-INF/spring/*.xml) 2012-09-05 16:53:45,426 | INFO | ExtenderThread-7 | WaiterApplicationContextExecutor | 62 - org.springframework.osgi.extender - 1.2.1 | No outstanding OSGi service dependencies, completing initialization for OsgiBundleXmlApplicationContext(bundle=test-webconsole-dm, config=osgibundle:/META-INF/spring/*.xml) 2012-09-05 16:53:45,426 | DEBUG | ExtenderThread-7 | WaiterApplicationContextExecutor | 62 - org.springframework.osgi.extender - 1.2.1 | Starting stage two for OsgiBundleXmlApplicationContext(bundle=test-webconsole-dm, config=osgibundle:/META-INF/spring/*.xml) 2012-09-05 16:53:45,426 | DEBUG | ExtenderThread-7 | WaiterApplicationContextExecutor | 62 - org.springframework.osgi.extender - 1.2.1 | Cancelled dependency watchdog... 2012-09-05 16:53:45,427 | DEBUG | ExtenderThread-8 | WaiterApplicationContextExecutor | 62 - org.springframework.osgi.extender - 1.2.1 | Completing refresh for OsgiBundleXmlApplicationContext(bundle=test-webconsole-dm, config=osgibundle:/META-INF/spring/*.xml) 2012-09-05 16:53:45,429 | DEBUG | ExtenderThread-8 | OsgiBundleXmlApplicationContext | 56 - org.springframework.context - 3.0.7.RELEASE | Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@49020230] 2012-09-05 16:53:45,429 | DEBUG | ExtenderThread-8 | OsgiBundleXmlApplicationContext | 56 - org.springframework.context - 3.0.7.RELEASE | Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster@22ddc2c2] 2012-09-05 16:53:45,430 | INFO | ExtenderThread-8 | DefaultListableBeanFactory | 54 - org.springframework.beans - 3.0.7.RELEASE | Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@18e2c931: defining beans []; root of factory hierarchy 2012-09-05 16:53:45,430 | DEBUG | ExtenderThread-8 | OsgiBundleXmlApplicationContext | 56 - org.springframework.context - 3.0.7.RELEASE | Unable to locate LifecycleProcessor with name 'lifecycleProcessor': using default [org.springframework.context.support.DefaultLifecycleProcessor@3a65fca] 2012-09-05 16:53:45,430 | DEBUG | ExtenderThread-8 | DefaultListableBeanFactory | 54 - org.springframework.beans - 3.0.7.RELEASE | Returning cached instance of singleton bean 'lifecycleProcessor' 2012-09-05 16:53:45,431 | INFO | ExtenderThread-8 | OsgiBundleXmlApplicationContext | 56 - org.springframework.context - 3.0.7.RELEASE | Publishing application context as OSGi service with properties {org.springframework.context.service.name=test-webconsole-dm, Bundle-SymbolicName=test-webconsole-dm, Bundle-Version=1.0.0.SNAPSHOT} 2012-09-05 16:53:45,432 | DEBUG | ExtenderThread-8 | OsgiBundleXmlApplicationContext | 56 - org.springframework.context - 3.0.7.RELEASE | Publishing service under classes {org.springframework.osgi.context.DelegatedExecutionOsgiBundleApplicationContext, org.springframework.osgi.context.ConfigurableOsgiBundleApplicationContext, org.springframework.context.ConfigurableApplicationContext, org.springframework.context.ApplicationContext, org.springframework.context.Lifecycle, org.springframework.beans.factory.ListableBeanFactory, org.springframework.beans.factory.HierarchicalBeanFactory, org.springframework.context.MessageSource, org.springframework.context.ApplicationEventPublisher, org.springframework.core.io.support.ResourcePatternResolver, org.springframework.beans.factory.BeanFactory, org.springframework.core.io.ResourceLoader, org.springframework.beans.factory.DisposableBean} 2012-09-05 16:53:45,438 | DEBUG | ExtenderThread-8 | test-webconsole-dm | 64 - test-webconsole-dm - 1.0.0.SNAPSHOT | ServiceEvent REGISTERED 2012-09-05 16:53:45,439 | DEBUG | ExtenderThread-8 | BlueprintListener | 31 - org.apache.karaf.shell.osgi - 2.2.9 | Spring app state changed to Started for bundle 64 2012-09-05 16:53:45,439 | INFO | ExtenderThread-8 | ContextLoaderListener | 62 - org.springframework.osgi.extender - 1.2.1 | Application context successfully refreshed (OsgiBundleXmlApplicationContext(bundle=test-webconsole-dm, config=osgibundle:/META-INF/spring/*.xml)) This happens in any value of timeout set in spring-dm extender. I don't understand how the installation of webconsole features could prevent proper refresh of a bundle using spring-dm extender... Is it a bug with webconsole ? Has anyone else seen this issue? Thank you. Best regards, Gabriel. -- View this message in context: http://karaf.922171.n3.nabble.com/Issue-with-spring-dm-use-when-webconsole-is-installed-tp4025939.html Sent from the Karaf - User mailing list archive at Nabble.com.
