banq大哥,请教一个关于jboss ide的问题

05-10-01 powlliu
我参照你介绍的jboss ide的教程做了一个工程,在ComputeServlet类中的init方法总是报错,方法如下:

public void init(ServletConfig config) throws ServletException {

try {

Context context = new InitialContext();

Object ref = context.lookup("java:/comp/env/ejb/Fibo");

home = (FiboHome) PortableRemoteObject.narrow(ref, FiboHome.class);

} catch (Exception e) {

throw new ServletException("Lookup of java:/comp/env/ failed");

}

}

通过断点调试是在这句通不过:

home = (FiboHome) PortableRemoteObject.narrow(ref, FiboHome.class);

猜你喜欢