[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[virgo-dev] Virgo Snaps Question

 I was wondering if anyone has used applicationContext.xml within a snap.
I have been trying to pull in some OSGI services to be autowired to my
MVC controller in a snap but it doesn't appear to be finding the OSGi
service when it trys to create the controller.

 Just curious if it is just me or if anyone else has tried this.



I do have the following in the web.xml of the snap:



and I use the file applicationContext.xml in the WEB-INF folder with an
osgi:reference in it for my service. The interface used by my service is
org.jnode.driver.DeviceManager (in the error below).

When I look in the Virgo console, there is no sign of the snap consuming
the requested service and I am seeing the following error in the logs:

Context initialization failed org.springframework.beans.fac
tory.UnsatisfiedDependencyException: Error creating bean with name
'nodeController' defined in file
Unsatisfied d
ependency expressed through constructor argument with index 0 of type
[org.jnode.driver.DeviceManager]: : No matching bean of type
[org.jnode.driver.DeviceManager] found for depend
ency: expected at least 1 bean which qualifies as autowire candidate for
this dependency. Dependency annotations: {}; nested exception is
anDefinitionException: No matching bean of type
[org.jnode.driver.DeviceManager] found for dependency: expected at least 1
bean which qualifies as autowire candidate for this depen
dency. Dependency annotations: {}