We have an enterprise application with one web-module and one EJB module and we want to deploy it on JBoss-5.0.1 GA AS.
We use following:
JBoss 5.0.1 GA
To initialize spring beans, org.springframework.web.context.ContextLoaderListener is configured.
Problem is: Without any entry of EJB in applicationContext.xml, the JBoss-5.0.1 GA AS starts up properly without any errors. We can also look-up EJBs. But, when we put an entry of EJB into applicationContext.xml (the ejb which is also deployed), we get following error:
We have observed that before the EJB gets bound to its JNDI name, the Spring context loader starts loading EJB beans from applicationContext.xml and hence attempts to look it up by its JNDI and hence fails. But we have no clue as what can be the reason that spring context loading starts before ejb jndi binding. We have searched a lot but we did not find any help.
We have got struck here badly and we are in need of some immediate help. Any help/pointers will be highly appreciated.
Is the spring context loader (applicationcontext.xml) packaged in a .war? .war files are deployed before the other components in the application. You might want to add a dependency on the bean through jboss-web.xml. Follow this thread.
P.S: The latest available stable AS release is 5.1.0 GA. You might want to upgrade to that version (although this issue is not related to the version you are using).