[ 
https://issues.apache.org/jira/browse/FELIX-3172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13131356#comment-13131356
 ] 

François Fornaciari commented on FELIX-3172:
--------------------------------------------

Thanks Clément for fixing this issue.

Unfortunately, after having updated all Felix projects from the trunk, I can't 
build the iPOJO modules due to compilation errors and specially the core module.
I tried while Maven 2 or 3.

Below one of the error I have : 
[ERROR] 
D:\dev\programs\felix\ipojo\core\src\main\java\org\apache\felix\ipojo\IPojoContext.java:[268,44]
 error: type ServiceReference does not take pa
rameters

It's been a while I didn't compile iPOJO modules from trunk so I don't know if 
my configuration is ok.
Any idea ?

Otherwise, is there a location where I can find the snapshot artifact?
                
> Error when calling BundleContext.register(Class, Object, Dictionary)
> --------------------------------------------------------------------
>
>                 Key: FELIX-3172
>                 URL: https://issues.apache.org/jira/browse/FELIX-3172
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>    Affects Versions: iPOJO-1.8.0
>         Environment: Java 1.6, Apache Felix 4.0.1
>            Reporter: François Fornaciari
>            Assignee: Clement Escoffier
>             Fix For: ipojo-core-1.8.2
>
>
> I have an error when I try to call the simple BundleContext.register(Class, 
> Object, Dictionary) method (note the type of the first argument).
> It seems that the new signature of the BundleContext.register() method is not 
> recognised by the IPojoContext.
> This simple example reproduces the issue:
> @Component
> @Instantiate
> public class Test{
>       
>       public Test(BundleContext bundleContext) {
>               bundleContext.registerService(String.class, "test", null);
>       }
> }
> With the following trace:
> g! [ERROR]  : [com.fornacif.osgi.manager.internal.Manager-0] createInstance 
> -> Cannot invoke the constructor method - the constructor throws an except
> ion : 
> org.apache.felix.ipojo.IPojoContext.registerService(Ljava/lang/Class;Ljava/lang/Object;Ljava/util/Dictionary;)Lorg/osgi/framework/ServiceRegistr
> ation;
> java.lang.AbstractMethodError: 
> org.apache.felix.ipojo.IPojoContext.registerService(Ljava/lang/Class;Ljava/lang/Object;Ljava/util/Dictionary;)Lorg/osgi
> /framework/ServiceRegistration;
>         at com.fornacif.osgi.manager.internal.Manager.<init>(Manager.java:12)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
> Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown 
> Source)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown 
> Source)
>         at java.lang.reflect.Constructor.newInstance(Unknown Source)
>         at 
> org.apache.felix.ipojo.InstanceManager.createObject(InstanceManager.java:656)
>         at 
> org.apache.felix.ipojo.InstanceManager.getPojoObject(InstanceManager.java:844)
>         at 
> org.apache.felix.ipojo.handlers.lifecycle.callback.LifecycleCallbackHandler.__stateChanged(LifecycleCallbackHandler.java:156)
>         at 
> org.apache.felix.ipojo.handlers.lifecycle.callback.LifecycleCallbackHandler.stateChanged(LifecycleCallbackHandler.java)
>         at 
> org.apache.felix.ipojo.InstanceManager.setState(InstanceManager.java:471)
>         at 
> org.apache.felix.ipojo.InstanceManager.start(InstanceManager.java:353)
>         at 
> org.apache.felix.ipojo.ComponentFactory.createInstance(ComponentFactory.java:166)
>         at 
> org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:301)
>         at 
> org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:238)
>         at 
> org.apache.felix.ipojo.InstanceCreator$ManagedInstance.create(InstanceCreator.java:343)
>         at 
> org.apache.felix.ipojo.InstanceCreator.addInstance(InstanceCreator.java:89)
>         at org.apache.felix.ipojo.Extender.parse(Extender.java:269)
>         at 
> org.apache.felix.ipojo.Extender.startManagementFor(Extender.java:208)
>         at org.apache.felix.ipojo.Extender.access$600(Extender.java:52)
>         at 
> org.apache.felix.ipojo.Extender$CreatorThread.run(Extender.java:682)
>         at java.lang.Thread.run(Unknown Source)
> [ERROR] com.fornacif.osgi.manager.internal.Manager : Cannot create a POJO 
> instance, the POJO constructor has thrown an exception: org.apache.felix.ipo
> jo.IPojoContext.registerService(Ljava/lang/Class;Ljava/lang/Object;Ljava/util/Dictionary;)Lorg/osgi/framework/ServiceRegistration;
> java.lang.RuntimeException: Cannot create a POJO instance, the POJO 
> constructor has thrown an exception: 
> org.apache.felix.ipojo.IPojoContext.registerS
> ervice(Ljava/lang/Class;Ljava/lang/Object;Ljava/util/Dictionary;)Lorg/osgi/framework/ServiceRegistration;
>         at 
> org.apache.felix.ipojo.InstanceManager.createObject(InstanceManager.java:696)
>         at 
> org.apache.felix.ipojo.InstanceManager.getPojoObject(InstanceManager.java:844)
>         at 
> org.apache.felix.ipojo.handlers.lifecycle.callback.LifecycleCallbackHandler.__stateChanged(LifecycleCallbackHandler.java:156)
>         at 
> org.apache.felix.ipojo.handlers.lifecycle.callback.LifecycleCallbackHandler.stateChanged(LifecycleCallbackHandler.java)
>         at 
> org.apache.felix.ipojo.InstanceManager.setState(InstanceManager.java:471)
>         at 
> org.apache.felix.ipojo.InstanceManager.start(InstanceManager.java:353)
>         at 
> org.apache.felix.ipojo.ComponentFactory.createInstance(ComponentFactory.java:166)
>         at 
> org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:301)
>         at 
> org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:238)
>         at 
> org.apache.felix.ipojo.InstanceCreator$ManagedInstance.create(InstanceCreator.java:343)
>         at 
> org.apache.felix.ipojo.InstanceCreator.addInstance(InstanceCreator.java:89)
>         at org.apache.felix.ipojo.Extender.parse(Extender.java:269)
>         at 
> org.apache.felix.ipojo.Extender.startManagementFor(Extender.java:208)
>         at org.apache.felix.ipojo.Extender.access$600(Extender.java:52)
>         at 
> org.apache.felix.ipojo.Extender$CreatorThread.run(Extender.java:682)
>         at java.lang.Thread.run(Unknown Source)
> [ERROR] com.fornacif.osgi.manager.internal.Manager : Cannot create a POJO 
> instance, the POJO constructor has thrown an exception: org.apache.felix.ipo
> jo.IPojoContext.registerService(Ljava/lang/Class;Ljava/lang/Object;Ljava/util/Dictionary;)Lorg/osgi/framework/ServiceRegistration;
> [ERROR] iPOJO Instance Creator : A matching factory was found for 
> {component=com.fornacif.osgi.manager.internal.Manager, 
> instance.name=com.fornacif.os
> gi.manager.internal.Manager-0}, but the instantiation failed : The 
> configuration is not correct for the type 
> com.fornacif.osgi.manager.internal.Manage
> r : Cannot create a POJO instance, the POJO constructor has thrown an 
> exception: 
> org.apache.felix.ipojo.IPojoContext.registerService(Ljava/lang/Class;
> Ljava/lang/Object;Ljava/util/Dictionary;)Lorg/osgi/framework/ServiceRegistration;

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to