Hi Dimitry,
yeah, I was not too sure about that namespace it's for CDI 1.0, I've
updated the pull request with CDI 1.1 namespace, not sure if that's OK
either.

But, I've managed to get a simple route working just by adding
camel-cdi dependency to that example you started with, and added an
@ApplicationScoped RouteBuilder. You can see the change in my GitHub
fork[1]

Run with: mvn -Pwildfly-swarm wildfly-swarm:run

Also there are quite a few examples in Camels repository[2] and
wildfly swarm[3] you can have a look at

zoran

[1] 
https://github.com/zregvart/microprofile-samples/commit/bd44a811693ada01b0104f6005a1e242e86e7fab
[2] https://github.com/apache/camel/tree/master/examples
[3] https://github.com/wildfly-swarm/wildfly-swarm-examples/tree/master/camel

On Sat, Jun 24, 2017 at 2:28 AM, Shultz, Dmitry
<dmitry_shu...@kaltire.com> wrote:
> Zoran,
>
> I merged the change to the 2.19.x branch and assembled the app  with the 
> changes. There are still some warnings in the log though:
>
> 2017-06-23 17:10:57,840 WARN  [org.jboss.weld.deployer] (MSC service thread 
> 1-5) WFLYWELD0012: Warning while parsing vfs:/D:/my-app-1.0.war/
> WEB-INF/lib/camel-cdi-2.19.2-SNAPSHOT.jar/META-INF/beans.xml:23 
> cvc-complex-type.3.2.2: Attribute 'version' is not allowed to appear in 
> element 'beans'.
>
> 2017-06-23 17:10:57,840 WARN  [org.jboss.weld.deployer] (MSC service thread 
> 1-5) WFLYWELD0012: Warning while parsing vfs:/D:/ my-app -1.0.war/
> WEB-INF/lib/camel-cdi-2.19.2-SNAPSHOT.jar/META-INF/beans.xml:23 
> cvc-complex-type.3.2.2: Attribute 'bean-discovery-mode' is not allowed to 
> appear in element '
> beans'.
>
> 2017-06-23 17:10:57,841 WARN  [org.jboss.weld.deployer] (MSC service thread 
> 1-5) WFLYWELD0012: Warning while parsing vfs:/D:/ my-app -1.0.war/
> WEB-INF/lib/camel-cdi-2.19.2-SNAPSHOT.jar/META-INF/beans.xml:25 
> cvc-complex-type.2.4.a: Invalid content was found starting with element 
> 'scan'. One of '{"htt
> p://java.sun.com/xml/ns/javaee":interceptors, 
> "http://java.sun.com/xml/ns/javaee":decorators, 
> "http://java.sun.com/xml/ns/javaee":alternatives, WC[##other:"h
> ttp://java.sun.com/xml/ns/javaee"]}' is expected.
>
> Not sure if it's related to the warnings, but Camle-CDI is not bootstrapped 
> at the start up (and route is not created by camel-cdi)
>
>
> Cheers,
> Dmitry
>
> -----Original Message-----
> From: Zoran Regvart [mailto:zo...@regvart.com]
> Sent: June-23-17 11:54 AM
> To: users@camel.apache.org
> Subject: Re: microprofile/wildfly-swarm + camel-cdi
>
> Hi Dimitry,
> I think we just might be missing XML namespace declaration for the <beans> 
> element. I've created an issue (CAMEL-11445[1]) and a pull request[2].
>
> If you can please test or provide feedback :)
>
> Also I think you want to checkout wildfly-camel[3] project.
>
> zoran
>
> [1] https://issues.apache.org/jira/browse/CAMEL-11445
> [2] https://github.com/apache/camel/pull/1782
> [3] https://github.com/wildfly-extras/wildfly-camel
>
> On Fri, Jun 23, 2017 at 2:12 AM, Shultz, Dmitry <dmitry_shu...@kaltire.com> 
> wrote:
>> Hi All,
>>
>> I'm playing with microprofile + camel-cdi app that was created using
>> this repo as a template
>> https://github.com/eclipse/microprofile-samples/tree/master/microprofi
>> le-sample-canonical
>>
>> It looks like camel-cdi is not activated by wildfly-swarm (and my sample 
>> route is not started). In the log I can see probably why:
>>
>> 2017-06-22 16:48:05,960 WARN  [org.jboss.weld.deployer] (MSC service
>> thread 1-6) WFLYWELD0012: Warning while parsing
>> vfs:/d:/my-app-1.0.war/WEB-INF/lib/camel-cdi-2.19.1.jar/META-INF/b
>> eans.xml:18 cvc-elt.1.a: Cannot find the declaration of element 'beans'.
>>
>> Looks like some kind of CDI version mismatch, but I'm  not sure. Is there 
>> any way to fix it?
>>
>> Cheers,
>> Dmitry
>
>
>
> --
> Zoran Regvart



-- 
Zoran Regvart

Reply via email to