This content has been marked as final.
Show 5 replies
-
1. Re: How to inject sessionbean from sessionbean
jaikiran Jan 3, 2009 12:14 AM (in response to nschweig)Please post the entire exception stacktrace and even the console logs. Which version of JBossAS and Java do you use? And are those EJBs part of the same deployed application?
-
2. Re: How to inject sessionbean from sessionbean
nschweig Jan 3, 2009 4:51 AM (in response to nschweig)Hi,
the only thing I see in the server.log that belongs to that error is:... 2009-01-03 10:27:14,656 ERROR [org.jboss.system.server.profileservice.ProfileServiceBootstrap] (main) Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS): *** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State} jboss.j2ee:ear=CMT_ejb.jar,jar=CMT_ejb.jar,name=CourseHandler,service=EJB3 -> <UNKNOWN jboss.j2ee:ear=CMT_ejb.jar,jar=CMT_ejb.jar,name=CourseHandler,service=EJB3>{Described:** UNRESOLVED Demands 'jndi:CMT_ejb/de.cmt.beans.groupAdministration.GroupHandlerRemote' **} jboss.j2ee:ear=CMT_ejb.jar,jar=CMT_ejb.jar,name=GroupHandler,service=EJB3 -> <UNKNOWN jboss.j2ee:ear=CMT_ejb.jar,jar=CMT_ejb.jar,name=GroupHandler,service=EJB3>{Described:** UNRESOLVED Demands 'Class:de.cmt.beans.courseAdministration.CourseHandlerRemote' **} *** CONTEXTS IN ERROR: Name -> Error <UNKNOWN jboss.j2ee:ear=CMT_ejb.jar,jar=CMT_ejb.jar,name=GroupHandler,service=EJB3> -> ** UNRESOLVED Demands 'Class:de.cmt.beans.courseAdministration.CourseHandlerRemote' ** <UNKNOWN jboss.j2ee:ear=CMT_ejb.jar,jar=CMT_ejb.jar,name=CourseHandler,service=EJB3> -> ** UNRESOLVED Demands 'jndi:CMT_ejb/de.cmt.beans.groupAdministration.GroupHandlerRemote' ** 2009-01-03 10:27:14,656 DEBUG [org.jboss.bootstrap.microcontainer.ServerImpl] (main) Installing life thread Thread[JBossLifeThread,5,jboss] ...
(CourseHandler tries to inject groupHandler and vice versa)
In the console it is the following:10:27:14,656 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS): *** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State} jboss.j2ee:ear=CMT_ejb.jar,jar=CMT_ejb.jar,name=CourseHandler,service=EJB3 -> <UNKNOWN jboss.j2ee:ear=CMT_ejb.jar,jar=CMT_ejb.jar,name=CourseHandler,service=EJB3>{Described:** UNRESOLVED Demands 'jndi:CMT_ejb/de.cmt.beans.groupAdministration.GroupHandlerRemote' **} jboss.j2ee:ear=CMT_ejb.jar,jar=CMT_ejb.jar,name=GroupHandler,service=EJB3 -> <UNKNOWN jboss.j2ee:ear=CMT_ejb.jar,jar=CMT_ejb.jar,name=GroupHandler,service=EJB3>{Described:** UNRESOLVED Demands 'Class:de.cmt.beans.courseAdministration.CourseHandlerRemote' **} *** CONTEXTS IN ERROR: Name -> Error <UNKNOWN jboss.j2ee:ear=CMT_ejb.jar,jar=CMT_ejb.jar,name=GroupHandler,service=EJB3> -> ** UNRESOLVED Demands 'Class:de.cmt.beans.courseAdministration.CourseHandlerRemote' ** <UNKNOWN jboss.j2ee:ear=CMT_ejb.jar,jar=CMT_ejb.jar,name=CourseHandler,service=EJB3> -> ** UNRESOLVED Demands 'jndi:CMT_ejb/de.cmt.beans.groupAdministration.GroupHandlerRemote' **
I use JBoss 5.0.0 CR2 and jdk1.5.0_14
The EJBs are part of the same application; they are only in separat packages:CMT_ejb.jar\de\cmt\beans\groupAdministration CMT_ejb.jar\de\cmt\beans\courseAdministration
Thanks, NSchweig -
3. Re: How to inject sessionbean from sessionbean
jaikiran Jan 3, 2009 6:36 AM (in response to nschweig)CourseHandler tries to inject groupHandler and vice versa
You mean a circular dependency? Try adding @IgnoreDependency on one of the injections. See this for detatils http://www.jboss.com/index.html?module=bb&op=viewtopic&t=117943 -
4. Re: How to inject sessionbean from sessionbean
nschweig Jan 4, 2009 5:18 AM (in response to nschweig)Yeah! :-) Thats it. Thank you very much.
Best regards, NSchweig -
5. Re: How to inject sessionbean from sessionbean
nschweig Jan 4, 2009 5:20 AM (in response to nschweig)For other people who are interested:
Thats the code in the groupHandler now:@IgnoreDependency @EJB() private CourseHandlerRemote courseHandler;
And thats it in the courseHandler:@EJB() private GroupHandlerRemote groupHandler;