[hibernate-dev] HSearch + Tika bridge using Wildfly modules

Brett Meyer brmeyer at redhat.com
Mon Jun 1 12:05:03 EDT 2015


Sanne, right, I tried that as well -- makes sense in theory.  jboss-deployment-structure:


<module name="org.hibernate.search.orm" services="export" />
<module name="org.apache.tika" slot="1.6" export="true" />

However, I still hit the same error.  The *only* way I can get it to work is to directly add the Tika module to org.hibernate.search.engine's module.xml.  Think there could be a larger classloading issue?

This is even more worrisome for EAP 6.4, where there is no Tika module.  I'll need to include the jars in our war, and have Search pick those up.

----- Original Message -----
> From: "Sanne Grinovero" <sanne at hibernate.org>
> To: "Brett Meyer" <brmeyer at redhat.com>
> Cc: "Hibernate.org" <hibernate-dev at lists.jboss.org>
> Sent: Monday, June 1, 2015 10:58:44 AM
> Subject: Re: HSearch + Tika bridge using Wildfly modules
> 
> Hi Brett,
> with that configuration, your application is depending on the Tika
> module but since module dependencies are not transitive, and Hibernate
> ORM (and thus Search) depend on your WAR, they don't get access to the
> Tika dependencies.
> 
> I see two options:
>  - you have your deployment-structure declare that you export the Tika module
>  - we patch the hibernate-search-engine module to depend on an
> optional tika module (w/o including it)
> 
> I think we should do both, the first to get you going until our
> improved modules are available, and the second as it's correct to
> state that we optionally benefit from it.
> 
> https://hibernate.atlassian.net/browse/HSEARCH-1883
> Is there some way I could easily fetch your definition of the tika
> modules to include that in our integration tests?
> 
> Thanks,
> Sanne
> 
> On 30 May 2015 at 04:36, Brett Meyer <brmeyer at redhat.com> wrote:
> > Sanne, I might still be missing something.  Artificer's war does not
> > include any Hibernate ORM, Hibernate Search, or Tika jars.  For Wildfly
> > 8.2, the war's jboss-deployment-structure.xml includes:
> >
> > <module name="org.hibernate.search.orm" /> (includes tika-parsers-1.6.jar)
> > <module name="org.apache.tika" slot="1.6"/>
> > (Also using the org.hibernate module, but that's implicitly added by
> > Wildfly.)
> >
> > I understand what you're saying about the ORM classloader, but the above
> > still didn't work.  I'm admittedly a little fuzzy on WF module
> > classloading, but I'm wondering if that's not actually making its way into
> > the ORM classloader, even though my war is the persistence unit.
> >
> > However:
> >
> > What *does* work is adding '<module name="org.apache.tika" slot="1.6"/>'
> > directly in org.hibernate.search.engine's module.xml.
> >
> > Apologies if 1.) I'm missing something and/or 2.) that's expected.  I can
> > certainly tweak org.hibernate.search.engine's module.xml with our
> > installer, but that's obviously less than desirable.  Any idea what we
> > might be missing that would allow us to get that to work from the app
> > itself?
> >
> > Thanks for the help!
> >
> > ----- Original Message -----
> >> From: "Sanne Grinovero" <sanne at hibernate.org>
> >> To: "Brett Meyer" <brmeyer at redhat.com>
> >> Cc: "Hibernate.org" <hibernate-dev at lists.jboss.org>
> >> Sent: Friday, May 29, 2015 11:00:12 AM
> >> Subject: Re: HSearch + Tika bridge using Wildfly modules
> >>
> >> Hi Brett,
> >> we don't include all existing analysers and extensions within the
> >> WildFly modules. In particular the Apache Tika libraries have a huge
> >> amount of dependencies, you should choose the ones you need depending
> >> on what kind of media you intend to parse.
> >>
> >> Include any extension in your "application", we use the Hibernate ORM
> >> classloader to lookup for extensions so these should be discoverable
> >> if they are visible to the same classloader having your entities and
> >> other extensions.
> >>
> >> Sanne
> >>
> >> On 29 May 2015 at 15:28, Brett Meyer <brmeyer at redhat.com> wrote:
> >> > Hey Sanne!  Artificer has '<module name="org.hibernate.search.orm"
> >> > services="export" />' defined in its jboss-deployment-structure
> >> > dependencies.  But, when we try to use it, the following happens.
> >> >
> >> > Caused by: java.lang.ClassNotFoundException:
> >> > org.apache.tika.parser.Parser
> >> > from [Module "org.hibernate.search.engine:main" from local module loader
> >> > @6cf76647 (finder: local module finder @665bf734 (roots:
> >> > /home/brmeyer/IdeaProjects/artificer/installer/target/wildfly-8.2.0.Final/modules,/home/brmeyer/IdeaProjects/artificer/installer/target/wildfly-8.2.0.Final/modules/system/layers/base))]
> >> >
> >> > One of our entities uses the built-in TikaBridge.  I figured the
> >> > search.orm
> >> > module would bring the necessary Tika jars in with it.  Is there
> >> > something
> >> > else we need to add?
> >>
> 


More information about the hibernate-dev mailing list