You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Luis Neto <lc...@gmail.com> on 2014/03/17 13:08:36 UTC

BundleTracker Error

I am trying to deepen in ApacheFelix OSGi implementation. I has downloaded
and
tried to compile your examples at:

http://felix.apache.org/documentation/tutorials-examples-and-presentations/apache-felix-application-demonstration.htmlhttp://felix.apache.org/documentation/tutorials-examples-and-presentations/apache-felix-application-demonstration.html

I am stuck with a problem building the project's. When i compile the
Extender-Based Host i get a compile error related with BundleTracker
extension ShapeBundleTracker class. Error:

[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:3.1:compile
(default-compile) on project extenderbased.host: Compilation failure:
Compilation failure:
[ERROR]
C:\Users\Luis\Documents\NetBeansProjects\FelixOSGiExamples\extenderbased.host\src\main\java\org\apache\felix\example\extenderbased\host\ShapeBundleTracker.java:[21,53]
error: type BundleTracker does not take parameters
[ERROR]
C:\Users\Luis\Documents\NetBeansProjects\FelixOSGiExamples\extenderbased.host\src\main\java\org\apache\felix\example\extenderbased\host\ShapeBundleTracker.java:[41,4]
error: method does not override or implement a method from a supertype
[ERROR]
C:\Users\Luis\Documents\NetBeansProjects\FelixOSGiExamples\extenderbased.host\src\main\java\org\apache\felix\example\extenderbased\host\ShapeBundleTracker.java:[100,4]
error: method does not override or implement a method from a supertype
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile
(default-compile) on project extenderbased.host: Compilation failure
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
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:108)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
at
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
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:606)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.compiler.CompilationFailureException:
Compilation failure
at
org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:858)
at
org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:129)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more


I checke'd the dependencies and the import packages of the pom.xml and
can't figure out why this error is happening, i changed the mojo compiler
target and source and try to include osgi.core at dependencies, could you
give me some help?

Best regards,
Luis Neto

Re: BundleTracker Error

Posted by Neil Bartlett <nj...@gmail.com>.
You are probably compiling with Java 7 (or higher) against the OSGi core or
compendium JARs version 4.3.0. These JARs were compiled with the -jsr14
flag, for which support was withdrawn in Java 7.

The solution is to compile against version 4.3.1 of these JARs.

Regards,
Neil


On Mon, Mar 17, 2014 at 12:08 PM, Luis Neto <lc...@gmail.com> wrote:

> I am trying to deepen in ApacheFelix OSGi implementation. I has downloaded
> and
> tried to compile your examples at:
>
>
> http://felix.apache.org/documentation/tutorials-examples-and-presentations/apache-felix-application-demonstration.htmlhttp://felix.apache.org/documentation/tutorials-examples-and-presentations/apache-felix-application-demonstration.html
>
> I am stuck with a problem building the project's. When i compile the
> Extender-Based Host i get a compile error related with BundleTracker
> extension ShapeBundleTracker class. Error:
>
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-compiler-plugin:3.1:compile
> (default-compile) on project extenderbased.host: Compilation failure:
> Compilation failure:
> [ERROR]
>
> C:\Users\Luis\Documents\NetBeansProjects\FelixOSGiExamples\extenderbased.host\src\main\java\org\apache\felix\example\extenderbased\host\ShapeBundleTracker.java:[21,53]
> error: type BundleTracker does not take parameters
> [ERROR]
>
> C:\Users\Luis\Documents\NetBeansProjects\FelixOSGiExamples\extenderbased.host\src\main\java\org\apache\felix\example\extenderbased\host\ShapeBundleTracker.java:[41,4]
> error: method does not override or implement a method from a supertype
> [ERROR]
>
> C:\Users\Luis\Documents\NetBeansProjects\FelixOSGiExamples\extenderbased.host\src\main\java\org\apache\felix\example\extenderbased\host\ShapeBundleTracker.java:[100,4]
> error: method does not override or implement a method from a supertype
> [ERROR] -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
> goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile
> (default-compile) on project extenderbased.host: Compilation failure
> at
>
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
> 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:108)
> at
>
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
> at
>
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
> at
>
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
> at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
> 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:606)
> at
>
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
> at
>
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
> Caused by: org.apache.maven.plugin.compiler.CompilationFailureException:
> Compilation failure
> at
>
> org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:858)
> at
>
> org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:129)
> at
>
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
> at
>
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
> ... 19 more
>
>
> I checke'd the dependencies and the import packages of the pom.xml and
> can't figure out why this error is happening, i changed the mojo compiler
> target and source and try to include osgi.core at dependencies, could you
> give me some help?
>
> Best regards,
> Luis Neto
>