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

SCR Bnd Plugin does not work with bnd-maven-plugin: org.apache.felix.scrplugin.SCRDescriptorException: Unable to load compiled class

    XMLWordPrintableJSON

    Details

      Description

      When used with the bnd-maven-plugin (https://github.com/bndtools/bnd/tree/master/maven/bnd-maven-plugin), the plugin issues the following error

      [ERROR] Failed to execute goal biz.aQute.bnd:bnd-maven-plugin:3.3.0:bnd-process (default) on project accesscontroltool-bundle-with-b-m-p: Got unexpected exception while analyzing:org.apache.felix.scrplugin.SCRDescriptorException: Unable to load compiled class: <some class name>
      [ERROR] at org.apache.felix.scrplugin.helper.ClassScanner.scanSources(ClassScanner.java:152)
      [ERROR] at org.apache.felix.scrplugin.SCRDescriptorGenerator.execute(SCRDescriptorGenerator.java:146)
      [ERROR] at org.apache.felix.scrplugin.bnd.SCRDescriptorBndPlugin.analyzeJar(SCRDescriptorBndPlugin.java:178)
      [ERROR] at aQute.bnd.osgi.Analyzer.doPlugins(Analyzer.java:656)
      [ERROR] at aQute.bnd.osgi.Analyzer.analyze(Analyzer.java:209)
      [ERROR] at aQute.bnd.osgi.Builder.analyze(Builder.java:389)
      [ERROR] at aQute.bnd.osgi.Analyzer.calcManifest(Analyzer.java:687)
      [ERROR] at aQute.bnd.osgi.Builder.build(Builder.java:105)
      [ERROR] at aQute.bnd.maven.plugin.BndMavenPlugin.execute(BndMavenPlugin.java:217)
      [ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
      [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      [ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
      [ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
      [ERROR] at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      [ERROR] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
      [ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
      [ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
      [ERROR] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
      [ERROR] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
      [ERROR] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
      [ERROR] at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
      [ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      [ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      [ERROR] at java.lang.reflect.Method.invoke(Method.java:606)
      [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
      [ERROR] Caused by: java.lang.ClassNotFoundException: <some class name>
      [ERROR] at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
      [ERROR] at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      [ERROR] at java.security.AccessController.doPrivileged(Native Method)
      [ERROR] at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      [ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
      [ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
      [ERROR] at org.apache.felix.scrplugin.helper.ClassScanner.scanSources(ClassScanner.java:144)
      [ERROR] ... 30 more
      

      The equivalent configuration runs fine with the maven-bundle-plugin.
      This happens for every source file.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cziegeler Carsten Ziegeler
                Reporter:
                kwin Konrad Windszus
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: