Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem in accessing EJB Relationship method.....  RSS feed

Pras Tiwari
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am using CMP EJB2.0 for my web application with CMR. I have 2 Beans PartsMasterBean & PartsDetailBean having 1 to many relationship in them. I ve sucessfully defined relationship between then in Beans Implementation class as follows:-
public abstract Collection getPartsDetail();
public abstract void setPartsDetail(Collection c);
public abstract PartsMasterLocal getPartsMaster();
public abstract void setPartsMaster(PartsMasterLocal el);
When I m deploying my beans jar on server (JBOSS4.0.3 RC1) it gets succefully deployed. But problem occurs with accessing following method from my client file:-
PartsMasterLocal pmlocal;
PartsMasterLocalHome pmlhome;
PartMasterValueObject pmvo;
PartsDetailLocal pdlocal;
-------all lookup code here----------
Collection c1=pmlocal.getPartsDetail();
Iterator i=c1.iterator();
pdlocal=(PartsDetailLocal); //on this line i m getting error of

According to above code i should get the proper records in detail corresponding to those with matching pk-field from partsmaster. But it throws error. How should i handle this???

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!