legae [
http://community.jboss.org/people/legae] created the discussion
"Re: Random NameNotFoundException in jboss 6.1-SNAPSHOT"
To view the discussion, visit:
http://community.jboss.org/message/602640#602640
--------------------------------------------------------------
I see that nobody has a idea how to solve my problem.
I checked once again the code and I saw that I have cycles in EJB dependencies.
@Stateless
public class ABean implements ABeanLocal{
@EJB
BBeanLocal bBean;
....
}
@Stateless
public class BBean implements BBeanLocal{
@EJB
ABeanLocal aBean;
....
}
I was trying to add @org.jboss.ejb3.annotation.IgnoreDependency but the exception still
occurs. I also checked finding a bean by lookup and the effect is the same. in STDOUT
looks like bean was initialized but when trying to use it (in my situation - call a method
findById) exception is thrown
[STDOUT] myBeanLocal: Proxy to
jboss.j2ee:ear=my.ear,jar=my.jar,name=MyDependBean,service=EJB3 implementing [interface
com.app.ifaces.MyDependBeanLocal]
ERROR [CMTTxInterceptor] javax.ejb.EJBTransactionRolledbackException:
javax.naming.NameNotFoundException: com.app.MyDependBean not bound
I remember that in jboss 4.2.3 when ejb was not bound was treated as a null. Maybe there
is some property that I could check to be sure that bean is bound? Or is there any
annotation to force jboss to load beans?
Application is quite big and we used jboss 4.2.3 before so maybe I have still some
4.2.3jboss annotation but I assume that when 6.1 jboss does not use it so the old
annotations should not be a problem
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/602640#602640]
Start a new discussion in EJB3 at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]