File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes autowiring problem when deploying on Jboss through eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "autowiring problem when deploying on Jboss through eclipse" Watch "autowiring problem when deploying on Jboss through eclipse" New topic
Author

autowiring problem when deploying on Jboss through eclipse

saad bousf
Greenhorn

Joined: Nov 01, 2011
Posts: 6
I'm developping an application using Jboss-4.2.3.GA, spring 3.1.0.RC1 (framework, aop,...), Maven 3.3 and eclipse Indigo. If i deploy my webApp on Jboss using a command line jboss:deploy without using Eclipse, the project is deployed corrctly and i run my application very well. Now, for quick testing and deploying purpose, i want to use Eclipse to deploy the same web app on a jboss server added to eclipse servers and linked to the same external jboss server. The entry to my web app is always the same: a simple servlet (Bonjour.java) wich must call an autowired spring bean (promoteurPresInt) . The problem is that this bean is not wired. Debug shows that it's null.

Web.xml:




spring-context-ressources.xml:


the bean PromoteurPres.java:



the interface implemented by my bean

PromoteurPresInt.java:




La servelett Bonjour.java:




It seems like jboss need some additional library or config when launching a spring application on it through eclipse???
Pliz Save me!
Vyas Sanzgiri
Ranch Hand

Joined: Jun 16, 2007
Posts: 686

I would suggest approaching this by using log4j in debug mode so that detailed logs are generated.

I use these logs to understand what is throwing errors or why things are not working


===Vyas Sanzgiri===
My Blog
saad bousf
Greenhorn

Joined: Nov 01, 2011
Posts: 6
Thank you Vyas!

I have just configured Log4j for spring. It work very well, but no logs are trigered when the problem occur. I m going to chek if it's because i didnt create the project containing the bean the same way than the project containing the servlet. In fact, i created its by 2 diffrents versions of m2eclipse. I will keep you in touch.

saad bousf
Greenhorn

Joined: Nov 01, 2011
Posts: 6
Hy Vyas!

I found the source of the problem. It was done by cheking the two war. the one genereted by m2eclipse and wtp and the one genrated by maven binaries directly. A spring context file was absent in wtp one. it was due to the bad donwloding of an RC version of spring dependency. now i m using an older version of spring core 3 and it works very well.

Tx!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: autowiring problem when deploying on Jboss through eclipse
 
Similar Threads
Spring annotation no handler found
autowiring problem when deploying on Jboss through eclipse
WARN [org.springframework.web.servlet.PageNotFound]No mapping found for HTTP request, error-code404
Getting started with Spring Framework 3.1
controller don't display view