Gave up waiting for service' exception when running junit test in JBoss Fuse
Issue
- When we run a junit test for our route that we created using the File/New/Camel Test Case wizard in JBoss Dev Studio, we get a
Gave up waiting for serviceexception after a minute or so. We shouldn't be getting this exception, we think it should be executing the junit test. The exception is as follows:
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 30.95 sec <<< FAILURE! - in com.sample.BlueprintXmlTest
testCamelRoute(com.sample.BlueprintXmlTest) Time elapsed: 30.845 sec <<< ERROR!
java.lang.RuntimeException: Gave up waiting for service (objectClass=org.apache.camel.CamelContext)
at org.apache.camel.test.blueprint.CamelBlueprintHelper.getOsgiService(CamelBlueprintHelper.java:240)
at org.apache.camel.test.blueprint.CamelBlueprintHelper.getOsgiService(CamelBlueprintHelper.java:202)
at org.apache.camel.test.blueprint.CamelBlueprintTestSupport.createCamelContext(CamelBlueprintTestSupport.java:302)
- We are running jboss fuse on the developer studio and am getting errors:
[test.blueprint.Main.main()] NamespaceHandlerRegisterer INFO Registered blueprint namespace handler for http://schemas.xmlsoap.org/ws/2004/08/addressing
Unable to start bundle: 49org.osgi.framework.BundleException: Unable to start bundle
and
Blueprint Extender: 3] BlueprintContainerImpl ERROR Unable to start blueprint container for bundle camel-learn
org.osgi.service.blueprint.container.ComponentDefinitionException: java.lang.IncompatibleClassChangeError: class org.apache.aries.proxy.impl.interfaces.InterfaceProxyGenerator has interface org.objectweb.asm.ClassVisitor as super class
at org.apache.aries.blueprint.container.ReferenceRecipe.internalCreate(ReferenceRecipe.java:115)
at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)
Environment
- Red Hat JBoss Fuse
- 6.1.0
- Apache Aries Blueprint
- Maven
- JUnit
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
