Blueprint: How to implement AbstractApplicationContext.getEnvironment() [message #992021] |
Thu, 20 December 2012 12:36  |
Eclipse User |
|
|
|
I'm trying to refer to OSGi services from my spring app. Blueprint and spring app are deployed in JBoss AS 7.
I keep getting this:
18:55:35,192 ERROR [org.springframework.web.context.ContextLoader] (ServerServic
e Thread Pool -- 156) Context initialization failed: org.springframework.beans.f
actory.BeanCreationException: Error creating bean with name 'InformationService'
: Invocation of init method failed; nested exception is java.lang.IllegalArgumen
tException: Required 'bundleContext' property was not set.
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455) [spring-bea
ns-3.1.3.RELEASE.jar:3.1.3.RELEASE]
now, based on things I've found, I need to implement ServerOsgiBundleXmlWebApplicationContext and define that as a context class for this to work.
Almost-ready code can be found for example at here: http://grepcode.com/file_/repo1.maven.org/maven2/com.tqlab.sense/tqlab-sense-mvc/1.0.0/com/tqlab/sense/context/ServerOsgiBundleXmlWebApplicationContext.java/?v=source
however, using that, I get a complaint
The type ServerOsgiBundleXmlWebApplicationContext must implement the inherited abstract method ConfigurableWebApplicationContext.getEnvironment() to override AbstractApplicationContext.getEnvironment()
and I have no idea how to implement that. Is there any existing example on this? What should the method contain? I tried some things, but they kept on failing.
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04285 seconds