Bind the SNMP adaptor to the MIB

View: New views
3 Messages — Rating Filter:   Alert me  

Bind the SNMP adaptor to the MIB

by vtitou vergeos :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I am carrying out the tutorial JDMK 5.1, the part which relates to agent
SNMP and I have a problem, I am explained:
- I already created my MIB and "mibgen" it (I have only one group with an
entry inside, I modified the MIB-II provided by the tutorial)
- I recorded my SNMPAdaptator as indicated in the tutorialÂ… until there no
problem.

My problem is with addMib function :

mibObjName= new ObjectName("snmp:class=RFC1213_MIB");
RFC1213_MIB mib2 = new RFC1213_MIB();
server.registerMBean(mib2, mibObjName);
// Bind the SNMP adaptor to the MIB
snmpAdaptor.addMib(mib2);

Eclipse gives me this error message :

The method addMib(SnmpMibAgent) in the type SnmpAdaptorServer is not
applicable for the arguments (RFC1213_MIB)

So i check my RFC1213_MIB class type and if found that :

public class RFC1213_MIB extends SnmpMib implements Serializable{
}

RFC1213_MIB extends SnmpMib which itself extends SnmpMibAgent.

And my problem is that i've got an error where it's not supposed to have an
error.

thank you for the attention which you will want to pay well to this message

Cordially

Antoine

PS : if you want to ask me some details, i'm here to answer!!

===========================================================================
The JDMK-FORUM archives are accessible at http://archives.java.sun.com
To unsubscribe, send email to listserv@... and include in the body
of the message "signoff JDMK-FORUM".  For general help, send email to
listserv@... and include in the body of the message "help".

Re: Bind the SNMP adaptor to the MIB

by daniel.fuchs :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Antoine,

If you comment the line
// snmpAdaptor.addMib(mib2);

does the rest of the code compile, or do you have further
errors?


regards,

-- daniel
http://blogs.sun.com/jmxetc

Antoine Verger wrote:

> Hi,
>
> I am carrying out the tutorial JDMK 5.1, the part which relates to agent
> SNMP and I have a problem, I am explained:
> - I already created my MIB and "mibgen" it (I have only one group with an
> entry inside, I modified the MIB-II provided by the tutorial)
> - I recorded my SNMPAdaptator as indicated in the tutorial… until there no
> problem.
>
> My problem is with addMib function :
>
> mibObjName= new ObjectName("snmp:class=RFC1213_MIB");
> RFC1213_MIB mib2 = new RFC1213_MIB();
> server.registerMBean(mib2, mibObjName);
> // Bind the SNMP adaptor to the MIB
> snmpAdaptor.addMib(mib2);
>
> Eclipse gives me this error message :
>
> The method addMib(SnmpMibAgent) in the type SnmpAdaptorServer is not
> applicable for the arguments (RFC1213_MIB)
>
> So i check my RFC1213_MIB class type and if found that :
>
> public class RFC1213_MIB extends SnmpMib implements Serializable{
> }
>
> RFC1213_MIB extends SnmpMib which itself extends SnmpMibAgent.
>
> And my problem is that i've got an error where it's not supposed to have an
> error.
>
> thank you for the attention which you will want to pay well to this message
>
> Cordially
>
> Antoine
>
> PS : if you want to ask me some details, i'm here to answer!!
>
> ===========================================================================
> The JDMK-FORUM archives are accessible at http://archives.java.sun.com
> To unsubscribe, send email to listserv@... and include in the body
> of the message "signoff JDMK-FORUM".  For general help, send email to
> listserv@... and include in the body of the message "help".

===========================================================================
The JDMK-FORUM archives are accessible at http://archives.java.sun.com
To unsubscribe, send email to listserv@... and include in the body
of the message "signoff JDMK-FORUM".  For general help, send email to
listserv@... and include in the body of the message "help".

Parent Message unknown Re: Bind the SNMP adaptor to the MIB

by vtitou vergeos :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I think that I solved my problem. I had downloaded the trial version of the
JMDK 5.1 and I had included the .jar's in my project. Apparently the problem
came from there since by including .jar's of OpenDMK, I did not have any
problem any more. Thank you for your assistance.

Cordially.


Antoine

===========================================================================
The JDMK-FORUM archives are accessible at http://archives.java.sun.com
To unsubscribe, send email to listserv@... and include in the body
of the message "signoff JDMK-FORUM".  For general help, send email to
listserv@... and include in the body of the message "help".
LightInTheBox - Buy quality products at wholesale price!