关闭

EJB问题

588人阅读 评论(0) 收藏 举报

一:我在发布CMPBean时出现如下错误:

EJB Query:SELECT Book From Books as Book

Invalid Expression:Finder:the SELECT clause for a finder must return a Bean.Non-Bean return types such as cmp-fields are not allowed. This EJBQL Q uery does not return a Bean SELECT Book From Books as Book'

原因:

Attention:
the SELECT clause for a finder must return a Bean.Non-Bean return types such as cmp-fields are not allowed.

SELECT SELECT Book From Books as Book      改为
SELECT Object(Book) From Books as Book     

二:

"NetBookstore.jar": In EJB BookCart, the home create method ejbCreate() did not have a corresponding ejbCreate method in the bean class, or the ejbCreate method in the bean class was not public.

Bean——BookCart中。BookCarBean中的ejbCreat方法和BookCartHome中的create方法的参数应该一致。

public BookCart create(String cardHolderName, String creditCardNo) throws CreateException, RemoteException;

public void ejbCreate(String cardHolderName,String creditCardNo) throws CreateException {
    this.cardHolderName = cardHolderName;
    this.creditCardNo = creditCardNo;
  }

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:54492次
    • 积分:578
    • 等级:
    • 排名:千里之外
    • 原创:9篇
    • 转载:6篇
    • 译文:0篇
    • 评论:4条
    文章分类
    最新评论