6 Replies Latest reply on Sep 24, 2011 7:40 AM by Willem Jiang

    Servicemix-4.4.1-fuse: Could not start bundle due to two dependency ....

    ranthy reddy Newbie

      Installed 4.4.1 fuse and manually have to install several 3rd party jars in my local maven repo such as (Velocity 1.7_2, axiom-impl/1.2.12, abdera-core/1.1.2, abdera-extensions-main-1.1.2, abdera-i18n-1.1.2, abdera-parser/1.1.2, joda-time/1.6.2) which takes up lots of time.

      - Restart servicemix .

      - install  as I am only interested in having a Web Service suing top-down approach and deploying as OSGi bundle, I encounter the following error:

      Error executing command: Could not start bundle mvn:org.apache.servicemix/servicemix-cxf-bc/2011.02.1-fuse-00-06 in

      ure(s) servicemix-cxf-bc-2011.02.1-fuse-00-06: Unable to resolve module servicemix-cxf-bc because it is exp

      to package 'javax.servlet' from org.apache.geronimo.specs.geronimo-servlet_3.0_spec and org.apache.geronimo

      s.geronimo-servlet_2.5_spec via two dependency chains.

       

      Chain 1:

        servicemix-cxf-bc

          import: (&(package=javax.servlet)(version>=2.6.0))

            

       

          export: package=javax.servlet

        org.apache.geronimo.specs.geronimo-servlet_3.0_spec

       

      Chain 2:

        servicemix-cxf-bc

          import: (&(package=org.apache.ws.security.handler)(version>=1.6.0))

       

          export: package=org.apache.ws.security.handler; uses:=org.opensaml

        org.apache.ws.security.wss4j

          import: (package=org.opensaml)

            

       

          export: package=org.opensaml; uses:=javax.servlet

        org.apache.servicemix.bundles.opensaml

          import: (package=javax.servlet)

       

          export: package=javax.servlet

        org.apache.geronimo.specs.geronimo-servlet_2.5_spec

       

      ESB runtime info:

      osgi:list results:

        START LEVEL 100 , List Threshold: 50

         ID   State         Blueprint      Spring    Level  Name

      activemq-karaf (5.5.1.fuse-00-06)

      activemq-ra (5.5.1.fuse-00-06)

      activemq-core (5.5.1.fuse-00-06)

                                             Fragments: 62

      Apache Aries Transaction Manager (0.2.0.incubating)

      kahadb (5.5.1.fuse-00-06)

      activemq-pool (5.5.1.fuse-00-06)

      activemq-console (5.5.1.fuse-00-06)

      Commons Pool (1.5.4)

      geronimo-jms_1.1_spec (1.1.1)

      Apache ServiceMix :: Bundles :: commons-codec (1.3.0.3)

      geronimo-j2ee-management_1.1_spec (1.0.1)

      Apache ServiceMix Bundles: xpp3-1.1.4c (1.1.0.4c_3)

      Commons Collections (3.2.1)

      Apache ServiceMix Bundles: oro-2.0.8 (2.0.8.3)

      Apache ServiceMix :: Bundles :: jasypt (1.6.0.1)

      Apache ServiceMix :: Bundles :: commons-lang (2.4.0.4)

      Apache ServiceMix :: Bundles :: velocity (1.7.0.1)

      Apache ServiceMix :: Bundles :: jdom (1.1.0.3)

      activemq-blueprint (5.5.1.fuse-00-06)

                                             Hosts: 46

      Apache ServiceMix :: Specs :: Scripting API 1.0 (1.8.0)

      Apache XBean :: OSGI Blueprint Namespace Handler (3.7)

      Commons JEXL (2.0.1)

      activemq-broker.xml (0.0.0)

      Spring Beans (3.0.5.RELEASE)

      Spring Context Support (3.0.5.RELEASE)

      Spring Context (3.0.5.RELEASE)

      Spring Expression Language (3.0.5.RELEASE)

      Spring ASM (3.0.5.RELEASE)

      Spring Core (3.0.5.RELEASE)

      Spring AOP (3.0.5.RELEASE)

      Apache ServiceMix :: Bundles :: aopalliance (1.0.0.5)

      camel-karaf-commands (2.8.0.fuse-00-06)

      Apache ServiceMix :: Bundles :: jaxb-impl (2.2.1.1_1)

      camel-core (2.8.0.fuse-00-06)

      Commons Management (1.0)

      Apache ServiceMix :: Specs :: JAXB API 2.2 (1.8.0)

      Apache ServiceMix :: Specs :: Activation API 1.4 (1.8.0)

      Apache ServiceMix :: Specs :: Stax API 1.0 (1.8.0)

      spring-osgi-core (1.2.1)

      spring-osgi-io (1.2.1)

      spring-osgi-annotation (1.2.1)

      spring-osgi-extender (1.2.1)

      Apache ServiceMix :: Bundles :: cglib (2.1.0.3_7)

      camel-spring (2.8.0.fuse-00-06)

      Spring Transaction (3.0.5.RELEASE)

      Apache ServiceMix Bundles: dom4j-1.6.1 (1.6.1.2)

      Apache ServiceMix Bundles: xstream-1.3 (1.3.0.3)

      camel-jms (2.8.0.fuse-00-06)

      Spring JMS (3.0.5.RELEASE)

      activemq-camel (5.5.1.fuse-00-06)

      Apache ServiceMix :: Document (1.5.1.fuse-00-06)

      Apache ServiceMix :: NMR :: API (1.5.1.fuse-00-06)

      Apache ServiceMix :: NMR :: OSGi (1.5.1.fuse-00-06)

      Apache ServiceMix :: NMR :: Core (1.5.1.fuse-00-06)

      Apache ServiceMix :: NMR :: Management (1.5.1.fuse-00-06)

      Apache ServiceMix :: NMR :: Commands (1.5.1.fuse-00-06)

      Apache ServiceMix :: Utils (1.5.1.fuse-00-06)

      Apache ServiceMix :: Features :: Camel Support :: Component (4.4.1

      .fuse-00-06)

      Web Services Metadata 2.0 (1.1.3)

      Apache ServiceMix :: Specs :: JAXWS API 2.2 (1.8.0)

      Apache ServiceMix :: Specs :: SAAJ API 1.3 (1.8.0)

      Jetty :: JNDI Naming (7.4.1.v20110513)

      Jetty :: Continuation (7.4.1.v20110513)

      Jetty :: Http Utility (7.4.1.v20110513)

      Jetty :: Asynchronous HTTP Client (7.4.1.v20110513)

      Jetty :: Server Core (7.4.1.v20110513)

      Jetty :: Servlet Handling (7.4.1.v20110513)

      Jetty :: IO Utility (7.4.1.v20110513)

      Jetty :: Security (7.4.1.v20110513)

      Jetty :: XML utilities (7.4.1.v20110513)

      Jetty :: Utilities (7.4.1.v20110513)

      Jetty :: Plus (7.4.1.v20110513)

      Jetty :: JMX Management (7.4.1.v20110513)

      Jetty :: Utility Servlets and Filters (7.4.1.v20110513)

      Jetty :: Webapp Application Support (7.4.1.v20110513)

      geronimo-servlet_2.5_spec (1.1.2)

      JavaMail API (1.4.3)

      camel-blueprint (2.8.0.fuse-00-06)

      Apache ServiceMix :: Naming (1.5.1.fuse-00-06)

      Apache Aries Transaction Manager (0.3.0)

      Apache Aries Transaction Enlisting JDBC Datasource (0.3.0)

      Apache Aries Transaction Blueprint (0.3.0)

      Stax2 API (3.1.1)

      Woodstox XML-processor (4.1.1)

      Apache ServiceMix :: JBI :: OSGi (1.5.1.fuse-00-06)

      Apache ServiceMix :: JBI :: Runtime (1.5.1.fuse-00-06)

      Apache ServiceMix :: JBI :: Commands (1.5.1.fuse-00-06)

      Apache ServiceMix :: JBI :: Deployer (1.5.1.fuse-00-06)

      Apache ServiceMix :: Specs :: JBI API 1.0 (1.8.0)

      Apache ServiceMix :: Components :: Shared Libraries :: Common (201

      1.02.1.fuse-00-06)

      Apache ServiceMix :: Bundles :: wsdl4j (1.6.2.3)

      Apache XBean :: Classloader (3.7)

      Apache XBean :: Spring (3.7)

      Apache ServiceMix :: Bundles :: ant (1.7.0.4)

      Apache ServiceMix :: JBI :: Clustering :: Requestor (1.5.1.fuse-00

      -06)

      Apache ServiceMix :: JBI :: Clustering :: Engine (1.5.1.fuse-00-06

      )

      Apache ServiceMix :: JBI :: Clustering :: Config (1.5.1.fuse-00-06

      )

      OPS4J Pax Web - API (1.0.3)

      OPS4J Pax Web - Runtime (1.0.3)

      OPS4J Pax Web - Service SPI (1.0.3)

      OPS4J Pax Web - Jetty (1.0.3)

      OPS4J Pax Web - Extender - Whiteboard (1.0.3)

      OPS4J Pax Web - Extender - WAR (1.0.3)

      OPS4J Pax Url - war (1.2.6)

      OPS4J Pax Web - Jsp Support (1.0.3)

      OPS4J Pax Web - FileInstall Deployer (1.0.3)

      Apache ServiceMix :: Components :: File Binding Component (2011.02

      .1.fuse-00-06)

      Apache ServiceMix :: Components :: FTP Binding Component (2011.02.

      1.fuse-00-06)

      Commons Net (2.2)

      Apache ServiceMix :: Components :: HTTP Binding Component (2011.02

      .1.fuse-00-06)

      Apache ServiceMix :: Bundles :: jetty (6.1.26.1)

      Apache ServiceMix :: Bundles :: commons-httpclient (3.1.0.5)

      XmlSchema Core (2.0)

      Apache ServiceMix :: Components :: Shared Libraries :: SOAP Stack

      (2011.02.1.fuse-00-06)

      Apache ServiceMix :: Components :: Shared Libraries :: SOAP Stack

      v2 (2011.02.1.fuse-00-06)

      Apache ServiceMix :: Bundles :: xmlsec (1.4.5.1)

      WSS4J (1.6.1)

      Apache ServiceMix :: Components :: JMS Binding Component (2011.02.

      1.fuse-00-06)

      geronimo-j2ee-connector_1.5_spec (2.0.0)

      Apache ServiceMix :: Components :: Mail Binding Component (2011.02

      .1.fuse-00-06)

      Apache ServiceMix :: Components :: SMPP Binding Component (2011.02

      .1.fuse-00-06)

      Apache ServiceMix :: Bundles :: jsmpp (2.1.0.2)

      Apache ServiceMix :: Components :: SNMP Binding Component (2011.02

      .1.fuse-00-06)

      Apache ServiceMix :: Bundles :: snmp4j (1.8.1.4)

      Apache ServiceMix :: Components :: VFS Binding Component (2011.02.

      1.fuse-00-06)

      Apache ServiceMix :: Bundles :: commons-vfs (1.0.0.5)

      Apache ServiceMix :: Components :: Bean Service Engine (2011.02.1.

      fuse-00-06)

      Apache ServiceMix :: Components :: Camel Service Engine (2011.02.1

      .fuse-00-06)

      Apache ServiceMix :: Bundles :: mvel2 (2.0.8.4)

      Apache ServiceMix :: Components :: Drools Service Engine (2011.02.

      1.fuse-00-06)

      Apache ServiceMix :: Bundles :: antlr-runtime (3.0.1.2)

      Apache ServiceMix :: Bundles :: core (3.2.3.4)

      Apache ServiceMix :: Bundles :: quartz (1.8.5.1)

      Apache ServiceMix :: Bundles :: drools (5.1.1.1)

      Apache ServiceMix :: Components :: EIP Service Engine (2011.02.1.f

      use-00-06)

      Apache ServiceMix :: Components :: OSWorkflow Service Engine (2011

      .02.1.fuse-00-06)

      Apache ServiceMix :: Bundles :: oscore (2.2.4.4)

      Apache ServiceMix :: Bundles :: osworkflow (2.7.0.4)

      Apache ServiceMix :: Bundles :: propertyset (1.3.0.4)

      Apache ServiceMix :: Components :: Quartz Service Engine (2011.02.

      1.fuse-00-06)

      Groovy Runtime (1.8.0)

      ScriptEngines :: Groovy (1.1)

      ScriptEngines :: JavaScript (1.1)

      Apache ServiceMix :: Bundles :: js (1.0.0.7R1_3)

      Apache ServiceMix :: Components :: JSR-223 Scripting Service Engin

      e (2011.02.1.fuse-00-06)

      ScriptEngines :: JRuby (1.1)

      Apache ServiceMix :: Bundles :: jruby (1.1.2.3)

      Apache ServiceMix :: Components :: Validation Service Engine (2011

      .02.1.fuse-00-06)

      Apache ServiceMix :: Components :: Saxon Service Engine (2011.02.1

      .fuse-00-06)

      Apache ServiceMix :: Bundles :: saxon (9.1.0.8_1)

      Apache ServiceMix :: Components :: WS-Notification Service Engine

      (2011.02.1.fuse-00-06)

      jettison (1.3)

      Apache ServiceMix :: Bundles :: xmlbeans (2.5.0.1)

      Apache CXF Bundle Jar (2.4.2.fuse-00-06)

      Apache ServiceMix :: Bundles :: saaj-impl (1.3.2.2)

      Apache ServiceMix :: Bundles :: velocity (1.7.0.2)

      Joda-Time (1.6.2)

      Apache ServiceMix :: Bundles :: FastInfoset (1.2.7.3)

      Apache Neethi (3.0.0)

      Apache ServiceMix :: Bundles :: xmlresolver (1.2.0.3)

      Abdera Core (1.1.2)

      I18N Libraries (1.1.2)

      Apache ServiceMix :: Specs :: JSR-311 API 1.1 (1.8.0)

      Apache ServiceMix :: Bundles :: opensaml (2.4.1.1)

      Axiom API (1.2.12)

      Apache ServiceMix :: Features :: Examples :: CXF OSGi (4.4.1.fuse-00-06)

       

      Could you recommend a workaround or do you have any patch available. Appreciate any help.

      Thanks,

      Ranthy.

        • 1. Re: Servicemix-4.4.1-fuse: Could not start bundle due to two dependency ....
          Freeman(Yue) Fang Master

          Hi,

           

          Bundle mvn:org.apache.servicemix/servicemix-cxf-bc/2011.02.1-fuse-00-06 should get installed and started by default when you start FUSE ESB, but not the time when you install examples-cxf-wsdl-first-osgi-package feature, so I believe you modified $FUSE_ESB/etc/org.apache.karaf.features.cfg, is it right? I guess you remove the servicemix-cxf-bc feature there, right?  As cxf-wsdl-first-osgi-package example use servicemix-cxf-bc feature, so if you add it back, it should just work.

           

          Another workaround is that you edit

          $FUSE_ESB/system/org/apache/camel/karaf/apache-camel/2.8.0-fuse-00-06/apache-camel-2.8.0-fuse-00-06-features.xml

           

          change all

           

           

          then remove $FUSE_ESB/data folder and restart FUSE ESB.

           

          Freeman

          • 2. Re: Servicemix-4.4.1-fuse: Could not start bundle due to two dependency ....
            ranthy reddy Newbie

            Good news is Both "cxf-osgi" and "cxf-wsdl-first-osgi-package" are working properly.

            Just wanted to keep you informed about my progress:

            No I did not modify $FUSE_ESB/etc/org.apache.karaf.features.cfg file.

             

            Your suggested workaround to change  and I see in the 'log' file very useful and descriptive messages for web services startup such as:

            08:56:08,874 | INFO  | ExtenderThread-6 | ReflectionServiceFactoryBean     |  -  -  |

                    Creating Service HelloWorldImplService

                      from class org.apache.servicemix.examples.cxf.HelloWorld

            08:56:09,136 | INFO  | ExtenderThread-6 | ServerImpl                       |  -  -  |

                     Setting the server's publish address to be /HelloWorld

             

            08:58:49,228 | INFO  | l Console Thread | ultOsgiApplicationContextCreator | 85 - org.springframework.osgi.extender - 1.2.1 |

                  Discovered configurations in bundle

                    

            08:58:49,231 | INFO  | ExtenderThread-7 | OsgiBundleXmlApplicationContext  | 69 - org.springframework.context - 3.0.5.RELEASE |

                  Refreshing OsgiBundleXmlApplicationContext(bundle=wsdl-first-cxfse-bundle,

                   config=osgibundle:/META-INF/spring/*.xml): startup date ;

                   root of context hierarchy

            08:58:49,231 | INFO  | ExtenderThread-7 | OsgiBundleXmlApplicationContext  | 69 - org.springframework.context - 3.0.5.RELEASE |

                  Application Context service already unpublished

            08:58:49,236 | INFO  | ExtenderThread-7 | XmlBeanDefinitionReader          | 67 - org.springframework.beans - 3.0.5.RELEASE |

                  Loading XML bean definitions from URL bundle://218.0:0/META-INF/spring/beans.xml

            08:58:49,236 | INFO  | l Console Thread | ultOsgiApplicationContextCreator | 85 - org.springframework.osgi.extender - 1.2.1 |

                 Discovered configurations in bundle

                  

             

             

            08:58:49,355 | INFO  | xtenderThread-10 | ReflectionServiceFactoryBean     |  -  -  |

                            Creating Service PersonService from class

                             org.apache.servicemix.samples.wsdl_first.Person

            08:58:49,393 | INFO  | ExtenderThread-9 | ServerImpl                       |  -  -  |

            Setting the server's publish address to be http://localhost:8092/PersonService/

            08:58:49,395 | INFO  | ExtenderThread-9 | EndpointExporter                 |

                 153 - servicemix-common - 2011.02.1.fuse-00-06 | All endpoints have been deployed and

                components initialized. Registering service assembly.

            08:58:49,401 | INFO  | ExtenderThread-9 | ServiceAssemblyImpl              |

            151 - org.apache.servicemix.jbi.deployer - 1.5.1.fuse-00-06 | Changing SA state to Stopped

            08:58:49,406 | INFO  | ExtenderThread-9 | ManagementEndpointRegistry       |

            98 - org.apache.servicemix.nmr.management - 1.5.1.fuse-00-06 |

                        Registering endpoint: org.apache.servicemix.nmr.core.InternalEndpointWrapper@41ed0c28 with properties

                        {ENDPOINT_NAME=soap, javax.jbi.servicedesc.ServiceEndpoint=org.apache.servicemix.common.ExternalEndpoint@f89fd2,

                        jbi.external=true, NAME={http://servicemix.apache.org/samples/wsdl-first}PersonService:soap, 

                        SERVICE_NAME=PersonService,

                        UNTARGETABLE=true, WSDL_URL=document:4}

            08:58:49,407 | INFO  | xtenderThread-10 | ServerImpl                       |  -  -  |

                     Setting the server's publish address to be jbi://ID-162-36-245-253-132916bfe8a-2-0

             

            Freeman, could you explain this behavior that I ran into 'two dependency chains' and without making any changes how this starts working properly. Also, the "fuse-esb-4.4.1" zip file missing lots of jars that I have to manually install in my local maven repo. This leads me to think what more problems I run into when I start I investigating the  routing, ActiveMQ, JMS, callout to EJBs in a different JVM etc.

             

            I know you guys are super overloaded and still trying to resolve our user issues and I truly appreciate that.

             

            -thanks for your time,

            RR.

            • 3. Re: Servicemix-4.4.1-fuse: Could not start bundle due to two dependency ....
              Freeman(Yue) Fang Master

              Hi,

               

              You mentioned

              the "fuse-esb-4.4.1" zip file missing lots of jars that I have to manually install in my local maven repo

               

              Could you elaborate which jars you think it miss?

               

              Some points here

              1. Fuse ESB not ship all jars with it, it only ship jars needed for default installed feature which ensure the launch time is reasonable

              so

              2. during runtime, it will download necessary artifacts through maven automatically, so ensure you have correct internet access,correct maven configuration, you needn't manually download anything.

              3. We can provide offline repo with each FUSE ESB release but it's not free.

               

              I strongly suggest you have a machine which have direct internet access(no proxy), which can help narrow down the real problem.

               

              And a quick question, could you build other projects with maven on this machine? for example you build an example with FUSE ESB kit, this at least can prove if maven works can your machine.

               

              Freeman

               

              Edited by: ffang on Sep 23, 2011 12:45 AM

              • 4. Re: Servicemix-4.4.1-fuse: Could not start bundle due to two dependency ....
                ranthy reddy Newbie

                Thanks for your response, Freeman.

                I build all the examples related to Web Services fine using maven

                command and also using  with release.

                 

                The missing jars are reported when I deploy in smx-container using karaf console

                in with the command features:install examples-cxf-wsdl-first-osgi-package ( I tried placing the deployable jar into 'deploy' folder as well ).

                The following ones I had to manually go install into my local maven repo:

                  1. velocity 1.7.2

                  2. axiom-impl/1.2.12

                  3. abdera-core/1.1.2

                  4. abdera-extensions-main-1.1.2

                  5. abdera-i18n-1.1.2

                  6. abdera-parser/1.1.2

                  7. joda-time/1.6.2

                 

                I will try to remember to remove FUSE_HOME/data folder before I re-start the <servicemix.bat> job, if and only if I encounter any isntall issues.

                 

                As always, thanks for taking time to repsond.

                -rr.

                • 5. Re: Servicemix-4.4.1-fuse: Could not start bundle due to two dependency ....
                  Willem Jiang Master

                  Here is the quote from the Jetty development plan

                   

                  "The Jetty 7 version targets the 2.5 servlet specification and the 1.5 JVM. The Jetty 8 version targets the 3.0 servlet specification and the 1.6 JVM."

                   

                  As ServiceMix is using the Jetty7, I don't think it's a good idea to replace all the Servlet API 2.5 with Servlet API 3.0.

                   

                  Willem

                  • 6. Re: Servicemix-4.4.1-fuse: Could not start bundle due to two dependency ....
                    Freeman(Yue) Fang Master

                    Hi,

                     

                    You actually needn't download anything, download manually means your maven setting  somehow is wrong, I strongly suggest you should figure out it and fix it before you move on, otherwise you will keeping seeing wired problems.

                     

                    Today I manage to produce every wired issue  you encounter on my machine, I just disconnect internet and remove some jars from my local maven repo, to simulate your scenario.

                     

                    Each problem you described here is caused by can't download the necessary artifacts. Even though you manually download it, as you didn't remove $FUSE_ESB/data folder afterwards, so you still keep seeing errors.

                     

                    If you remove $FUSE_ESB/data folder after you mannually download the artifacts, you will find you won't need change servlet version in $FUSE_ESB/system/org/apache/camel/karaf/apache-camel/2.8.0-fuse-00-06/apache-camel-2.8.0-fuse-00-06-features.xml and everything should be ok by default FUSE ESB configurations,

                    so all root cause is your maven configuration(or the proxy) is wrong, you really need figure it out.

                     

                    Freeman