请教各位高手:
我在使用jndi的绑定时,出现的error message 为“can only bind reference or referenable objects”,代码为:
HashTable env = new HashTable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.fscontext.RefFSContextFactory");
env.put(Context.PROVIDER_URL, "file:/home/yilong/");
Context cts = new Initcontext(env);
Object ff = new Object();
cts.bind("aaa",ff);
cts.lookup("aaa");
请问问题在哪儿?
我在使用jndi的绑定时,出现的error message 为“can only bind reference or referenable objects”,代码为:
HashTable env = new HashTable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.fscontext.RefFSContextFactory");
env.put(Context.PROVIDER_URL, "file:/home/yilong/");
Context cts = new Initcontext(env);
Object ff = new Object();
cts.bind("aaa",ff);
cts.lookup("aaa");
请问问题在哪儿?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货