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
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.
Is there some way I could easily fetch your definition of the tika
modules to include that in our integration tests?
On 30 May 2015 at 04:36, Brett Meyer <brmeyer(a)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
<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.
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(a)hibernate.org>
> To: "Brett Meyer" <brmeyer(a)redhat.com>
> Cc: "Hibernate.org" <hibernate-dev(a)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.
> On 29 May 2015 at 15:28, Brett Meyer <brmeyer(a)redhat.com> wrote:
> > Hey Sanne! Artificer has '<module
> > services="export" />' defined in its
> > 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
> > @6cf76647 (finder: local module finder @665bf734 (roots:
> > 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?