[SNMP4J] SNMP4J and OSGI

Mooli Tayer mtayer at redhat.com
Mon Sep 15 13:05:16 CEST 2014


Whet version are you using? 

> I'm using BNDtools, i have added the bundle to the building path, however
> most of the functions does not exist.

> example:

> System . out . println ( "Trap Type = " + pdu. getType ( ) ) ;
> System . out . println ( "Variable Bindings = " + pdu. getVariableBindings (
> ) ) ;
> int pduType = pdu. getType ( ) ;
> if ( ( pduType != PDU. TRAP ) && ( pduType != PDU. V1TRAP ) && ( pduType !=
> PDU. REPORT )
> && ( pduType != PDU. RESPONSE ) )
> {
> pdu. setErrorIndex ( 0 ) ;
> pdu. setErrorStatus ( 0 ) ;
> pdu. setType ( PDU. RESPONSE ) ;
> StatusInformation statusInformation = new StatusInformation ( ) ;
> StateReference ref = cmdRespEvent. getStateReference ( ) ;

> I try to use PDU, but it does not have.. and i have imported import
> org.snmp4j.*;

> I have try to search for a example of SNMP4J trap or other without success..

> > Date: Mon, 15 Sep 2014 05:26:13 -0400
> > From: mtayer at redhat.com
> > To: x5rated at hotmail.com
> > CC: snmp4j at agentpp.org; osgi-dev at mail.osgi.org
> > Subject: Re: [SNMP4J] SNMP4J and OSGI
> >
> > Does the module install ok inside your OSGI container?
> > Is it in active state?
> >
> > If so what do you mean by you have not been able to work with it?
> >
> > Mooli.
> >
> > ----- Original Message -----
> > > Thanks for the reply.The bundle already exists, however I have not been
> > > able
> > > to work with
> > > it.http://mvnrepository.com/artifact/org.apache.servicemix.bundles/org.apache.servicemix.bundles.snmp4j
> > >
> > >
> > >
> > >
> > > > Date: Sun, 14 Sep 2014 06:18:29 -0400
> > > > From: mtayer at redhat.com
> > > > To: x5rated at hotmail.com
> > > > CC: snmp4j at agentpp.org
> > > > Subject: Re: [SNMP4J] SNMP4J and OSGI
> > > >
> > > > So you can do it in with snmp4j jar but not under OSGI?
> > > > So AFAIK your problem is not with snmp4j but with OSGI.
> > > >
> > > > It is simply a problem of converting whatever jar you are using to a
> > > > bundle
> > > > - adding certain headers to the jar. This can usually be done
> > > > automatically.
> > > > See number 6 here or ask in their forum:
> > > > http://www.osgi.org/Community/HomePage
> > > >
> > > > Mooli.
> > > >
> > > > ----- Original Message -----
> > > > > Hello I'm very new in this,
> > > > > I'm developing and SNMP application with trap and request(sending OID
> > > > > and
> > > > > receiving result data).
> > > > > I have research in google for example but without success...
> > > > > I'm able to create a SNMP Trap normal Java programming.. however I
> > > > > can't
> > > > > do
> > > > > it in OSGI..
> > > > > I'm using the latest bundle a the normal commands are not there...
> > > > > Does any one is working with iT or can anyone send me more
> > > > > information
> > > > > about
> > > > > SNMP with OSGI?thanks
> > > > >
> > > > >
> > > > > _______________________________________________
> > > > > SNMP4J mailing list
> > > > > SNMP4J at agentpp.org
> > > > > https://oosnmp.net/mailman/listinfo/snmp4j
> > > > >
> > >



More information about the SNMP4J mailing list