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

scr-plugin: "Annotated method {0} not found"

    Details

      Description

      I run in to that[1] problem.
      The method that is not found looks like that:

      > @Nonnull public static <T> Entry<? extends T> create( @Nonnull T
      > object,
      @Nonnull >byte[] expected )

      { > }

      I have debugged this and it comes to that:

      in ClassScanner#237 parameters are compared. The second parameter of
      my method (byte[]) has a strange difference here:

      parameterTypeName: [B
      signature[index].getClassName(): byte[]

      So I think this might be related to the asm usage
      I think instead of "signature[index].getClassName()" there should be
      called
      signature[index].getDescriptor()

      Any idea how I could work around that problem (without changing my
      method's signature)?

      Thanks,

      Johannes

      [1]
      [ERROR] Failed to execute goal
      org.apache.felix:maven-scr-plugin:1.8.0:scr
      (generate-scr-scrdescriptor) on project test-utils:
      com.cedarsoft.serialization.test.utils.AbstractSerializerTest2 :
      Annotated method create not found. -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
      execute goal org.apache.felix:maven-scr-plugin:1.8.0:scr
      (generate-scr-scrdescriptor) on project test-utils:
      com.cedarsoft.serialization.test.utils.AbstractSerializerTest2 :
      Annotated method create not found.
      at
      org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
      at
      org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      at
      org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      at
      org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
      at
      org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
      at
      org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
      at
      org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at
      org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
      at
      org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
      at
      org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
      at
      org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
      Caused by: org.apache.maven.plugin.MojoExecutionException:
      com.cedarsoft.serialization.test.utils.AbstractSerializerTest2 :
      Annotated method create not found.
      at
      org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:222)
      at
      org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
      at
      org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
      ... 19 more
      Caused by: org.apache.felix.scrplugin.SCRDescriptorException:
      Annotated method create not found.
      at
      org.apache.felix.scrplugin.helper.ClassScanner.extractAnnotation(ClassScanner.java:249)
      at
      org.apache.felix.scrplugin.helper.ClassScanner.processClass(ClassScanner.java:180)
      at
      org.apache.felix.scrplugin.helper.ClassScanner.scanSources(ClassScanner.java:143)
      at
      org.apache.felix.scrplugin.SCRDescriptorGenerator.execute(SCRDescriptorGenerator.java:154)
      at
      org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:217)
      ... 21 more

        Attachments

          Activity

            People

            • Assignee:
              cziegeler Carsten Ziegeler
              Reporter:
              js@cedarsoft.com Johannes Schneider
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: