java.lang.IncompatibleClassChangeError in camel-test-blueprint -


i trying create simple camel-test-blueprint, can not proceed. able normal camel-test routes , when trying camel-test-blueprint getting exception. think configuration missing. have created test cases referring apache camel site only, it's not working. missing.

my pom:

<properties>     <camel-version>2.17.0</camel-version>     <project.build.sourceencoding>utf-8</project.build.sourceencoding> </properties> <dependency>         <groupid>org.apache.camel</groupid>         <artifactid>camel-test-blueprint</artifactid>         <version>${camel-version}</version>         <scope>test</scope>     </dependency> <build>     <plugins>         <plugin>             <groupid>org.apache.felix</groupid>             <artifactid>maven-bundle-plugin</artifactid>             <extensions>true</extensions>             <version>2.4.0</version>         </plugin>     </plugins> </build> 

my test class:

package com.test.routes;  import org.apache.camel.exchange; import org.apache.camel.model.processordefinition; import org.apache.camel.test.blueprint.camelblueprinttestsupport; import org.junit.test;  //tag::example[] //to use camel-test-blueprint, extend camelblueprinttestsupport class,     //and add unit tests methods shown below. public class debugblueprinttest extends camelblueprinttestsupport {      private boolean debugbeforemethodcalled;     private boolean debugaftermethodcalled;      // override method, , return location of our blueprint xml file used testing     @override     protected string getblueprintdescriptor() {         return "osgi-inf/blueprint/route.xml";     }      // here have regular junit @test method     @test     public void testroute() throws exception {         system.out.println("*** entering testroute() ***");          // set mock expectations         //getmockendpoint("mock:a").expectedmessagecount(1);         getmockendpoint("mock:vm:inputfile1").expectedmessagecount(1);          // send message         //template.sendbody("direct:start", "world");         template.sendbody("vm:inputfileendpointtest", "hello world");          // assert mocks         assertmockendpointssatisfied();          // assert on debugbefore/debugafter methods below being called we've          enabled debugger         asserttrue(debugbeforemethodcalled);         asserttrue(debugaftermethodcalled);     }      @override     public boolean isusedebugger() {         // must enable debugger         return true;     }      @override     protected void debugbefore(exchange exchange, org.apache.camel.processor processor, processordefinition<?> definition, string id, string label) {         log.info("before " + definition + " body " + exchange.getin().getbody());         debugbeforemethodcalled = true;     }      @override     protected void debugafter(exchange exchange, org.apache.camel.processor processor, processordefinition<?> definition, string id, string label, long timetaken) {         log.info("after " + definition + " body " + exchange.getin().getbody());         debugaftermethodcalled = true;     } } //end::example[] 

when trying run this, getting below exception:

java.lang.incompatibleclasschangeerror: class   org.apache.felix.connect.felix.framework.serviceregistrationimpl$servicereferenceimpl  not implement requested interface org.osgi.resource.capability @ org.apache.felix.connect.felix.framework.capabilityset.capabilityset.addcapability(capabilityset.java:63) @ org.apache.felix.connect.felix.framework.serviceregistry.registerservice(serviceregistry.java:124) 

in normal camel-test it's working fine, in camel-blueprint test i'm getting exception above. in overcoming appreciated.


Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

angular - Copying node modules to wwwroot AspNetCore -