Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-3608

Cannot compile addons created via "create addon advance"

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 1.3.1.RELEASE
    • Fix Version/s: 2.0.0.M1
    • Component/s: @ CORE
    • Labels:
    • Environment:
      jdk7, Spring Roo 1.3.1, Maven 3.2.5

      Description

      The addons created via "addon create advanced" command do not compile, neither run.

      K:\spring-roo-1.3.1.RELEASE\bin\addon2>..\roo.bat
      
      roo> addon create advanced --topLevelPackage com.test.addon
      
      roo> exit
      
      

      Now I edit the pom.xml and comment de gpg plugin (i dont need it signed).

      K:\spring-roo-1.3.1.RELEASE\bin\addon2>mvn clean install

      [ERROR] Failed to execute goal org.apache.felix:maven-scr-plugin:1.20.0:scr (generate-scr-scrdescriptor) on project com.test.addon: Please use org.apache.felix:
      org.apache.felix.scr.annotations version 1.9.0 or newer. -> [Help 1]
      
      

      If I change the scr version from 1.20.0 to 1.7.2 (the version that was used in roo 1.2.5) build is success but another exception is thrown during bundle load:

      K:\spring-roo-1.3.1.RELEASE\bin\addon2>copy target\com.test.addon-0.1.0.BUILD-SNAPSHOT.jar ..\..\bundle

      K:\spring-roo-1.3.1.RELEASE\bin\addon2>..\roo.bat

      [com.test.addon [86]] [com.test.addon.AddonMetadataProvider(240)] Failed creating the component instance; see log for reason
      [com.test.addon [86]] FrameworkEvent ERROR
      org.apache.felix.log.LogException: org.osgi.framework.ServiceException: Service factory returned null.
          at org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:353)
          at org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:231)
          at org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:327)
          at org.apache.felix.framework.Felix.getService(Felix.java:3576)
          at org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:468)
          at org.apache.felix.scr.impl.helper.BindMethod.getServiceObject(BindMethod.java:572)
          at org.apache.felix.scr.impl.manager.DependencyManager.getServiceObject(DependencyManager.java:2012)
          at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.addedService(DependencyManager.java:328)
          at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.addedService(DependencyManager.java:304)
          at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1480)
          at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1401)
          at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:1210)
          at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:1148)
          at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1432)
          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:4445)
          at org.apache.felix.framework.Felix.registerService(Felix.java:3431)
          at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:346)
          at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:1003)
          at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:992)
          at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:134)
          at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:1044)
          at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:841)
          at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:419)
          at org.apache.felix.scr.impl.config.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:376)
          at org.apache.felix.scr.impl.BundleComponentActivator.initialize(BundleComponentActivator.java:172)
          at org.apache.felix.scr.impl.BundleComponentActivator.<init>(BundleComponentActivator.java:120)
          at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:258)
          at org.apache.felix.scr.impl.Activator.access$000(Activator.java:45)
          at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:185)
          at org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:259)
          at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:232)
          at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:479)
          at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:414)
          at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232)
          at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:443)
          at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:869)
          at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:790)
          at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:515)
          at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4429)
          at org.apache.felix.framework.Felix.startBundle(Felix.java:2100)
          at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1299)
          at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)
          at java.lang.Thread.run(Thread.java:722)
      roo>
      
      

      PS: Its my first bug report in this Jira so I hope everything is explained.

        Attachments

          Activity

            People

            • Assignee:
              jcgarcia Juan Carlos GarcĂ­a del Canto
              Reporter:
              arturogp Arturo
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: