facebook

XFire 1.2.6 & Spring 2+ : 2 incompatibilities & work

  1. MyEclipse Archived
  2.  > 
  3. Web Services
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #272351 Reply

    factset
    Participant

    Hello,

    If you use the latest Xfire (1.2.6) and Spring 2.0+, you will have some incompatibility issues.
    Please note that there is nothing wrong with MyEclipse, this is only a Spring/Xfire problem.

    I post here anyway to share the workarounds.


    Problem 1 : java.lang.NoSuchMethodError Exception/

    java.lang.NoSuchMethodError: org.springframework.beans.factory.xml.XmlReaderContext.getReader()Lorg/springframework/beans/factory/xml/XmlBeanDefinitionReader;
    at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.loadResource(XBeanNamespaceHandler.java:732)
    at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.findNamespaceProperties(XBeanNamespaceHandler.java:692)
    at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseBeanFromExtensionElement(XBeanNamespaceHandler.java:251)

    This is a known issue, see http://jira.codehaus.org/browse/XFIRE-1023.

    Workaround : No solution! Do not use Spring 2.1M1 or 2.1M2 with XFire, keep using Spring 2.0 for now….
    They say that the problem came with 2.1M2 but it’s false, same problem with Spring 2.1M1.

    Problem 2 : org.springframework.beans.factory.BeanDefinitionStoreException

    
    org.springframework.beans.factory.BeanDefinitionStoreException: Unrecognized xbean element mapping: beans in namespace http://xfire.codehaus.org/config/1.0
        at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseBeanFromExtensionElement(XBeanNamespaceHandler.java:258)
        at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:152)
        at org.apache.xbean.spring.context.v2.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:49)
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1078)
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1068)
        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:139)
        at org.apache.xbean.spring.context.v2.XBeanBeanDefinitionDocumentReader.parseBeanDefinitions(XBeanBeanDefinitionDocumentReader.java:63)
        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:90)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:495)
        at org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader.registerBeanDefinitions(XBeanXmlBeanDefinitionReader.java:79)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:340)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:317)
        at org.codehaus.xfire.spring.XFireConfigLoader.getXFireApplicationContext(XFireConfigLoader.java:103)
        at org.codehaus.xfire.spring.XFireConfigLoader.loadContext(XFireConfigLoader.java:41)

    Workaround :

    
    <beans xmlns="http://xfire.codehaus.org/config/1.0">
    <service>
    ....
    </service>
    </beans>
    

    has to be changed to :

    
    <beans>
    <service xmlns="http://xfire.codehaus.org/config/1.0">
    ....
    </service>
    </beans> 
    

    It comes with Spring 2.0 new features, for more details see : http://www.andromda.org/jira/browse/WS-14

    It took me some time to find these problems and solutions.
    I thought it could be usefull for others…

    Philippe

    #272353 Reply

    tomeksz
    Member

    Solution for problem 2 is described here http://xfire.codehaus.org/services.xml+Reference since first version of Spring 2.x 🙂
    As to problem 1, Everytime spring changes its API there should be new XBean released (its responsible for translating services.xml format to spring), so you should check its page or try svn snapshot.
    btw. You can’t expect that XFire will be compatible with all Spring 2M(X) versions, because Spring API can be changed many times before final release.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: XFire 1.2.6 & Spring 2+ : 2 incompatibilities & work

You must be logged in to post in the forum log in