You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Stefan Essl <es...@studi.informatik.uni-stuttgart.de> on 2011/10/01 13:35:13 UTC
Maven Error with Camel: cannot find symbol
Hi there,
I'm trying to get a Camel based Content Enricher to run within ServiceMix. On compilation with maven, I get the following error:
--- snip ---
[ERROR] /path/to/MyRouteBuilder.java:[16,10] cannot find symbol
[ERROR] symbol: class Message
[ERROR] Message in = exchange.getIn();
--- snip ---
MyRouteBuilder.java just looks like the one I found on the Camel website:
--- snip ---
public class MyRouteBuilder extends RouteBuilder {
public void configure() {
from("direct.start").process(new Processor() {
public void process(Exchange exchange) {
Message in = exchange.getIn();
in.setProperty("myCamelContentEnricherExamplePropertyName", "myCamelContentEnricherExamplePropertyValue");
}
}).to("mock.result");
}
}
--- snip ---
I guess I'm missing some dependencies but can't find out which ones. In my pom.xml I have:
--- snip ---
<dependency>
<groupId>org.apache.servicemix</groupId>
<artifactId>servicemix-camel</artifactId>
<version>2010.02</version>
</dependency>
--- snip ---
I appreciate any hints!
Thanks,
Stefan
Re: Maven Error with Camel: cannot find symbol
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Stefan,
the JBI Message and Exchange classes are provided by ServiceMix Specs,
in the jbi-api-1.0 (and by transitivity in the servicemix-shared).
Could you try to add it in your POM dependencies ?
Regards
JB
On 10/01/2011 01:35 PM, Stefan Essl wrote:
> Hi there,
>
> I'm trying to get a Camel based Content Enricher to run within ServiceMix. On compilation with maven, I get the following error:
>
> --- snip ---
> [ERROR] /path/to/MyRouteBuilder.java:[16,10] cannot find symbol
> [ERROR] symbol: class Message
> [ERROR] Message in = exchange.getIn();
> --- snip ---
>
> MyRouteBuilder.java just looks like the one I found on the Camel website:
>
> --- snip ---
> public class MyRouteBuilder extends RouteBuilder {
> public void configure() {
> from("direct.start").process(new Processor() {
> public void process(Exchange exchange) {
> Message in = exchange.getIn();
> in.setProperty("myCamelContentEnricherExamplePropertyName", "myCamelContentEnricherExamplePropertyValue");
> }
> }).to("mock.result");
> }
> }
> --- snip ---
>
> I guess I'm missing some dependencies but can't find out which ones. In my pom.xml I have:
>
> --- snip ---
> <dependency>
> <groupId>org.apache.servicemix</groupId>
> <artifactId>servicemix-camel</artifactId>
> <version>2010.02</version>
> </dependency>
> --- snip ---
>
> I appreciate any hints!
>
> Thanks,
> Stefan
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: Maven Error with Camel: cannot find symbol
Posted by Stefan Essl <es...@studi.informatik.uni-stuttgart.de>.
Hi everybody,
after some more trying, I solved the problem myself.
For anybody running into this problem later on: MyRouteBuilder.java missed the import "import org.apache.camel.Message;".
Thanks,
Stefan
Am 01.10.2011 um 13:35 schrieb Stefan Essl:
> Hi there,
>
> I'm trying to get a Camel based Content Enricher to run within ServiceMix. On compilation with maven, I get the following error:
>
> --- snip ---
> [ERROR] /path/to/MyRouteBuilder.java:[16,10] cannot find symbol
> [ERROR] symbol: class Message
> [ERROR] Message in = exchange.getIn();
> --- snip ---
>
> MyRouteBuilder.java just looks like the one I found on the Camel website:
>
> --- snip ---
> public class MyRouteBuilder extends RouteBuilder {
> public void configure() {
> from("direct.start").process(new Processor() {
> public void process(Exchange exchange) {
> Message in = exchange.getIn();
> in.setProperty("myCamelContentEnricherExamplePropertyName", "myCamelContentEnricherExamplePropertyValue");
> }
> }).to("mock.result");
> }
> }
> --- snip ---
>
> I guess I'm missing some dependencies but can't find out which ones. In my pom.xml I have:
>
> --- snip ---
> <dependency>
> <groupId>org.apache.servicemix</groupId>
> <artifactId>servicemix-camel</artifactId>
> <version>2010.02</version>
> </dependency>
> --- snip ---
>
> I appreciate any hints!
>
> Thanks,
> Stefan