0

I wish to integrate with Jackrabbit 2.x in my application for versioning of data.

My application has a dependency on Lucene 2.9.1

The problem is that Jackrabbit is dependent on a higher version of Lucene (3.6) and as a result I can not place the jackrabbit-core jar in the same classpath as my application as it conflicts with my lucene jars.

Seeing as I prefer not to implement a WebDAV client I thought about using the RMI implementation, however, I see that the jackrabbit-rmi jar is also dependent on jackrabbit-core and Lucene.

Is there any way to work around this to use jackrabbit RMI in my application? or is there some other solution that will allow me to use Jackrabbit without upgrading my lucene jars?

user207421
  • 305,947
  • 44
  • 307
  • 483
Asaf
  • 6,384
  • 1
  • 23
  • 44

2 Answers2

0

You could try using jarjar to repackage newer Lucene into another package and use it from there.

mindas
  • 26,463
  • 15
  • 97
  • 154
  • the problem is that my version is older. Also packaging won't solve the problem of referencing both jars in the same classpath, if I include the 'new' packaged jar with my own I will still have a conflict with the other dependencies. – Asaf May 02 '13 at 13:43
  • If it's only your own code which requires new Lucene, then it should be ok as you would be referring to the newer Lucene API via different package. But if these are some other libraries that require newer Lucene, then I don't think jarjar or any other tool could help you. – mindas May 02 '13 at 14:01
0

What about configuring Jackrabbit as a Ressource provider in your application server ? Thus you would reference it via JNDI and only via the JCR API avoiding the conflict (since the ressource would be in a different classloader).

ehsavoie
  • 3,126
  • 1
  • 16
  • 14