Hi,

I am trying to use spring dm in felix for doing a client module with activator 
in which I wanting to do dependency injection of service.  I am not getting the 
service set.  It gives Null pointer.  could one guide if I am doing things 
right ?


spring/bean_config.xml
------------------------

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xmlns:osgi="http://www.springframework.org/schema/osgi";
  xsi:schemaLocation="http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd
                      http://www.springframework.org/schema/osgi 
http://www.springframework.org/schema/osgi/spring-osgi.xsd";>

  
  
  <osgi:reference id="simpleServiceOsgi" 
interface="org.springframework.osgi.samples.simpleservice.MyService"></osgi:reference>

<bean id="client" class="org.springframework.osgi.samples.ActivatorClient" 
scope="singleton">
   <property name="service" ref="simpleServiceOsgi"/>
</bean>
 
</beans>


pom.xml snippet:
-----------------
<plugin>    <!-- (2) START -->
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <!-- 
>Export-Package>org.springframework.osgi.samples.simpleservice</Export-Package 
-->
                        
                        
<Private-Package>org.springframework.osgi.samples</Private-Package>
                        
<Bundle-Activator>org.springframework.osgi.samples.ActivatorClient</Bundle-Activator>
                        
                    </instructions>
                </configuration>
            </plugin> 

Reply via email to