[SNMP4J] [osgi-dev] SNMP4J and OSGI

daniel Trump x5rated at hotmail.com
Mon Sep 15 23:21:23 CEST 2014


THanks to all..the problem was in the bndTool, I have tested the same code in other eclipse installation and it works.problem resolved.

> Date: Mon, 15 Sep 2014 14:30:44 +0100
> From: chris.gray at kiffer.be
> To: osgi-dev at mail.osgi.org
> Subject: Re: [osgi-dev] [SNMP4J] SNMP4J and OSGI
> 
> Hi Daniel,
> 
> I can only say that I used snmp4j in an OSGi project a year or two ago and
> I don't remember having any particular difficulties. I did make my own
> bundle containing snmp4j and all its dependencies, either the servicemix
> bundle didn't exist back then or I didn't find it.
> 
> Have you successfully built and run other OSGi projects using external
> libraries? Trying to figure out whether this is a problem with snmp4j or a
> problem with using bndtools. Does it compile? When you try to run it, what
> exactly does it tell you? etc..
> 
> Regards, Chris
> 
> > Hi Tim,
> > I'm trying yo implement a simple SNMP Trap based in this example:
> > http://www.techdive.in/snmp/snmp4j-trap-receiver
> > 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 in OSGI but
> > without success..
> >
> > From: tim.ward at paremus.com
> > Date: Mon, 15 Sep 2014 10:25:22 +0100
> > To: osgi-dev at mail.osgi.org
> > CC: snmp4j at agentpp.org
> > Subject: Re: [osgi-dev] [SNMP4J] SNMP4J and OSGI
> >
> > Hi Daniel,
> > Some more detailed information would be helpful. What do you mean when you
> > say that “the normal commands aren’t there”? How are you attempting to use
> > the library? What exceptions are you seeing (if any)? Are you sure that
> > your code is running?
> > Once we have a better understanding of what you’re doing we might be able
> > to provide some advice and/or an understanding of what the problem is.
> > Best Regards,
> > Tim
> > On 15 Sep 2014, at 10:14, daniel Trump <x5rated at hotmail.com> wrote: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
> >> >
> > _______________________________________________
> > OSGi Developer Mail List
> > osgi-dev at mail.osgi.org
> > https://mail.osgi.org/mailman/listinfo/osgi-dev
> >
> > _______________________________________________
> > OSGi Developer Mail List
> > osgi-dev at mail.osgi.org
> > https://mail.osgi.org/mailman/listinfo/osgi-dev
> > _______________________________________________
> > OSGi Developer Mail List
> > osgi-dev at mail.osgi.org
> > https://mail.osgi.org/mailman/listinfo/osgi-dev
> 
> 
> _______________________________________________
> OSGi Developer Mail List
> osgi-dev at mail.osgi.org
> https://mail.osgi.org/mailman/listinfo/osgi-dev
 		 	   		  


More information about the SNMP4J mailing list