Hi All,

I wanted to export a bean as a OSGi service , so that this can be used in 
another bundle. But I get the below error. Please help.

SEVERE: Unable to create application context for [com.abc.test.impl], 
unsatisfied dependencies: Dependency on 
[(objectClass=com.abc.platform.test.manager.ITestManager)] (from bean 
[&testManager])
org.springframework.context.ApplicationContextException: Application context 
initialization for 'com.xyz.test.impl' has timed out waiting for 
(objectClass=com.abc.test.manager.ITestManager)

The code is given below. Am I doing anything wrong?

Bundle 1 (com.abc.test.impl) :

Bean declaration -
<bean id="testManagerTarget" class="com.abc.platform.test.TestManager">
       <property name="sessionFactory" ref="sessionFactory"/>
</bean>

<bean id="testManager" 
class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
       <property name="transactionManager">
              <ref bean="transactionManager" />
       </property>
       <property name="target">
              <ref bean="testManagerTarget" />
       </property>
       <property name="transactionAttributes">
              <props>
                     <prop key="store">PROPAGATION_REQUIRED</prop>
              </props>
       </property>
</bean>

Declaring bean as OSGI service  -
<osgi:service id="testManagerService" ref="testManager" 
interface="com.abc.platform.test.manager.ITestManager" />


Bundle 2  (com.xyz.test.impl):

<osgi:reference id="testManager" 
interface="com.abc.platform.test.manager.ITestManager" />


Really appreciate any help.

Thanks
Soniya


DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the 
property of Persistent Systems Ltd. It is intended only for the use of the 
individual or entity to which it is addressed. If you are not the intended 
recipient, you are not authorized to read, retain, copy, print, distribute or 
use this message. If you have received this communication in error, please 
notify the sender and delete all copies of this message. Persistent Systems 
Ltd. does not accept any liability for virus infected mails.
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to