This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes EJB 2.1 deployment problem on JBoss 5.0.1 GA/Spring 1.2.2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "EJB 2.1 deployment problem on JBoss 5.0.1 GA/Spring 1.2.2" Watch "EJB 2.1 deployment problem on JBoss 5.0.1 GA/Spring 1.2.2" New topic

EJB 2.1 deployment problem on JBoss 5.0.1 GA/Spring 1.2.2

Gaurav Dayal

Joined: Nov 11, 2009
Posts: 1

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:
webwork 2.1.7
spring 1.2.2
EJB 2.1
JBoss 5.0.1 GA
jdk 1.5.0_12

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.

Thanks & BR,
Jaikiran Pai

Joined: Jul 20, 2005
Posts: 10441

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).

[My Blog] [JavaRanch Journal]
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: EJB 2.1 deployment problem on JBoss 5.0.1 GA/Spring 1.2.2
jQuery in Action, 3rd edition