请banq指教

fchqcqu 05-08-19

我用ejb来实现SimpleJdonFrameworkTest
我的jdonframework.xml配置如下
<ejbService name="testService" >
<jndi name="TestEJB" />
<ejbLocalObject class="simple.ejb.TestEJBLocal"/>
<interface class="simple.service.TestService" />
</ejbService>

TestEJBLocal代码如下:
public interface TestEJBLocal extends javax.ejb.EJBLocalObject {
public void createUser(EventModel em);
public void updateUser(EventModel em);
public void deleteUser(EventModel em);
public UserTest getUser(String userId);
public PageIterator getAllUsers(int start, int count);

}
部署成功,但访问http://localhost:8080/testWeb/userListAction.do?count=5出现如下错误
type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: getPageIterator's result is null, check your ModelListAction subclass
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:516)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:423)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
com.jdon.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:92)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)


root cause

java.lang.Exception: getPageIterator's result is null, check your ModelListAction subclass
com.jdon.strutsutil.ModelListAction.execute(ModelListAction.java:74)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
com.jdon.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:92)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)


note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.


--------------------------------------------------------------------------------
请问如何解决呢

fchqcqu
2005-08-19 10:58

jdonframework.xml配置
ejbService name="testService"
jndi name="TestEJB"
ejbLocalObject class="simple.ejb.TestEJBLocal"
interface class="simple.service.TestService"
/ejbService

fchqcqu
2005-08-19 16:30

主要错误是这句,banq快指导一下,急死了

15:36:37,937 ERROR [EJBObjectFactory] locator error: javax.naming.NameNotFoundException: TestEJB not bound

banq
2005-08-19 17:46

这个是JNDI没有绑定错误。

你设置了TestEJB 是TestEJBLocal的JNDI名称,那么它是不是TestEJBLocal的JNDI名称呢?主要打开jboss.xml查看一下TestEJBLocal的local-jndi-name是否是TestEJB ?

fchqcqu
2005-08-19 18:09

我是菜鸟,刚开始ejb学习不久
就是这个问题
我把jndi设置成了TestEJBLocal了