my dog learned polymorphism*
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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
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
Author

EJB 2.1 deployment problem on JBoss 5.0.1 GA/Spring 1.2.2

Gaurav Dayal
Greenhorn

Joined: Nov 11, 2009
Posts: 1
Hi,

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,
Gaurav
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10059
    
163

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]
 
 
subject: EJB 2.1 deployment problem on JBoss 5.0.1 GA/Spring 1.2.2