论坛首页 Java企业应用论坛

使用snmphibernate问题

浏览 1300 次
该帖已经被评为隐藏帖
作者 正文
   发表时间:2009-12-28  
@SuppressWarnings("serial")
@MibTable
@RowStatus(oid = ".1.3.6.1.4.1.22764.3.1.5.1.6.1.9")
public class WhileTable implements Serializable {

@MibIndex(no=0,length=1)
@MibObjectType(oid = ".1.3.6.1.4.1.22764.3.1.5.1.6.1.1", smiType = SmiType.INTEGER32, access = Access.READ)
public int index;

@MibObjectType(oid = ".1.3.6.1.4.1.22764.3.1.5.1.6.1.2", smiType = SmiType.OCTET_STRING, access = Access.WRITE)
public byte[] mac;
}

——————————————————————————————————————————————————
ISnmpSession session = null;
try {
ISnmpClientFacade facade = new Snmp4JClientFacade();
ISnmpSessionFactory sessionFactory = facade.getSnmpSessionFactory();
ISnmpTargetFactory targetFactory = facade.getSnmpTargetFactory();
try {
    ISnmpTarget target = targetFactory.newSnmpTarget("192.168.13.200", 161);
    target.setWriteCommunity("public");
session = sessionFactory.newSnmpSession(target);
WhileTable s = new WhileTable();
s.mac = "00:00:00:00:00:00".getBytes[];
session.create(s);
_____运行后报下面的错__________________________________________________________________________________

snmphibernate.api.SnmpException: ErrorCode: 11, ErrorIndex: 1, ErrorMessage: Unable to create object
我想请问一下:都些什么情况会造成此问题啊?
论坛首页 Java企业应用版

跳转论坛:
Global site tag (gtag.js) - Google Analytics