调用EJB方法

时间:2013-09-16 11:40:54

标签: java ejb

抱歉我的英文。

我有EJB:

public class CtrlEJB extends CtrlImplEJB
{

 .....

 public SaleModel doSale(SaleModel sale) throws ValidationException
 {
    log.info("test");
    return new SaleModel();
 }

 .....

}

当我远程调用doSale方法时,我在服务器上收到错误:

ERROR [:LogInterceptor:RMI TCP Connection(2)-127.0.0.1] RuntimeException in method: public abstract SaleModel CtrlEJB.doSale(SaleModel) throws ValidationException, java.rmi.RemoteException
java.lang.IllegalArgumentException: wrong number of arguments
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invoke(StatefulSessionContainer.java:982)
    at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:111)
    at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
    ...

此类中的其他方法可以成功运行。 请帮忙。谢谢!

0 个答案:

没有答案