It would work, if there were no third-party dependencies. I deliberately used
google guava to demostrate this
Caused by: java.lang.NoClassDefFoundError:
com/google/common/collect/ImmutableMap

That is because Deployment was JavaArchive. So, I've tried to create
WARArchive, which can include dependencies:
ShrinkWrap.create(WARArchive.class, "democdi.war").addPackages(true,
"com.democdi").addAllDependencies();

In this case the error is:
Caused by: java.lang.RuntimeException: Found extension impl class
org.wildfly.swarm.undertow.internal.WARArchiveImpl not assignable to
extension interface org.wildfly.swarm.undertow.WARArchive


So, in summary it would work with JavaArchive deployment without thirt-party
dependencies.









--
View this message in context: 
http://camel.465427.n5.nabble.com/Testing-CDI-Route-tp5789709p5789745.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to