Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-4488

Attempt to create nullable object for non-interface service

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: ipojo-runtime-1.11.2
    • Fix Version/s: ipojo-runtime-1.12.0
    • Component/s: iPOJO
    • Labels:
      None

      Description

      iPOJO tries to create nullable object for non-interface services. It should return 'null' in this case.

      Here is the stack trace:
      15/04/14 17:18:31 (W) LoggerService.log : [WARNING] : [org.wisdom.template.thymeleaf.tracker.TemplateTracker-0] The dependency is not optional, however no service object can be injected in engine -> org.wisdom.template.thymeleaf.ThymeleafTemplateCollector
      15/04/14 17:18:31 (S) LoggerService.log : [ERROR] : [org.wisdom.template.thymeleaf.tracker.TemplateTracker-0] The callback method stop has thrown an exception : Cannot create the Nullable object, an unexpected error occurs
      java.lang.IllegalStateException: Cannot create the Nullable object, an unexpected error occurs
      at org.apache.felix.ipojo.handlers.dependency.Dependency.createNullableObject(Dependency.java:436)
      at org.apache.felix.ipojo.handlers.dependency.Dependency.createServiceObject(Dependency.java:748)
      at org.apache.felix.ipojo.handlers.dependency.Dependency.onGet(Dependency.java:711)
      at org.apache.felix.ipojo.InstanceManager.onGet(InstanceManager.java:1191)
      at org.wisdom.template.thymeleaf.tracker.TemplateTracker.__getengine(TemplateTracker.java)
      at org.wisdom.template.thymeleaf.tracker.TemplateTracker.__M_removedBundle(TemplateTracker.java:110)
      at org.wisdom.template.thymeleaf.tracker.TemplateTracker.removedBundle(TemplateTracker.java)
      at org.wisdom.template.thymeleaf.tracker.TemplateTracker.__M_removedBundle(TemplateTracker.java:44)
      at org.wisdom.template.thymeleaf.tracker.TemplateTracker.removedBundle(TemplateTracker.java)
      at org.osgi.util.tracker.BundleTracker$Tracked.customizerRemoved(BundleTracker.java:491)
      at org.osgi.util.tracker.BundleTracker$Tracked.customizerRemoved(BundleTracker.java:414)
      at org.osgi.util.tracker.AbstractTracked.untrack(AbstractTracked.java:341)
      at org.osgi.util.tracker.BundleTracker.close(BundleTracker.java:192)
      at org.wisdom.template.thymeleaf.tracker.TemplateTracker.__M_stop(TemplateTracker.java:77)
      at org.wisdom.template.thymeleaf.tracker.TemplateTracker.stop(TemplateTracker.java)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:483)
      at org.apache.felix.ipojo.util.Callback.call(Callback.java:237)
      at org.apache.felix.ipojo.util.Callback.call(Callback.java:193)
      at org.apache.felix.ipojo.handlers.lifecycle.callback.LifecycleCallback.call(LifecycleCallback.java:86)
      at org.apache.felix.ipojo.handlers.lifecycle.callback.LifecycleCallbackHandler.__M_stateChanged(LifecycleCallbackHandler.java:162)
      at org.apache.felix.ipojo.handlers.lifecycle.callback.LifecycleCallbackHandler.stateChanged(LifecycleCallbackHandler.java)
      at org.apache.felix.ipojo.InstanceManager.setState(InstanceManager.java:572)
      at org.apache.felix.ipojo.InstanceManager.stateChanged(InstanceManager.java:1521)
      at org.apache.felix.ipojo.InstanceManager.setState(InstanceManager.java:585)
      at org.apache.felix.ipojo.HandlerManager.stateChanged(HandlerManager.java:230)
      at org.apache.felix.ipojo.Handler.setValidity(Handler.java:176)
      at org.apache.felix.ipojo.handlers.dependency.DependencyHandler.__M_invalidate(DependencyHandler.java:143)
      at org.apache.felix.ipojo.handlers.dependency.DependencyHandler.invalidate(DependencyHandler.java)
      at org.apache.felix.ipojo.util.DependencyModel.invalidate(DependencyModel.java:511)
      at org.apache.felix.ipojo.util.DependencyModel.computeAndSetDependencyState(DependencyModel.java:360)
      at org.apache.felix.ipojo.util.DependencyModel.onChange(DependencyModel.java:1123)
      at org.apache.felix.ipojo.dependency.impl.ServiceReferenceManager.fireUpdate(ServiceReferenceManager.java:561)
      at org.apache.felix.ipojo.dependency.impl.ServiceReferenceManager.onDepartureOfAMatchingService(ServiceReferenceManager.java:672)
      at org.apache.felix.ipojo.dependency.impl.ServiceReferenceManager.removedService(ServiceReferenceManager.java:687)
      at org.apache.felix.ipojo.util.Tracker$Tracked.untrack(Tracker.java:739)
      at org.apache.felix.ipojo.util.Tracker$Tracked.serviceChanged(Tracker.java:637)
      at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:943)
      at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:794)
      at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:544)
      at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4425)
      at org.apache.felix.framework.Felix.access$000(Felix.java:75)
      at org.apache.felix.framework.Felix$1.serviceChanged(Felix.java:402)
      at org.apache.felix.framework.ServiceRegistry.unregisterService(ServiceRegistry.java:153)
      at org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:128)
      at org.apache.felix.ipojo.handlers.providedservice.ProvidedService.unregisterService(ProvidedService.java:415)
      at org.apache.felix.ipojo.handlers.providedservice.ProvidedServiceHandler.__M_stateChanged(ProvidedServiceHandler.java:476)
      at org.apache.felix.ipojo.handlers.providedservice.ProvidedServiceHandler.stateChanged(ProvidedServiceHandler.java)
      at org.apache.felix.ipojo.InstanceManager.setState(InstanceManager.java:572)
      at org.apache.felix.ipojo.InstanceManager.stateChanged(InstanceManager.java:1521)
      at org.apache.felix.ipojo.InstanceManager.setState(InstanceManager.java:585)
      at org.apache.felix.ipojo.HandlerManager.stateChanged(HandlerManager.java:230)
      at org.apache.felix.ipojo.Handler.setValidity(Handler.java:176)
      at org.apache.felix.ipojo.handlers.dependency.DependencyHandler.__M_invalidate(DependencyHandler.java:143)
      at org.apache.felix.ipojo.handlers.dependency.DependencyHandler.invalidate(DependencyHandler.java)
      at org.apache.felix.ipojo.util.DependencyModel.invalidate(DependencyModel.java:511)
      at org.apache.felix.ipojo.util.DependencyModel.computeAndSetDependencyState(DependencyModel.java:360)
      at org.apache.felix.ipojo.util.DependencyModel.onChange(DependencyModel.java:1123)
      at org.apache.felix.ipojo.dependency.impl.ServiceReferenceManager.fireUpdate(ServiceReferenceManager.java:561)
      at org.apache.felix.ipojo.dependency.impl.ServiceReferenceManager.onDepartureOfAMatchingService(ServiceReferenceManager.java:672)
      at org.apache.felix.ipojo.dependency.impl.ServiceReferenceManager.removedService(ServiceReferenceManager.java:687)
      at org.apache.felix.ipojo.util.Tracker$Tracked.untrack(Tracker.java:739)
      at org.apache.felix.ipojo.util.Tracker$Tracked.serviceChanged(Tracker.java:637)
      at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:943)
      at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:794)
      at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:544)
      at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4425)
      at org.apache.felix.framework.Felix.access$000(Felix.java:75)
      at org.apache.felix.framework.Felix$1.serviceChanged(Felix.java:402)
      at org.apache.felix.framework.ServiceRegistry.unregisterService(ServiceRegistry.java:153)
      at org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:128)
      at org.apache.felix.ipojo.handlers.providedservice.ProvidedService.unregisterService(ProvidedService.java:415)
      at org.apache.felix.ipojo.handlers.providedservice.ProvidedService$ServiceController.setValue(ProvidedService.java:878)
      at org.apache.felix.ipojo.handlers.providedservice.ProvidedServiceHandler.__M_onSet(ProvidedServiceHandler.java:429)
      at org.apache.felix.ipojo.handlers.providedservice.ProvidedServiceHandler.onSet(ProvidedServiceHandler.java)
      at org.apache.felix.ipojo.InstanceManager.onSet(InstanceManager.java:1401)
      at org.wisdom.configuration.ApplicationConfigurationImpl.__setcontroller(ApplicationConfigurationImpl.java)
      at org.wisdom.configuration.ApplicationConfigurationImpl$ConfigurationDeployer.__M_onFileChange(ApplicationConfigurationImpl.java:317)
      at org.wisdom.configuration.ApplicationConfigurationImpl$ConfigurationDeployer.onFileChange(ApplicationConfigurationImpl.java)
      at org.ow2.chameleon.core.activators.DirectoryMonitor$FileMonitor.onFileChange(DirectoryMonitor.java:502)
      at org.apache.commons.io.monitor.FileAlterationObserver.doMatch(FileAlterationObserver.java:400)
      at org.apache.commons.io.monitor.FileAlterationObserver.checkAndNotify(FileAlterationObserver.java:334)
      at org.apache.commons.io.monitor.FileAlterationObserver.checkAndNotify(FileAlterationObserver.java:304)
      at org.apache.commons.io.monitor.FileAlterationMonitor.run(FileAlterationMonitor.java:182)
      at java.lang.Thread.run(Thread.java:744)
      Caused by: java.lang.IllegalArgumentException: org.wisdom.template.thymeleaf.ThymeleafTemplateCollector is not an interface
      at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:589)
      at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:556)
      at java.lang.reflect.WeakCache$Factory.get(WeakCache.java:230)
      at java.lang.reflect.WeakCache.get(WeakCache.java:127)
      at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:418)
      at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:717)
      at org.apache.felix.ipojo.handlers.dependency.Dependency.createNullableObject(Dependency.java:427)

        Attachments

          Activity

            People

            • Assignee:
              clement.escoffier Clement Escoffier
              Reporter:
              clement.escoffier Clement Escoffier
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: