Hi,
I try to program an application using AdventNet API.
The program send a Get Request to an Agent on the network.
I set my CLASSPATH to "
D:\AdventNet\AdventNet\SNMPAPI\jars".
This a part of my program:
import com.adventnet.snmp.beans.*;
...
SnmpTarget target1;
...
...
public void get1()
{
target1 = new SnmpTarget();//ligne 66
target1.setTargetHost("172.0.0.1");
target1.setSnmpVersion(SnmpTarget.VERSION1);
target1.setTargetPort(161);
target1.setCommunity("public");
target1.setTimeout(10000);
target1.setRetries(0);
target1.setObjectID(".1.3.6.1.4.1.200.1.1.1.2.2.0");
String retour = target1.snmpGet();
val1 = retour;
}
And when I execute my program an exception appear:
Exception occurred during event dispatching:
java.lang.NoClassDefFoundError: com/adventnet/afp/log/LoggerImpl
at SnmpGetReq.get1(SnmpGetReq.java:66)
at InterfaceView.Action_actionPerformed(InterfaceView.java:126)
at InterfaceView$2.actionPerformed(InterfaceView.java:93)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1450)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1504)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:378)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:250)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:216)
at java.awt.Component.processMouseEvent(Component.java:3715)
at java.awt.Component.processEvent(Component.java:3544)
at java.awt.Container.processEvent(Container.java:1164)
at java.awt.Component.dispatchEventImpl(Component.java:2593)
at java.awt.Container.dispatchEventImpl(Container.java:1213)
at java.awt.Component.dispatchEvent(Component.java:2497)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2216)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
at java.awt.Container.dispatchEventImpl(Container.java:1200)
at java.awt.Window.dispatchEventImpl(Window.java:914)
at java.awt.Component.dispatchEvent(Component.java:2497)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:339)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:131)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:98)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)So, what can be the cause?
Thanks,