6 Replies Latest reply on Apr 22, 2011 11:02 AM by janitorial16

    Code-First   and Wsdl-First

    atlantix

      I started two project using wsdl-first archetype and code-first archetype

       

      I used mvn to compile and then I deployed

       

      the wsdl-first web service deployed successfully and worked perfectly

      the code-first failed at deployment giving the following message

      installed but I couldnt start it

       

       

      -->

      Error executing command: The bundle "code-first_0.0.1.SNAPSHOT " could not be resolved. Reason: Missing Constraint: Import-Package: org.springframework.beans.factory.config; version="[2.5.0,3.0.0)"

       

       

       

       

       

       

       

      trying to debug it ??

       

       

       

      karaf@root> headers  225

       

      A CXF Code First OSGi Project (225)

      -


      Manifest-Version = 1.0

      Bnd-LastModified = 1299575066837

      Tool = Bnd-1.15.0

      Built-By = someone

      Build-Jdk = 1.6.0_23

      Created-By = Apache Maven Bundle Plugin

       

      Bundle-Name = A CXF Code First OSGi Project

      Bundle-SymbolicName = code-first

      Bundle-Version = 0.0.1.SNAPSHOT

      Bundle-ManifestVersion = 2

       

      Import-Package =

              META-INF.cxf,

              META-INF.cxf.osgi,

              javax.jws;version="[2.0,3)",

              javax.wsdl,

              javax.xml.bind,

              javax.xml.bind.annotation,

              javax.xml.namespace,

              javax.xml.ws;version="[2.1,3)",

              org.apache.cxf.bus,

              org.apache.cxf.bus.resource,

              org.apache.cxf.bus.spring,

              org.apache.cxf.configuration.spring,

              org.apache.cxf.jaxws,

              org.apache.cxf.resource,

              org.apache.cxf.transport.http_osgi,

              org.springframework.beans.factory.config;version="[2.5,3)"

      Export-Package =

              ex.tuto.payments.code_first.client;uses:="ex.tuto.payments.code_first,org.apache.cxf.jaxws,javax.xml.ws",

              ex.tuto.payments.code_first;

                      uses:="ex.tuto.payments.code_first.types,

                              javax.jws,

                              javax.xml.bind.annotation,

                              javax.xml.ws",

              ex.tuto.payments.code_first.types;uses:=javax.xml.bind.annotation

      Require-Bundle =

              org.apache.cxf.bundle

       

       

      karaf@root> headers  224

       

      A CXF WSDL First OSGi Project (224)

      -


      Manifest-Version = 1.0

      Bnd-LastModified = 1299509626297

      Tool = Bnd-1.15.0

      Built-By = someone

      Build-Jdk = 1.6.0_23

      Created-By = Apache Maven Bundle Plugin

       

      Bundle-Name = A CXF WSDL First OSGi Project

      Bundle-SymbolicName = wsdl-first

      Bundle-Version = 0.0.1.SNAPSHOT

      Bundle-ManifestVersion = 2

       

      Import-Package =

              META-INF.cxf,

              META-INF.cxf.osgi,

              javax.jws;version="[2.0,3)",

              javax.wsdl,

              javax.xml.bind,

              javax.xml.bind.annotation,

              javax.xml.namespace,

              javax.xml.ws;version="[2.1,3)",

              org.apache.cxf.bus,

              org.apache.cxf.bus.resource,

              org.apache.cxf.bus.spring,

              org.apache.cxf.configuration.spring,

              org.apache.cxf.jaxws,

              org.apache.cxf.resource,

              org.apache.cxf.transport.http_osgi,

              org.springframework.beans.factory.config

      Export-Package =

              ex.tuto.payments.wsdl_first;

                      uses:="javax.jws,

                              org.apache.servicemix.samples.wsdl_first.types,

                              javax.xml.ws,

                              org.apache.servicemix.samples.wsdl_first",

              org.apache.servicemix.samples.wsdl_first;

                      uses:="javax.jws,

                              javax.xml.bind.annotation,

                              org.apache.servicemix.samples.wsdl_first.types,

                              javax.xml.ws,

                              javax.xml.namespace",

              org.apache.servicemix.samples.wsdl_first.types;uses:=javax.xml.bind.annotation

      Require-Bundle =

              org.apache.cxf.bundle

        • 1. Re: Code-First   and Wsdl-First
          atlantix

          org.springframework.beans.factory.config;version="[2.5,3)"

          was in red with the headers command

          • 2. Re: Code-First   and Wsdl-First
            atlantix

            My guess is that the version is causing the failure,

            because in the wsdl first I have the same 'org.springframework.beans.factory.config ' with no version and it worked , though I dont see any version specified in both POMs

            My question is where did that version come from and how to fix such issue.

            • 3. Re: Code-First   and Wsdl-First
              davsclaus

              What version of Fuse ESB and JDK are you using?

              And maybe you can list which version of Spring is installed as well.

               

              Could be that you have Spring 3.0.x installed, but that import is for Spring 2.x.

              • 4. Re: Code-First   and Wsdl-First
                atlantix

                karaf@root> version

                Major                2

                Minor                1

                Micro                3

                Qualifier            fuse-00-00

                 

                karaf@root> info

                Karaf

                  Karaf home                  C:\lib\apache-servicemix-4.3.1-fuse-00-00

                  Karaf base                  C:\lib\apache-servicemix-4.3.1-fuse-00-00

                  OSGi Framework              org.eclipse.osgi - 3.6.0.v20100517

                 

                JVM

                  Java Virtual Machine        Java HotSpot(TM) Server VM version 19.0-b09

                  Version                     1.6.0_23

                  Vendor                      Sun Microsystems Inc.

                  Uptime                      23.015 seconds

                  Total compile time          8.420 seconds

                Threads

                  Live threads                40

                  Daemon threads              30

                  Peak                        40

                  Total started               50

                Memory

                  Current heap size           21,969 kbytes

                  Maximum heap size           466,048 kbytes

                  Committed heap size         107,008 kbytes

                  Pending objects             0

                  Garbage collector           Name = 'PS Scavenge', Collections = 19, Time = 0.158 seconds

                  Garbage collector           Name = 'PS MarkSweep', Collections = 1, Time = 0.075 seconds

                Classes

                  Current classes loaded      5,017

                  Total classes loaded        5,017

                  Total classes unloaded      0

                Operating system

                  Name                        Windows XP version 5.1

                  Architecture                x86

                  Processors                  2

                karaf@root>

                • 5. Re: Code-First   and Wsdl-First
                  atlantix

                  karaf@root> features:list |grep -v unin

                  State         Version                Name                                 Repository

                  activemq                             activemq-5.4.2-fuse-01-00

                  activemq-blueprint                   activemq-5.4.2-fuse-01-00

                  cxf                                  repo-0

                  servicemix-shared                    repo-0

                  servicemix-cxf-bc                    repo-0

                  servicemix-file                      repo-0

                  servicemix-ftp                       repo-0

                  servicemix-http                      repo-0

                  servicemix-jms                       repo-0

                  servicemix-mail                      repo-0

                  servicemix-bean                      repo-0

                  servicemix-camel                     repo-0

                  servicemix-drools                    repo-0

                  servicemix-cxf-se                    repo-0

                  servicemix-eip                       repo-0

                  servicemix-osworkflow                repo-0

                  servicemix-quartz                    repo-0

                  servicemix-scripting                 repo-0

                  servicemix-validation                repo-0

                  servicemix-saxon                     repo-0

                  servicemix-wsn2005                   repo-0

                  servicemix-snmp                      repo-0

                  servicemix-vfs                       repo-0

                  servicemix-smpp                      repo-0

                  servicemix-exec                      repo-0

                  activemq-broker                      repo-0

                  naming                               repo-0

                  transaction                          repo-0

                  document                             repo-0

                  nmr                                  repo-0

                  woodstox                             repo-0

                  jbi                                  repo-0

                  jbi-cluster                          repo-0

                  spring                               karaf-2.1.3-fuse-00-00

                  spring-dm                            karaf-2.1.3-fuse-00-00

                  config                               karaf-2.1.3-fuse-00-00

                  http                                 karaf-2.1.3-fuse-00-00

                  war                                  karaf-2.1.3-fuse-00-00

                  camel                                repo-0

                  camel-core                           repo-0

                  camel-spring                         repo-0

                  camel-blueprint                      repo-0

                  camel-jms                            repo-0

                  camel-spring-integration             repo-0

                  • 6. Re: Code-First   and Wsdl-First
                    janitorial16

                    Very usefull topic , thanks for posting