Re: @Autowired doesn't work when trying to wire a service [message #607713] |
Thu, 19 August 2010 21:15 |
Dmitry Sklyut Messages: 279 Registered: January 2010 |
Senior Member |
|
|
Try this for web bundle:
Import-Bundle: com.springsource.org.apache.taglibs.standard;version="[1.1.2,1.3) ",
com.springsource.javax.servlet.jsp.jstl;version="[1.1.2, 1.1.3)",
com.springsource.org.apache.commons.lang;version="[2.4.0,3.0.0) ",
com.springsource.org.apache.velocity;version="[1.6.2,2.0.0) ",
Import-Package:
org.eclipse.virgo.web.dm;version="[2.0.0.RELEASE,3.0.0.RELEASE) "
Import-Library: org.springframework.spring;version="${spring.version.range} "
Do you really have to use log4j? Virgo comes with slf4 + logback already. Much nicer combo by the way.
Instead of importing individual spring bundle start out with import library. Minimized from there. At least add
org.springframework.aop;version="${spring.version.range}",
com.springsource.org.aopalliance;version="1.0.0",
org.springframework.beans;version="${spring.version.range}",
org.springframework.core;version="${spring.version.range}",
org.springframework.context;version="${spring.version.range} ",
as a minimum set and plus all of the web bundles (i.e. web and web.servlet.
I think the reason that you are missing aop imports could be causing issues with Autowire. You might want to check virgo logs to see if there is some info in there
Also, you shouldn't need to import
org.springframework.osgi.core;version="[1.2.1,2.0.0)"
unless you are using classes from there in your code.
Regards,
Dmitry
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03056 seconds