You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by jspyeatt <jo...@singlewire.com> on 2015/06/17 21:16:59 UTC
org.apache.camel.FailedToCreateRouteException: Failed to create
route with SNMP component
I'm using Camel 2.15.2 and suddenly find that context.addRoutes() is throwing
the following exception.
org.apache.camel.FailedToCreateRouteException: Failed to create route
SNMPPoll:udp:172.30.227.153:1.3.6.1.4.1.17491.1.1.2.1.2.201:
Route(SNMPPoll:udp:172.30.227.153:1.3.6.1.4.1.17491.1.1.2.1.... because of
Failed to resolve endpoint:
*snmp://172.30.227.153:161?delay=60000&oids=1.3.6.1.4.1.17491.1.1.2.1.2.201&protocol=udp&retries=2&snmpCommunity=private&snmpVersion=0&type=POLL*
due to: *Could not find a suitable setter for property: oids as there isn't
a setter method with same type: java.lang.String nor type conversion
possible:* No type converter available to convert from type:
java.lang.String to the required type:
org.apache.camel.component.snmp.OIDList with value
1.3.6.1.4.1.17491.1.1.2.1.2.201
The context is already running and looking at the documentation here
http://camel.apache.org/snmp.html <http://camel.apache.org/snmp.html> and
everything appears correct.
I'm just using the DefaultCamelContext and trying to do a simple
context.addRoutes(....) call.
Any ideas?
--
View this message in context: http://camel.465427.n5.nabble.com/org-apache-camel-FailedToCreateRouteException-Failed-to-create-route-with-SNMP-component-tp5768341.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: org.apache.camel.FailedToCreateRouteException: Failed to create
route with SNMP component
Posted by jspyeatt <jo...@singlewire.com>.
That did the trick.
Thanks loads.
--
View this message in context: http://camel.465427.n5.nabble.com/org-apache-camel-FailedToCreateRouteException-Failed-to-create-route-with-SNMP-component-tp5768341p5770704.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: org.apache.camel.FailedToCreateRouteException: Failed to create
route with SNMP component
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
If you build your own big/uber JAR see this FAQ
http://camel.apache.org/how-do-i-use-a-big-uber-jar.html
On Wed, Aug 12, 2015 at 5:06 PM, jspyeatt <jo...@singlewire.com> wrote:
> It's actually weirder than first appeared.
> I do have camel-snmp included in the pom.xml file. I should have mentioned
> that in my original post.
>
> I'm beginning to think it's a classloader issue... Oh joy..
>
> Because everything works fine when I run the application within IntelliJ.
> But when I make it an executable jar file using maven assembly module it
> can't find the converter.
>
> SNMP traps work fine in both cases. So I know the snmp component is being
> successfully included. It's just when I try to create the SNMP polling
> route.
>
> So my question seems to be more fundamental. How is camel locating classes
> with the @Converter annotation.
>
> Also, it seems to find other @Converters just fine. Example the one in
> camel-mail.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/org-apache-camel-FailedToCreateRouteException-Failed-to-create-route-with-SNMP-component-tp5768341p5770615.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2nd edition: http://www.manning.com/ibsen2
Re: org.apache.camel.FailedToCreateRouteException: Failed to create
route with SNMP component
Posted by jspyeatt <jo...@singlewire.com>.
It's actually weirder than first appeared.
I do have camel-snmp included in the pom.xml file. I should have mentioned
that in my original post.
I'm beginning to think it's a classloader issue... Oh joy..
Because everything works fine when I run the application within IntelliJ.
But when I make it an executable jar file using maven assembly module it
can't find the converter.
SNMP traps work fine in both cases. So I know the snmp component is being
successfully included. It's just when I try to create the SNMP polling
route.
So my question seems to be more fundamental. How is camel locating classes
with the @Converter annotation.
Also, it seems to find other @Converters just fine. Example the one in
camel-mail.
--
View this message in context: http://camel.465427.n5.nabble.com/org-apache-camel-FailedToCreateRouteException-Failed-to-create-route-with-SNMP-component-tp5768341p5770615.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: org.apache.camel.FailedToCreateRouteException: Failed to create
route with SNMP component
Posted by Stephan Burkard <sb...@gmail.com>.
The exception says that your "oids" parameter cannot be converted from
String to OIDList because there is no converter available.
Make sure you have the camel-snmp component in your class path. I guess the
needed converter is in this component.
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-snmp</artifactId>
<version>x.x.x</version>
<!-- use the same version as your Camel core version -->
</dependency>
Stephan
On Wed, Jun 17, 2015 at 9:16 PM, jspyeatt <jo...@singlewire.com>
wrote:
> I'm using Camel 2.15.2 and suddenly find that context.addRoutes() is
> throwing
> the following exception.
>
> org.apache.camel.FailedToCreateRouteException: Failed to create route
> SNMPPoll:udp:172.30.227.153:1.3.6.1.4.1.17491.1.1.2.1.2.201:
> Route(SNMPPoll:udp:172.30.227.153:1.3.6.1.4.1.17491.1.1.2.1.... because of
> Failed to resolve endpoint:
> *snmp://
> 172.30.227.153:161?delay=60000&oids=1.3.6.1.4.1.17491.1.1.2.1.2.201&protocol=udp&retries=2&snmpCommunity=private&snmpVersion=0&type=POLL*
> due to: *Could not find a suitable setter for property: oids as there isn't
> a setter method with same type: java.lang.String nor type conversion
> possible:* No type converter available to convert from type:
> java.lang.String to the required type:
> org.apache.camel.component.snmp.OIDList with value
> 1.3.6.1.4.1.17491.1.1.2.1.2.201
>
> The context is already running and looking at the documentation here
> http://camel.apache.org/snmp.html <http://camel.apache.org/snmp.html>
> and
> everything appears correct.
>
> I'm just using the DefaultCamelContext and trying to do a simple
> context.addRoutes(....) call.
>
> Any ideas?
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/org-apache-camel-FailedToCreateRouteException-Failed-to-create-route-with-SNMP-component-tp5768341.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>