1 2 Previous Next 19 Replies Latest reply on Jun 26, 2012 10:22 AM by garethahealy Go to original post
      • 15. Re: LinkageError when calling a cxf endpoint
        ffang

        Hi,

         

        In magento-soap-api-fuse/pom.xml, it must be

        javax.xml.soap;version="\[0, 0\]"

         

        but not

        javax.xml.soap;version="0, 0",

         

        With this change, I can see the output like

        07:58:36,811 | INFO  | ActiveMQ Task-4  | FailoverTransport                | 118 - org.apache.activemq.activemq-core - 5.5.1.fuse-7-061 | Successfully connected to tcp://127.0.0.1:61616

        07:58:36,840 | INFO  | r[imagesIntoCms] | imagesIntoCms                    | 138 - org.apache.camel.camel-core - 2.9.0.fuse-7-061 | body == {"com.boohoo.esb.products.images.into.cms.magento.holders.ImageFileHolder":{"imageFiles":{"entry":{"string":"azz709256","list":{"com.boohoo.esb.common.sage.entities.Media":{"mode":"A","sku":"azz709256","colour":"black","mediaKey":"medium","fileNameInMagento":"\/a\/z\/azz709256_black_default_m.jpg","fileName":"azz709256_black_default_m.jpg","fileNameWithoutExtension":"azz709256_black_default_m","pathToFile":"\/Users\/ffang\/issues\/thread_4016\/new\/_image\/.camel\/azz709256_black_default_m.jpg","mime":"image\/jpg"}}}}}}

        07:58:36,842 | INFO  | r[imagesIntoCms] | imagesIntoCms                    | 138 - org.apache.camel.camel-core - 2.9.0.fuse-7-061 | Json is now an object, WAHOOO!

        07:58:36,847 | ERROR | hread #6 - Split | Boohoo ESB                       | 216 - magento-soap-api-fuse - 1.0.0.SNAPSHOT | If you see this message, all is good! ## test

        07:58:36,850 | INFO  | r[imagesIntoCms] | createImageInMagento             | 138 - org.apache.camel.camel-core - 2.9.0.fuse-7-061 | OMG, WE HAVE AN IMAGE, PRAISE THE LORD!

         

        Freeman

         

        Edited by: ffang on Jun 26, 2012 12:13 AM

        • 16. Re: LinkageError when calling a cxf endpoint
          garethahealy

          NOTE: Replied to original message as the messages were being pushed to the far right of the screen.

           

          Edited by: garethahealy on Jun 26, 2012 10:42 AM

          • 17. Re: LinkageError when calling a cxf endpoint
            garethahealy

            Thanks, that has fixed the problem in my test project, but once i apply the fix into my dev project, which actaully makes web service calls to magento, i get a linkageerror but with a slightly different message:

             

            aused by: java.lang.LinkageError: loader constraint violation: when resolving method "javax.xml.ws.soap.SOAPFaultException.) for resolved class, javax/xml/ws/soap/SOAPFaultException, have different Class objects for the type javax/xml/soap/SOAPFault used in the signature

            at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:156)175:org.apache.cxf.bundle:2.5.0.fuse-7-061

            at $Proxy126.catalogProductInfo(Unknown Source)

            at com.boohoo.magento.MagentoProducts.getProductInfo(MagentoProducts.java:365)455:magento-soap-api:1.0.0.SNAPSHOT

            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method):1.6.0_29

            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39):1.6.0_29

            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25):1.6.0_29

            at java.lang.reflect.Method.invoke(Method.java:597):1.6.0_29

            at org.apache.camel.component.bean.MethodInfo.invoke(MethodInfo.java:340)

            at org.apache.camel.component.bean.MethodInfo$1.proceed(MethodInfo.java:237)

            at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:166)

            ... 35 more

             

            Throwing the SOAPFault to replicate the problem does not throw this exception - like i did in my test project. It feels like i/a colleague has done something fundamentally wrong as the code is very simple and am quite shocked/confused that i've hit such a problem so early on into development.

             

            Edited by: garethahealy on Jun 26, 2012 10:44 AM

            • 18. Re: LinkageError when calling a cxf endpoint
              ffang

              Hi,

               

              That's because currently both system bundle 0 and saaj-api spec bundle export javax.xml.soap.

               

              However, as we endorse jaxws api, so jaxws class javax.xml.ws.soap.SOAPFaultException will always load

              javax.xml.soap.SOAPFault from boot classloader, so that if any bundle import-package javax.xml.soap from saaj-api bundle, then can easily run into such exception.

               

              I've create an internal jira and fixed it today, which means we need also endorse saaj-api, the fix could be in next FUSE ESB 7.0.1 which is coming soon.

               

              Currently a workaround for FUSE ESB 7.0.0 is that you can remove all saaj-api from all features.

               

              use command like

              find . -name "feature.xml"|xargs grep saaj-api

              in $FUSE_ESB

              you can find all saaj-api bundle from features as follows

               

              ./system/org/apache/camel/karaf/apache-camel/2.9.0.fuse-7-061/apache-camel-2.9.0.fuse-7-061-features.xml:   

               

              remove them all

              and

              edit $FUSE_ESB/etc/jre.properties

              change

              javax.xml.soap, \

              to

              javax.xml.soap;version="1.3", \

              then remove $FUSE_ESB/data and restart FUSE ESB.

              This should work for you.

               

              Freeman

               

              Edited by: ffang on Jun 26, 2012 12:19 PM

              • 19. Re: LinkageError when calling a cxf endpoint
                garethahealy

                Freeman,

                 

                Thank you so much. Thats fixed the issue!

                1 2 Previous Next