Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

java.lang.IllegalStateException: [EJB:010116

1 view
Skip to first unread message

mike

unread,
Nov 12, 2007, 2:01:22 PM11/12/07
to
Hi,

We use the weblogic 8.1 and XDoclet.

I have a session bean that is accessing an entity bean. When I test I
get following in the log.

java.lang.IllegalStateException: [EJB:010116]Attempted to access the
collection valued cmr-field, 'userInteractions', for bean,
'CompanyAnnouncementReadOnly', outside the scope of a transaction.
All
access to the collection must be performed during the transaction in
which the collection was initially retrieved.

The entity bean also has 'transaction type="Required"'

I tested to change the transaction to 'type="NotSupported"' in both
session and entity bean but no luck.

Any hints?

cheers,

//mikael

/**
*
* @ejb.interface-method view-type = "both"
* @ejb.transaction type="Required"
* @throws EJBException
* Thrown if method fails due to system-level error.
* @throws FinderException
*/


try {


CompanySpecificAnnouncementReadOnlyLocal compSpecificAnnouncement =
CompanySpecificAnnouncementReadOnlyUtil.getLocalHome().findByPrimaryKey(new
CompanySpecificAnnouncementReadOnlyPK(serviceProvider,companyID,name));
boolean external =
compSpecificAnnouncement.getCompanyAnnouncement().getExternal().booleanValu­
e();
Collection ui =
(Collection)compSpecificAnnouncement.getCompanyAnnouncement().getUserIntera­
ctions();


return new AnnouncementData( ui,external);


} catch (FinderException fe) {


log.debug("getAnnouncement() no company specific announcement could
be found");

} catch (NamingException ne) {


log.warn("getAnnouncement() no company specific announcement could be
found. NamingException",ne);


}

0 new messages