2

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 :)

Marius
  • 970
  • 1
  • 16
  • 36
  • Have you tried defining a dependency to Hibernate Search 3.4.1, before including Magnolia 4.4.5, and forcibly excluding Lucene 3.1.0? – Perception Oct 26 '11 at 16:47

1 Answers1

4

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.

kimmo
  • 81
  • 3
  • Also note that Jackrabbit is on a linux-style release schedule, so x.even (2.4.x) is stable and x.odd (2.3.x) is early-access, which doesn't necessarily mean unstable. – sigget Oct 31 '11 at 10:00
  • Thank you very much :)! It worked perfectly. I have another question if it's ok. I've tried to change the url mapping for magnolia to /magnolia/* but it won't work for the installer since it's configured to go right after "/". How can I tell magnolia to render only pages with /magnolia/* and spring every other page... thanks :) – Marius Oct 31 '11 at 16:04
  • Marius, I do this by using a filter that is before Magnolia's filter in web.xml. That filter is invoking a DispatcherServlet and just taking all requests the DispatcherServlet wants. If you create a new question on Stackoverflow I can provide a detailed answer there. It's too big too take in this question. – kimmo Nov 14 '11 at 10:42