|
|
|
|
|
Re: @Autowired doesn't work when trying to wire a service [message #554047 is a reply to message #554046] |
Thu, 19 August 2010 21:05 |
Kostas Kougios Messages: 42 Registered: August 2010 |
Member |
|
|
here is the manifest of the web app that uses the service:
Manifest-Version: 1.0
Class-Path:
Bundle-Name: GUI Web Bundle
Bundle-Version: 1.0
Bundle-SymbolicName: com.rits.gui.web
Web-ContextPath: gui
Bundle-Vendor: RobustIT Solutions
Import-Bundle: com.springsource.org.apache.taglibs.standard;version="[1.1.2,1.1.2] ",
com.springsource.org.apache.log4j;version="[1.2.15,1.3.0)",
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) ",
org.springframework.core;version="[3.0.3.RELEASE,4.0.0)",
org.springframework.web;version="[3.0.3.RELEASE,4.0.0)",
org.springframework.web.servlet;version="[3.0.3.RELEASE,4.0.0) ",
org.springframework.context;version="[3.0.3.RELEASE,4.0.0)",
org.springframework.osgi.core;version="[1.2.1,2.0.0)",
com.rits.virgo.log4j
Import-Package:
org.eclipse.virgo.web.dm;version="[2.0.0.RELEASE,3.0.0.RELEASE) ",
javax.servlet;version="[2.5.0,3.0.0)",
com.rits.config
Export-Package: com.rits.gui.web
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
here is the manifest of the service bundle:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Configuration Service
Bundle-SymbolicName: com.rits.config
Bundle-Version: 1.0.0
Bundle-Vendor: RITS
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Bundle: com.springsource.org.apache.log4j;version="[1.2.15,1.3.0)"
Import-Package: groovy.util,groovy.lang
Export-Package: com.rits.config
|
|
|
Re: @Autowired doesn't work when trying to wire a service [message #554048 is a reply to message #554047] |
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.05712 seconds