关于WAS5 CMP - IllegalStateException
遇到头疼问题:刚成功部署对应两张表的两个实体EJB。除了在这两个EJB之间加入关系外一切正常。
CollectionLocalHome collections = ...
CollectionLocal collection = collections.findByPrimaryKey(...);
java.util.Collection products = collection.getProducts();
Iterator iter = products.iterator(); //这里抛出IllegalStateException
int size = products.size();//这样调用一样错误信息IllegalStateException
错误信息为:
java.lang.IllegalStateException at com.ibm.ws.ejbpersistence.associations.LinkSet.checkValidTx(Unknown Source) at com.ibm.ws.ejbpersistence.associations.LinkSet.size(Unknown Source) at com.hakata.interview.servlet.Test.doGet(Test.java:66) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
......
似乎是事务设置上有问题,但没有办法解决。
我刚才ibm论坛上找到相同的问题,也是没有答案。
望各位帮忙,不胜感激!