您的位置:程序门 -> java -> j2ee / ejb / jms



请大家帮忙!!!!!在client端掉用weblogic上的ejb抛出classcastexception


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


请大家帮忙!!!!!在client端掉用weblogic上的ejb抛出classcastexception[无满意答案结贴]
发表于:2007-06-26 17:51:27 楼主
我将ejb发布到weblogic上,然后通过客户端call这个ejb,抛出classcastexception。在weblogic的jndi树中,我的ejb信息如下:
      settings   for   helloearhelloejb_jaragencybean_eo      
      overview       security          
 
      this   page   displays   details   about   this   bound   object.
          binding   name:   helloearhelloejb_jaragencybean_eo      
          class:   agency.agencybean_ff3n86_eoimpl_920_wlstub      
          hash   code:   327      
          tostring   results:   weblogic.rmi.internal.collocatedremoteref   -hostid:   '-8361332264705973729s::base_domain:adminserver ',   oid:   '327 ',   channel:   'null '  
 
      客户端程序是:
      private   static   final   string   wl_provider_url   =   "t3://localhost:7001 ";
private   static   final   string   wl_initial_context_factory   =   "weblogic.jndi.wlinitialcontextfactory ";
        private   static   context   initctx   =   null;
       
      try{
  hashtable   env   =   new   hashtable();
  env.put(context.initial_context_factory,   wl_initial_context_factory);
  env.put(context.provider_url,   wl_provider_url);
  initctx   =   new   initialcontext(env);
  if(initctx   ==   null)
            {
          system.out.println( "initial   context   failling! ");
          return;
            }
  object   lookup   =   initctx.lookup( "helloearhelloejb_jaragencybean_eo ");  
  object   home   =   portableremoteobject.narrow(lookup,agencyhome.class);
  agency   agency   =   ((agencyhome)home).create();
  agency.getagencyname();
  agency.findallapplicants();
                }catch(namingexception   ex){
                system.err.println(ex);
                }
大家要帮忙啊!

在线等.....
发表于:2007-06-27 00:06:191楼 得分:0
该回复于2007-12-28 12:02:32被管理员或版主删除
发表于:2007-06-27 09:58:482楼 得分:0
jjg000请不要在我的帖子上打广告!!!!!!

-_-!!
发表于:2007-06-27 10:05:533楼 得分:0
放弃学习ejb,基本用不上!


快速检索

最新资讯
热门点击