Вопрос

Did somebody manage to get a working application which included these 2 frameworks?

The problem I'm facing is that the dependencies are like this:

magnolia 4.4.5 -> apache jackrabbit 1.6.4 -> apache lucene 2.4.1 hibernate search 3.4.1.Final -> apache lucene 3.1.0

So there's an inconsistency for the lucene version. And I need a version of hibernate search that's with annotations.

I've really tried to integrate these 2 but with no luck. I hope somebody else managed to.

Thanks :)

Это было полезно?

Решение

We have succesfully used this a long time. It really sucks that Jackrabbit is so slow to update Lucene. That makes it hard. I think you should consider using Solr in a separate JVM just to get rid of this dependency.

Having said that, this is how you can solve it. What defines what is possible is Jackrabbit.

Jackrabbit 1.6.x and you MUST use Lucene 2.4.x. We did that successfully a long time but was then forced to use an old hibernate search. If you want to I can give you that config as well.

But recently when jackrabbit released 2.3.0 it depends on Lucene 3.0.3. It breaks on 3.1.0, so you must use Lucene 3.0.3.

This is our config simplified:

org.apache.jackrabbit:jackrabbit-core 2.3.0
- exclude org.apache.lucene:lucene-core

org.hibernate:hibernate-core:3.6.7.Final

org.hibernate:hibernate-commons-annotations:3.2.0.Final
- exclude org.hibernate:hibernate

org.hibernate:hibernate-search:3.3.0.Final or 3.4.0.CR1
- exclude org.hibernate:ejb3-persistence
- exclude org.apache.lucene:lucene-core

(3.4.0.CR1 is the last hibernate search that depends on Lucene 3.0.3, but if you don't want beta-versions use 3.3.0 or 3.3.1)

org.apache.lucene:lucene-core:3.0.3

Magnolia 4.4.5

The normal Hibernate Annotations project is now included in org.hibernate:hibernate-core:3.6.7.Final so no need to depend on that.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top