You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Le...@swm.de on 2020/02/07 08:50:09 UTC

NullPointerException in SNMP Trap Producer Component

Hi,


currently I am working on a project where I receive OPC UA data and send them via SNMP to a PRTG monitoring system. I already created the routes between OPC UA datapoints and a SNMP client (with an unique OID). The problem here is the connection to the PRTG monitoring system. When I start the connection I get a NullPointer Exception on the the SnmpTrapProducer. It seems like I cannot create a trap of type PDU in SNMPTrapProducer.java

I figured out that the PDU trap that is created in SnmpTrapProducer.process(Exchange exchange) returns the NullPointerException(you can see the parts of the class in the picture). I tried different approaches like changing message body types or different ports as well as on ip addresses. But I still get the NullPointerException.

It seems like the apache camel snmp component call on the snmp4j library doesn't work as expected.

Further information about my project settings:

*         Camel Version: 2.24.2

*         Spring Boot: 2.1.7
Any help is greatly appreciated!

Best, Stefan

Re: NullPointerException in SNMP Trap Producer Component

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Its a bit hard to help when you dont post the stracktrace. Also try
with latest release 2.25.0.

On Fri, Feb 7, 2020 at 9:50 AM <Le...@swm.de> wrote:
>
> Hi,
>
>
>
> currently I am working on a project where I receive OPC UA data and send them via SNMP to a PRTG monitoring system. I already created the routes between OPC UA datapoints and a SNMP client (with an unique OID). The problem here is the connection to the PRTG monitoring system. When I start the connection I get a NullPointer Exception on the the SnmpTrapProducer. It seems like I cannot create a trap of type PDU in SNMPTrapProducer.java
>
> I figured out that the PDU trap that is created in SnmpTrapProducer.process(Exchange exchange) returns the NullPointerException(you can see the parts of the class in the picture). I tried different approaches like changing message body types or different ports as well as on ip addresses. But I still get the NullPointerException.
>
> It seems like the apache camel snmp component call on the snmp4j library doesn’t work as expected.
>
> Further information about my project settings:
>
> ·         Camel Version: 2.24.2
>
> ·         Spring Boot: 2.1.7
>
> Any help is greatly appreciated!
>
>
>
> Best, Stefan



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2