1、确定你打包的格式是否正确,你的jar包是否可用;
2、检查你的xml发布描述是否正确;
3、是不是用的JNDI标准方式查找你的ejb类。
最好贴你的异常出来看看。

解决方案 »

  1.   

    就是这样的,在a.jar中的类分别是testcmp.calss,testcmphome.class,testcmpbean.class
    在servlet中这样调用
    ctx = new InitialContext();
    Object ref = ctx.lookup("TestCmp");
    TestCmpHome testCmpHome = (TestCmpHome) PortableRemoteObject.narrow(ref, TestCmpHome.class);
    TestCmp testcmp=testCmpHome.create();
    编译servlet的时候,报错:
    cannot resolve symbol  class TestCmpHome
    cannot resolve symbol  class TestCmp
    是不是和a.jar放的位置有关呢?(a.jar肯定是部署成功了)
    a.jar放在\applications目录下
    调用的servlet放在\applications\sample\WEB-INF\classes\目录下
    jsp文件放在\applications\sample目录下。
      

  2.   

    错误在于根本没有找到你的 remote 和 home 接口
      

  3.   

    你在jsp 中 导入你的ejb 包了么??
    <%@page import="EjbPag.*"%>
      

  4.   

    我写import a.*的时候报错啊
    说 package a does not exist
    需要配置什么路径吗?
      

  5.   

    你在startweblogic.cmd 里设置一下他的发布路径吧!!你用6.1 就发布相对路径用 7.0 或 8.1 就发布 绝对路径
      

  6.   

    放在startweblogic.cmd 设置路径?
    我编译servlet的时候可能不启动weblogic啊,那岂不是没用?
    我是编译不通过,不是运行不通过
      

  7.   

    我的电脑/属性/高级/环境变量  设置classpath