tuscany-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raymond Feng" <enjoyj...@gmail.com>
Subject Re: Fwd: Problem with "implementation.osgi" reference
Date Tue, 16 Jun 2009 16:12:35 GMT
You shouldn't add Service-Component header unless you decide to use OSGi 
Declarative Service for your OSGi programming.

From: Santiago Miguel Aranda Rojas
Sent: Tuesday, June 16, 2009 8:36 AM
To: user@tuscany.apache.org
Subject: Re: Fwd: Problem with "implementation.osgi" reference


I have done some tests and I have found one problem when I add 
Service-Component: OSGI-INF/prueba-component.xml to the manifest.mf of 
CalculatorService. I obtain the next error


Caused by: java.lang.NullPointerException
at 
org.apache.tuscany.sca.node.osgi.impl.NodeFactoryImpl.init(NodeFactoryImpl.java:256)
at 
org.apache.tuscany.sca.node.osgi.impl.NodeFactoryImpl.access$0(NodeFactoryImpl.java:224)
at 
org.apache.tuscany.sca.node.osgi.impl.NodeFactoryImpl$NodeImpl.<init>(NodeFactoryImpl.java:568)


I have downloaded the source code of tuscany in order to see NodeFactoryImpl 
class. I have seen this code but I dont know why it is not working.




  // Create a monitor
        MonitorFactory monitorFactory = 
utilities.getUtility(MonitorFactory.class);
        monitor = monitorFactory.createMonitor();


I guess "monitorFactory" variable it is null. I have checked if 
org.apache.tuscany.sca.monitor is active and it is.


This is my prueba-component.xml


<component name="Prueba" xmlns:scr="http://www.osgi.org/xmlns/scr/v1.0.0">
    <implementation class="es.amivital.calculatorservice2.CalculatorService" 
/>
    <service>
        <provide 
interface="es.amivital.calculatorservice2.CalculatorServiceImpl"/>
    </service>
</component>


Thank you very much 


Mime
View raw message