2 Replies Latest reply on Oct 11, 2012 7:46 AM by jwcarman

    Installing Custom Feature File Crashes FuseESB...

    jwcarman

      I posted this on ServiceMix users email list also, but since I'm technically using Fuse ESB and not the "vanilla" ServiceMix installation, I thought I should try here instead:

       

      I've created my own feature.xml file that I'm trying to use to install everything we need for our application.  Simple enough, right?   That's what I thought.  However, when I use the features:install (after features:addurl to add it), it appears to have found all of my artifacts successfully.  Then, it starts down this path and the entire thing is just hung up...

       

      07:37:11,632 | INFO  | l Console Thread | FeaturesServiceImpl              | 41 - org.apache.karaf.features.core - 2.2.2.fuse-04-06 | Bundles to refresh: org.springframework.beans (73),

      org.springframework.context (75), org.springframework.aop (79)

      07:37:11,632 | INFO  | l Console Thread | FeaturesServiceImpl              | 41 - org.apache.karaf.features.core - 2.2.2.fuse-04-06 | Refreshing bundles: org.springframework.beans (73),

      org.springframework.context (75), org.springframework.aop (79)

      07:37:11,642 | INFO  | elixPackageAdmin | ComponentRegistryImpl            | 147 - org.apache.servicemix.jbi.runtime - 1.5.1.fuse-03-06 | JBI component unregistered with properties: {NAM

      E=servicemix-scripting, objectClass=[Ljava.lang.String;@1e412161, service.id=432, TYPE=service-engine}

      07:37:11,645 | INFO  | elixPackageAdmin | ManagementEndpointRegistry       | 101 - org.apache.servicemix.nmr.management - 1.5.1.fuse-03-06 | Unregistering endpoint: org.apache.servicemix

      .nmr.core.InternalEndpointWrapper@253e2a4c with properties {NAME=servicemix-scripting, objectClass=[Ljava.lang.String;@fefb1c0, service.id=433, TYPE=service-engine}

      07:37:11,650 | INFO  | elixPackageAdmin | ComponentImpl                    | 149 - org.apache.servicemix.jbi.deployer - 1.5.1.fuse-03-06 | Stopping component servicemix-scripting

      07:37:11,653 | INFO  | elixPackageAdmin | ComponentImpl                    | 149 - org.apache.servicemix.jbi.deployer - 1.5.1.fuse-03-06 | Shutting down component servicemix-scripting

      07:37:11,664 | INFO  | Timer-1          | OsgiBundleXmlApplicationContext  | 75 - org.springframework.context - 3.0.5.RELEASE | Unpublishing application context OSGi service for bundle A

      pache CXF Bundle Jar (org.apache.cxf.bundle)

      07:37:11,665 | INFO  | Timer-1          | OsgiBundleXmlApplicationContext  | 75 - org.springframework.context - 3.0.5.RELEASE | Closing OsgiBundleXmlApplicationContext(bundle=org.apache.

      cxf.bundle, config=osgibundle:/META-INF/spring/*.xml): startup date ; root of context hierarchy

      07:37:11,665 | INFO  | Timer-1          | DefaultListableBeanFactory       | 73 - org.springframework.beans - 3.0.5.RELEASE | Destroying singletons in org.springframework.beans.factory.s

      upport.DefaultListableBeanFactory@60204d14: defining beans [cxfOsgiProperties,org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,destinationRegistry,osgiServlet,org

      .springframework.osgi.service.exporter.support.OsgiServiceFactoryBean#0,org.springframework.osgi.service.exporter.support.OsgiServiceFactoryBean#1]; root of factory hierarchy

      07:37:11,666 | INFO  | Timer-1          | OsgiServiceFactoryBean           | 81 - org.springframework.osgi.core - 1.2.1 | Unregistered service [ServiceRegistrationWrapper for org.apache.

      felix.framework.ServiceRegistrationImpl@22ae2593]

      07:37:11,668 | INFO  | Timer-1          | OsgiServiceFactoryBean           | 81 - org.springframework.osgi.core - 1.2.1 | Unregistered service [ServiceRegistrationWrapper for org.apache.

      felix.framework.ServiceRegistrationImpl@529bc5b]

      07:37:11,668 | INFO  | Timer-1          | ContextLoaderListener            | 84 - org.springframework.osgi.extender - 1.2.1 | Application context succesfully closed (OsgiBundleXmlApplica

      tionContext(bundle=org.apache.cxf.bundle, config=osgibundle:/META-INF/spring/*.xml))

      07:37:11,685 | INFO  | elixPackageAdmin | OSGiExtensionLocator             |  -  -  | Removed the extensions for bundle 142

      07:37:11,686 | INFO  | elixPackageAdmin | OSGiExtensionLocator             |  -  -  | Removed the extensions for bundle 189

      07:37:11,686 | INFO  | elixPackageAdmin | OSGiExtensionLocator             |  -  -  | Removed the extensions for bundle 188

      07:37:11,690 | INFO  | elixPackageAdmin | HttpServiceFactoryImpl           | 158 - org.ops4j.pax.web.pax-web-runtime - 1.0.3 | Unbinding bundle: [org.apache.cxf.bundle ]

      07:37:11,693 | INFO  | elixPackageAdmin | JettyServerWrapper               | 160 - org.ops4j.pax.web.pax-web-jetty - 1.0.3 | ServletContext service already removed

      07:37:11,694 | INFO  | elixPackageAdmin | log                              | 116 - org.eclipse.jetty.util - 7.4.5.fuse20111017 | stopped HttpServiceContext{httpContext=DefaultHttpContext

      {bundle=org.apache.cxf.bundle }}

      07:37:11,729 | INFO  | elixPackageAdmin | ComponentImpl                    | 149 - org.apache.servicemix.jbi.deployer - 1.5.1.fuse-03-06 | Stopping component servicemix-cxf-se

      07:37:11,731 | INFO  | elixPackageAdmin | ComponentImpl                    | 149 - org.apache.servicemix.jbi.deployer - 1.5.1.fuse-03-06 | Shutting down component servicemix-cxf-se

      07:37:11,739 | INFO  | elixPackageAdmin | OsgiServiceFactoryBean           | 81 - org.springframework.osgi.core - 1.2.1 | Unregistered service [ServiceRegistrationWrapper for org.apache.

      felix.framework.ServiceRegistrationImpl@502438db]

        • 1. Re: Installing Custom Feature File Crashes FuseESB...
          gertv

          James,

           

          As mentioned on the ServiceMix mailing list, this happens in ServiceMix 4.4.x when a feature installs a bundle that triggers a refresh of the basic spring bundle (spring-core, spring-beans,...) - typical examples that cause this are things like JPA.  There are two known workaround for this problem:

          - switch to equinox instead of felix - for this use case, equinox seems to handle the bundle refresh better than Felix 3.x does, this problem is solved in Felix 4.x so future versions of ServiceMix will use that instead

          - add the features that trigger the refresh to the bootFeatures list: that way, all bundles will get installed and resolved together at startup and the additional refresh is no longer required

           

          Personally, I would recommend you to add the features to the boot features if you have to use Fuse ESB 4.4.x.  However, if you have the option to upgrade to the upcoming Fuse ESB 7 Enterprise (now available as beta), that one comes with Felix 4.x which also fixes the problem (you can take a look at http://fusesource.com/products/fuse-esb-enterprise/ for information about what else is new in that version).

           

           

          Regards,

           

          Gert Vanthienen

          • 2. Re: Installing Custom Feature File Crashes FuseESB...
            jwcarman

            We actually found that removing any reference to Spring jars from our features (by marking them as provided maven dependencies) fixed this issue.