Details

    • Type: Task Task
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 2.14.0
    • Component/s: camel-spring
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      Upgrade to spring4.
      There is a non-backwards compatible change in spring 4.x which will cause:

      java.lang.IncompatibleClassChangeError: Found interface org.springframework.test.context.TestContext, but class was expected
              at org.apache.camel.test.spring.CamelSpringTestContextLoaderTestExecutionListener.prepareTestInstance(CamelSpringTestContextLoaderTestExecutionListener.java:35)
              at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:326)
              at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:212)
              at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:289)
              at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
              at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:291)
              at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:232)
              at org.apache.camel.test.junit4.CamelSpringJUnit4ClassRunner.runChild(CamelSpringJUnit4ClassRunner.java:37)
              at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
              at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
              at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
              at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
              at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
              at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
              at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)
              at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
              at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:175)
              at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
              at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
              at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
              at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
              at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
              at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:
      

      due to https://jira.springsource.org/browse/SPR-7692

        Activity

        Hide
        Willem Jiang added a comment -

        It looks you need to recompile the camel-spring with Spring 4.x to fix this issue.
        It is a common issue

        I just ran the tests after upgrade the spring version to 4.x, I don't hit the issue as you meet.

        Show
        Willem Jiang added a comment - It looks you need to recompile the camel-spring with Spring 4.x to fix this issue. It is a common issue I just ran the tests after upgrade the spring version to 4.x, I don't hit the issue as you meet.
        Hide
        David J. M. Karlsen added a comment -

        Willem Jiang: exactly - and that's why I created the issue, wondering what version of camel this would be done for.

        Show
        David J. M. Karlsen added a comment - Willem Jiang : exactly - and that's why I created the issue, wondering what version of camel this would be done for.
        Hide
        Henrik added a comment -

        Is there any ETA on this issue?

        Show
        Henrik added a comment - Is there any ETA on this issue?
        Hide
        Willem Jiang added a comment - - edited

        It's not an easy job to do the upgrading if there are lots of other projects (products) are based on camel, as they are some gap between spring 3.x and spring 4.x, it could take some time.

        In the camel master branch we have spring4 profile can be used if you want to play with camel and spring 4.x yourself.

        Show
        Willem Jiang added a comment - - edited It's not an easy job to do the upgrading if there are lots of other projects (products) are based on camel, as they are some gap between spring 3.x and spring 4.x, it could take some time. In the camel master branch we have spring4 profile can be used if you want to play with camel and spring 4.x yourself.
        Hide
        David J. M. Karlsen added a comment -

        You can also monitor this job: https://builds.apache.org/job/Camel.trunk.fulltest.spring4/ . Guess cxf 3 is the last major step to get it to pass.

        Show
        David J. M. Karlsen added a comment - You can also monitor this job: https://builds.apache.org/job/Camel.trunk.fulltest.spring4/ . Guess cxf 3 is the last major step to get it to pass.
        Hide
        Henrik added a comment -

        Thanks!

        Show
        Henrik added a comment - Thanks!
        Hide
        Anna Ivashchuk added a comment -

        It would be great if it is fixed in the nearest future. For our project it is a stopper for migrating to spring 4

        Show
        Anna Ivashchuk added a comment - It would be great if it is fixed in the nearest future. For our project it is a stopper for migrating to spring 4
        Hide
        Morten Kjetland added a comment -

        Our reason for wanting Spring 4 support is to make Camel work with Java 8, as Spring 3.2.x is not compatible with it.

        This can also be fixed if Spring adds java 8 byte-code compatibility in 3.2.9 as described in this issue:
        https://jira.spring.io/browse/SPR-11656 (With pull-request)

        Show
        Morten Kjetland added a comment - Our reason for wanting Spring 4 support is to make Camel work with Java 8, as Spring 3.2.x is not compatible with it. This can also be fixed if Spring adds java 8 byte-code compatibility in 3.2.9 as described in this issue: https://jira.spring.io/browse/SPR-11656 (With pull-request)

          People

          • Assignee:
            Willem Jiang
            Reporter:
            David J. M. Karlsen
          • Votes:
            13 Vote for this issue
            Watchers:
            15 Start watching this issue

            Dates

            • Created:
              Updated:

              Development