1 2 3 Previous Next 32 Replies Latest reply on Aug 23, 2011 3:34 AM by llwang0455 Go to original post
      • 15. Re: Problem attaching CXF interceptors to the Bus via configuration
        ffang

        Hi,

         

        From your log, you're using FUSE ESB 4.3.0.fuse-00-00, which is released at Aug 2010,

         

        But the issue[1] I point to you in my previous answer is fixed at Sep 2010, so the version you're using not include it.

        You should use later version,  more specifically, FUSE ESB 4.3.1-fuse-00-00 is ok, you can download it from .

         

        Log you saw here

        10:09:35,831 | INFO | ExtenderThread-2 | XmlBeanDefinitionReader | tory.xml.XmlBeanDefinitionReader 315 | 60 - org.springframework.beans - 3.0.3.RELEASE | Loading XML bean definitions from URL bundle://171.0:0/META-INF/spring/bundle-context-osgi.xml

        10:09:36,046 | INFO | ExtenderThread-2 | XmlBeanDefinitionReader | tory.xml.XmlBeanDefinitionReader 315 | 60 - org.springframework.beans - 3.0.3.RELEASE | Loading XML bean definitions from URL bundle://171.0:0/META-INF/spring/bundle-context.xml

        is that spring-dm will load all spring files under META-INF/spring folder, it doesn't mean cxf bc component load a component level bus.

        you needn't put your component level bus configuration file  into META-INF\spring\ folder, this folder is used for spring-dm as I said. But for our case, you should let cxf bc component to load that component level bus file.

         

        https://issues.apache.org/jira/browse/SMXCOMP-802

        http://repo.fusesource.com/nexus/content/repositories/releases/org/apache/servicemix/apache-servicemix/4.3.1-fuse-00-00/

         

        Freeman

        • 16. Re: Problem attaching CXF interceptors to the Bus via configuration
          niyyel

          Hi Freeman,

           

          Thanks for your pacience.

           

          Indeed, after moving to FUSE v4.3.1 some things changed. First of all, my bundle is now in INSTALLED state and not RESOLVED as before.

           

          Some interesting traces appear in the log file, like:

           

          11:28:58,095 | WARN  | rint Extender: 3 | SpringBusFactory                 |  -  -  | Initial attempt to create application context was unsuccessful.

          org.springframework.context.ApplicationContextException: Failed to load configuration "META-INF/spring/bundle-context.xml"

               at org.apache.cxf.bus.spring.BusApplicationContext.getConfigResources(BusApplicationContext.java:152)[137:org.apache.cxf.bundle:2.3.2.fuse-00-00]

               at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:120)

          61:org.springframework.context:3.0.5.RELEASE

               at org.apache.cxf.bus.spring.BusApplicationContext.loadBeanDefinitions(BusApplicationContext.java:262)[137:org.apache.cxf.bundle:2.3.2.fuse-00-00]

          ....

          ....

           

           

          Also:

           

           

           

          11:28:58,103 | WARN  | rint Extender: 3 | BusApplicationContext            |  -  -  | Failed to load configuration "META-INF/spring/bundle-context.xml"

          11:28:58,103 | WARN  | rint Extender: 3 | SpringBusFactory                 |  -  -  | Failed to create application context.

          org.springframework.context.ApplicationContextException: Failed to load configuration "META-INF/spring/bundle-context.xml"

               at org.apache.cxf.bus.spring.BusApplicationContext.getConfigResources(BusApplicationContext.java:152)[137:org.apache.cxf.bundle:2.3.2.fuse-00-00]

               at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:120)61:org.springframework.context:3.0.5.RELEAS

          ...

          ...

           

           

           

          And finally:

           

           

           

          11:28:58,106 | WARN  | rint Extender: 3 | ComponentRegistryImpl            | 81 - org.apache.servicemix.nmr.core - 1.4.0.fuse-00-00 | Unable to register service servicemix-cxf-bc with properties {NAME=servicemix-cxf-bc, TYPE=binding-component, objectClass=[Ljava.lang.String;@1142653, service.id=222}. Reason: javax.jbi.JBIException: Error calling init

          javax.jbi.JBIException: Error calling init

               at org.apache.servicemix.common.AsyncBaseLifeCycle.init(AsyncBaseLifeCycle.java:213)[90:servicemix-common:2011.01.0.fuse-00-00]

               at org.apache.servicemix.jbi.deployer.artifacts.ComponentImpl$ComponentWrapper.init(ComponentImpl.java:247)[93:org.apache.servicemix.jbi.deployer:1.4.0.fuse-00-00]

               at org.apache.servicemix.jbi.runtime.impl.ComponentRegistryImpl.doRegister(ComponentRegistryImpl.java:89)[91:org.apache.servicemix.jbi.runtime:1.4.0.fuse-00-00]

          ....

          ....

           

           

          Many thanks and best regards,

          • 17. Re: Problem attaching CXF interceptors to the Bus via configuration
            ffang

            Hi,

             

            Could you append result when you run

            osgi:list

            ?

            Specifically I want to see the status of servicemix-cxf-bc bundle, could you see the fragment/host which is similar as  I showed you in my previous post?

             

            If the servicemix-cxf-bc bundle status isn't active, You can try to refresh or start servicemix-cxf-bc bundle bundle, or restart fuse esb container to see if it helps.

             

            Freeman

            • 18. Re: Problem attaching CXF interceptors to the Bus via configuration
              niyyel

              Hello Freeman,

               

              Of course, here you have attached my results when I do osgi:list. For me, apparently, all looks fine.

              I also tried osgi:refresh and anything have changed.

               

              Thanks,

              • 19. Re: Problem attaching CXF interceptors to the Bus via configuration
                ffang

                Hi,

                 

                This

                Apache ServiceMix :: Components :: CXF Binding Component (2011.01.0.fuse-00-00)

                and

                GLOS CXF interceptor (0.0.1.SNAPSHOT)

                not correct, the fragment/host connection not there

                 

                The correct one is that you're able to see something like

                Apache ServiceMix :: Components :: CXF Binding Component (2011.01.0.fuse-00-00)

                                             Fragments: 199

                and

                GLOS CXF interceptor (0.0.1.SNAPSHOT)

                                             Hosts: 151

                 

                You customer bundle 199 status is Installed, that's not correct, could you please just do

                osgi:refresh 199 and osgi:refresh 151 to see what happened in the log? You need only append log for these two actions.

                 

                Freeman

                • 20. Re: Problem attaching CXF interceptors to the Bus via configuration
                  niyyel

                  Hi Freeman,

                   

                  After doing osgi:refresh 199 and osgi:refresh 151 my bundle changed to the proper state Resolved

                       199 Resolved 60 GLOS CXF interceptor (0.0.1.SNAPSHOT)

                   

                  I append you what happened in the log after these two actions.

                   

                  Regards

                  • 21. Re: Problem attaching CXF interceptors to the Bus via configuration
                    niyyel

                    Hi again,

                     

                    Some weird thing happened now. I installed the example cxf-wdsl-first-osgi-example.

                    So, when I run servicemix I have this:

                     

                    Apache ServiceMix :: Features :: Examples :: WSDL First OSGi Package :: CXF BC Bundle (4.3.1.fuse-00-

                    00)

                    Apache ServiceMix :: Features :: Examples :: WSDL First OSGi Package :: CXF SE Bundle (4.3.1.fuse-00-

                    00)

                    GLOS CXF interceptor (0.0.1.SNAPSHOT)

                     

                     

                    Then, when I do the refresh:

                     

                    karaf@root> osgi:refresh 200

                    karaf@root> osgi:refresh 151

                     

                    I have:

                     

                    Apache ServiceMix :: Features :: Examples :: WSDL First OSGi Package :: CXF BC Bundle (4.3.1.fuse-00-

                    00)

                    Apache ServiceMix :: Features :: Examples :: WSDL First OSGi Package :: CXF SE Bundle (4.3.1.fuse-00-

                    00)

                    GLOS CXF interceptor (0.0.1.SNAPSHOT)

                     

                     

                    Strange, isn't it?

                    • 22. Re: Problem attaching CXF interceptors to the Bus via configuration
                      rkozura

                      Has this issue been resolved?  I am very curious to see a solution.

                      • 23. Re: Problem attaching CXF interceptors to the Bus via configuration
                        niyyel

                        We are still working on it, hopefully we will find a solution soon

                        • 24. Re: Problem attaching CXF interceptors to the Bus via configuration
                          niyyel

                          Hello,

                           

                          Even my fragment bundle is attached properly ( resolved) it does not work. I believe this trace in the servicemix log is the reason.

                           

                          09:47:54,631 | WARN  | rint Extender: 1 | BusApplicationContext            |  -  -  | Failed to load configuration "META-INF/spring/bundle-context.xml"

                          09:47:54,635 | WARN  | rint Extender: 1 | SpringBusFactory                 |  -  -  | Initial attempt to create application context was unsuccessful.

                          org.springframework.context.ApplicationContextException: Failed to load configuration "META-INF/spring/bundle-context.xml"

                           

                          Maybe I have something wrong in my bundle-context.xml. I attach this file. It will be great if you can look at it.

                           

                          many thanks,

                          • 25. Re: Problem attaching CXF interceptors to the Bus via configuration
                            ffang

                            Hi,

                             

                            Did you see the output like

                             

                            151 Active Created 60 Apache ServiceMix :: Components :: CXF Binding Component (2011.01.0.fuse-00-00)

                            Fragments: 199

                            and

                            199 Resolved 60 GLOS CXF interceptor (0.0.1.SNAPSHOT)

                            Hosts: 151

                             

                            when you use osgi:list? this indicate your fragment attach correctly.

                             

                             

                            Maybe you can append your buildable customer bundle here, I will take a look when I get chance.

                             

                            Freeman

                            • 26. Re: Problem attaching CXF interceptors to the Bus via configuration
                              niyyel

                              Hi Freeman,

                               

                              This is exactly what I see when I do osgi:list

                              • 27. Re: Problem attaching CXF interceptors to the Bus via configuration
                                ffang

                                Hi,

                                 

                                Could you append your buildable customer bundle here, I will take a look when I get chance.

                                 

                                Freeman

                                • 28. Re: Problem attaching CXF interceptors to the Bus via configuration
                                  niyyel

                                  Oh yes, I forgot it

                                   

                                  Thank you !

                                  • 29. Re: Problem attaching CXF interceptors to the Bus via configuration
                                    niyyel

                                    Hello Freeman,

                                     

                                    Did you manage to find out what is the problem?

                                     

                                    Best regards,

                                    Jordi