Hi Kevin,

OSGi version syntax is strictly defined with four sections separated by dots. 
The first three sections are integers greater than or equal to zero, and the 
final section (the qualifier) is a String.

In this case the org.apache.hadoop.zookeeper “bundle” has a version of 
3.5.3-beta, which is not OSGi compatible (3.5.3.beta would be). This is because 
the actual artifact you’re using is malformed - the developers have added a 
Bundle-Version to the artifact which isn’t a valid version. There is no way 
that this has ever been run or tested in OSGi. This is a bug in their code and 
should be raised as such.

You should be fine using an older version with a legal version number, for 
example 3.4.9.

I hope this helps,

Tim

> On 25 Apr 2018, at 18:29, Kevin Boyle via osgi-dev <osgi-dev@mail.osgi.org> 
> wrote:
> 
> I'm new to OSGI and after following the enroute quick start tutorial 
> <http://enroute.osgi.org/tutorial/020-tutorial_qs.html> I added one class and 
> one library to the pom.xml included here.   The curator-recipes indirectly 
> depends on zookeeper 3.5.3-beta ( curator-recipes depends on curator-test 
> which depends on zookeeper 3.5.3 
> <http://www.mvnrepository.com/artifact/org.apache.curator/curator-recipes/4.0.1>
>  ).  Please help me resolve the version conflict and understand why zookeeper 
> 3.5.3-beta is a problem for the quickstart. 
> 
> Please help as I'm stuck
> 
> Thanks
> K
> 
> 
> 
> package org.osgi.enroute.examples.quickstart.rest;
> 
> import org.apache.curator.framework.CuratorFramework;
> import org.apache.curator.framework.CuratorFrameworkFactory;
> import org.apache.curator.retry.ExponentialBackoffRetry;
> 
> public class StartCurator {
>       
>       public static void main ( String [] args ) 
>       {
>               StartCurator s = new StartCurator();
>               s.start_curator();
>       }
> 
>       public void start_curator ()
>       {
>       
>       String zookeeper_connection_string = "localhost:2181";
>         CuratorFramework    client = 
> CuratorFrameworkFactory.newClient(zookeeper_connection_string, new 
> ExponentialBackoffRetry(1000, 3));
>         System.out.println ("Opening curator connection to zookeeper");
>         client.start();
>         client.close();
>         System.out.println ("Closing curator connection to zookeeper");
>       }
> 
> }
> 
> <dependency>
>     <groupId>org.apache.curator</groupId>
> 
>     <artifactId>curator-recipes</artifactId>
> 
>     <version>4.0.1</version>
> 
> </dependency>
> 
> 
> mvn install fails with the following error
> [INFO] 
> ------------------------------------------------------------------------
> 
> [ERROR] Failed to execute goal 
> biz.aQute.bnd:bnd-indexer-maven-plugin:4.0.0-SNAPSHOT:index (index) on 
> project app: Invalid version in bundle org.apache.hadoop.zookeeper=: 
> 3.5.3-beta -> [Help 1]
> 
> [ERROR] 
> 
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
> switch.
> 
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> 
> [ERROR] 
> 
> [ERROR] For more information about the errors and possible solutions, please 
> read the following articles:
> 
> [ERROR] [Help 1] 
> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
> 
> [ERROR] 
> 
> [ERROR] After correcting the problems, you can resume the build with the 
> command
> 
> [ERROR]   mvn <goals> -rf :app
> 
> Kevins-MBP:quickstart kevintboyle$ 
> 
>     
> 
>  
> _______________________________________________
> OSGi Developer Mail List
> osgi-dev@mail.osgi.org
> https://mail.osgi.org/mailman/listinfo/osgi-dev

_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to