XBean
  1. XBean
  2. XBEAN-151

Xbean-Spring is "incompatible" with Spring Framework 3.0.x

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: spring
    • Labels:
      None
    • Environment:

      Any

      Description

      A lot of people have complained about this but haven't opened an issue for it. I've investigate it a bit and really it's not that xbean-spring is truly incompatible, it's that everyone (including the spring-xbean unit tests) creates xbean-spring configurations that assume Spring validation is turned off. This means that an xbean-spring configuration will fail to load without the schemaLocation defined with all custom namespaces. This can get a little tricky with xbean-spring syntax since when you add the appropriate schemas for validation, the xbean-configuration will fail to validate even though the configuration loads and operates correctly at runtime. I've found a few constructs I've used to be tough to figure out how to get to validate in order to run with Spring 3.0.x. The easiest solution to deal with this is to something turn off the default validation in Spring 3.0.x (which wasn't turned on by default in versions of Spring previous to 3.0.x). To reproduce this, simply get the project's code from trunk, and change the spring dependency versions to, 3.0.3.RELEASE and build. xbean-spring will fail. I'm attaching the results of one of the failed tests and you'll see the xbean configuration for that test failed validation for the "beans" tag.

      Here is what the results of the build look like, in case it helps in anyway:

      Results :

      Tests in error:
      testPizza(org.apache.xbean.spring.context.RestaurantUsingXBeanTest)
      testPizza(org.apache.xbean.spring.context.RestaurantUsingXBeanAsRootTest)
      testBeer(org.apache.xbean.spring.context.BeerNullTest)
      testFavs(org.apache.xbean.spring.context.FavoriteUsingXBeanMixedTest)
      testBeer(org.apache.xbean.spring.context.KegXBeanTest)
      testBeer(org.apache.xbean.spring.context.KegXBeanAndPropertiesTest)
      testPizza(org.apache.xbean.spring.context.PizzaUsingXBeanWithJavaNamespaceTest)
      testConfigureJndiInsideSpringXml(org.apache.xbean.spring.jndi.JndiTest)
      testBeer(org.apache.xbean.spring.context.BeerUsingXBeanSystemPropTest)
      testPizza(org.apache.xbean.spring.context.PizzaUsingXBeanTest)
      testPizza(org.apache.xbean.spring.context.RestaurantUsingXBeanWithSimplerConfigTest)
      testRecipes(org.apache.xbean.spring.context.RecipeUsingXBeanMixedTest)
      testPizza(org.apache.xbean.spring.context.RestaurantUsingResourceXmlApplicationContextTest)
      test(org.apache.xbean.spring.context.SpringExtensionTest)
      testSocketService(org.apache.xbean.spring.context.SocketAddressXBeanTest)
      testSocketAddress(org.apache.xbean.spring.context.SocketAddressXBeanTest)
      testRecipes(org.apache.xbean.spring.context.RecipeUsingXBeanTest)
      testFavs(org.apache.xbean.spring.context.FavoriteUsingXBeanTest)
      testBeer(org.apache.xbean.spring.context.BeerUsingXBeanTest)
      testWine(org.apache.xbean.spring.context.WineUsingXBeanTest)
      testPizza(org.apache.xbean.spring.context.PizzaUsingXBeanWithPropertiesTextNodeTest)
      testSoup(org.apache.xbean.spring.context.SoupUsingXBeanTest)
      testFlatMap(org.apache.xbean.spring.context.FlatMapTest)
      test1(org.apache.xbean.spring.context.ComponentTest)
      test2(org.apache.xbean.spring.context.ComponentTest)
      testQName(org.apache.xbean.spring.context.QNameUsingXBeanTest)
      testWine(org.apache.xbean.spring.context.GinUsingSpringTest)
      testPizza(org.apache.xbean.spring.context.PizzaUsingXBeanWinBeanRefTest)
      testWine(org.apache.xbean.spring.context.VodkaUsingXBeanTest)
      testSalad(org.apache.xbean.spring.context.SaladUsingXBeanTest)
      testPizza(org.apache.xbean.spring.context.RestaurantUsingXBeanMixedTest)
      testPizza(org.apache.xbean.spring.context.RestaurantUsingSpringExtendedTest)

      Tests run: 58, Failures: 0, Errors: 32, Skipped: 0

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Ryan Moquin
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development