Hi Juan Pablo,

I'll possibly be able to look into this early this work week, but my
suspicion is that Lucene itself is having trouble being instantiated.
As we already have Lucene in the mix, you'll have to be sure that
both Lucene engines are the same version and that you can actually
create both an Indexer and a Finder. I'd suggest creating a unit
test that does that, then tries to create both JSPWiki's normal
search provider, then in the same test try creating the Tika version.
If that works generally you'd be good to go.

Hope that helps.

Cheers,

Murray

On 5/05/19 10:14 AM, Juan Pablo Santos Rodríguez wrote:
Hi,

latest commits on master brought a TikaSearchProvider, contributed by Ulf
Dittmer (JSPWIKI-469). I've added some tests to it, but somehow I'm not
getting them passing at builds.apache.org. Given that I've been able to
deploy a snapshot from my local pc, with those tests successfully running,
I'm a bit blind on what is happening at builds.a.o. At first I thought
there were some concurrency issues which prevented the test from running at
builds.a.o, but right now the offending test really unit tests, and doesn't
rely on background threads finishing indexing attachment on time.

More specifically, current build failure yields:

[ERROR] testGetAttachmentContent  Time elapsed: 5.163 s  <<< ERROR!
java.lang.NullPointerException
        at 
org.apache.wiki.search.tika.TikaSearchProviderTest.testGetAttachmentContent(TikaSearchProviderTest.java:58)

with line 58 on TikaSearchProviderTest being:
String pdfIndexed = tsp.getAttachmentContent( attPdf );

So tsp is the only thing there capable of throwing a NPE. However, tsp is
obtained as:
TikaSearchProvider tsp = ( TikaSearchProvider
)engine.getSearchManager().getSearchEngine();

and the execution log shows that tsp can't be null:

2019-05-04 20:59:01,355 [main] DEBUG
org.apache.wiki.search.SearchManager  - Loaded search provider
org.apache.wiki.search.tika.TikaSearchProvider@7a63c618

so, what I'm missing? can anyone reproduce that NPE?? I could change the
test so tsp gets instantiated and set up manually but that seems
cumbersome, and shouldn't be needed


thx in advance,
juan pablo


--

...........................................................................
Murray Altheim <murray18 at altheim dot com>                       = =  ===
http://www.altheim.com/murray/                                     ===  ===
                                                                   = =  ===
    In the evening
    The rice leaves in the garden
    Rustle in the autumn wind
    That blows through my reed hut.
           -- Minamoto no Tsunenobu

Reply via email to