Error in logging from full text search after platform update to 6.9.5

Hi,

I updated my project from 6.8 to 6.9.5 and now see an error when starting the application (see logs) which I cannot relate to any of the changes/fixes in the release notes.

It is related to the FTS module but I don’t have any clue where to look for the solution. It mentions the tika parser version but I’m not sure what to do with it.

Also, suddenly it states the sqlite-jdbc would be missing - no idea there either.

Application runs as expected - no other problems it seems.

Any help appreciated.

sep 06, 2018 2:39:48 PM org.apache.tika.config.InitializableProblemHandler$3 handleInitializableProblem
WARNING: J2KImageReader not loaded. JPEG2000 files will not be processed.
See https://pdfbox.apache.org/2.0/dependencies.html#jai-image-io
for optional dependencies.

sep 06, 2018 2:39:48 PM org.apache.tika.config.InitializableProblemHandler$3 handleInitializableProblem
WARNING: org.xerials sqlite-jdbc is not loaded.
Please provide the jar on your classpath to parse sqlite files.
See tika-parsers/pom.xml for the correct version.
14:39:49.335 WARN  c.h.fts.core.sys.LuceneIndexerBean - Unsupported file extension: png
14:39:49.684 WARN  c.h.fts.core.sys.LuceneIndexerBean - Unsupported file extension: png
14:39:53.326 WARN  c.h.fts.core.sys.LuceneIndexerBean - Unsupported file extension: png
java.lang.NoSuchMethodException: org.openxmlformats.schemas.wordprocessingml.x2006.main.impl.CTPictureBaseImpl.<init>(org.apache.xmlbeans.SchemaType, boolean)
        at java.lang.Class.getConstructor0(Class.java:3082)
        at java.lang.Class.getDeclaredConstructor(Class.java:2178)
        at org.apache.xmlbeans.impl.schema.SchemaTypeImpl.getJavaImplConstructor2(SchemaTypeImpl.java:1817)
        at org.apache.xmlbeans.impl.schema.SchemaTypeImpl.createUnattachedSubclass(SchemaTypeImpl.java:1961)
        at org.apache.xmlbeans.impl.schema.SchemaTypeImpl.createUnattachedNode(SchemaTypeImpl.java:1950)
        at org.apache.xmlbeans.impl.schema.SchemaTypeImpl.createElementType(SchemaTypeImpl.java:1051)
        at org.apache.xmlbeans.impl.values.XmlObjectBase.create_element_user(XmlObjectBase.java:938)
        at org.apache.xmlbeans.impl.store.Xobj.getUser(Xobj.java:1675)
        at org.apache.xmlbeans.impl.store.Cur.getUser(Cur.java:2659)
        at org.apache.xmlbeans.impl.store.Cur.getObject(Cur.java:2652)
        at org.apache.xmlbeans.impl.store.Cursor._getObject(Cursor.java:995)
        at org.apache.xmlbeans.impl.store.Cursor.getObject(Cursor.java:2904)
        at org.apache.poi.xwpf.usermodel.XWPFDocument.onDocumentRead(XWPFDocument.java:162)
        at org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:169)
        at org.apache.poi.xwpf.usermodel.XWPFDocument.<init>(XWPFDocument.java:112)
        at org.apache.poi.xwpf.extractor.XWPFWordExtractor.<init>(XWPFWordExtractor.java:60)
        at org.apache.poi.extractor.ExtractorFactory.createExtractor(ExtractorFactory.java:243)
        at org.apache.tika.parser.microsoft.ooxml.OOXMLExtractorFactory.parse(OOXMLExtractorFactory.java:114)
        at org.apache.tika.parser.microsoft.ooxml.OOXMLParser.parse(OOXMLParser.java:110)
        at com.haulmont.fts.core.sys.LuceneIndexerBean.appendFileContent(LuceneIndexerBean.java:214)
        at com.haulmont.fts.core.sys.LuceneIndexerBean.createAllFieldContent(LuceneIndexerBean.java:191)
        at com.haulmont.fts.core.sys.LuceneIndexerBean.indexEntity(LuceneIndexerBean.java:123)
        at com.haulmont.fts.core.app.FtsManager.indexFtsQueueItems(FtsManager.java:267)
        at com.haulmont.fts.core.app.FtsManager.processQueue(FtsManager.java:207)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
        at com.sun.proxy.$Proxy287.processQueue(Unknown Source)
        at com.haulmont.fts.core.jmx.FtsManager.processQueue(FtsManager.java:55)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
        at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85)
        at com.haulmont.cuba.core.sys.MBeanInterceptor.aroundInvoke(MBeanInterceptor.java:39)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:629)
        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:618)
        at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
        at com.sun.proxy.$Proxy290.processQueue(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.haulmont.cuba.core.app.scheduling.RunnerBean.executeTask(RunnerBean.java:215)
        at com.haulmont.cuba.core.app.scheduling.RunnerBean.lambda$runTask$0(RunnerBean.java:124)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

After some searching the internet I found that it seems related to the documents used and is a more general error related to version 1.17 of the tika parser: https://jira.apache.org/jira/browse/TIKA-2549

Seems solved in 1.19 and a workaround would be to use the full ooxml-schemas jar: http://poi.apache.org/help/faq.html#faq-N10025

Not yet tried but will do so and give an update.

As instructed here: https://mvnrepository.com/artifact/org.apache.poi/ooxml-schemas/1.3, I had to add this compile line to build.gradle:

...
configure(coreModule) {
    ...
    dependencies {
       ...
        compile group: 'org.apache.poi', name: 'ooxml-schemas', version: '1.3'
    }
    ...
}
...

That basically did it for me and removed the errors.

Warnings are still there:

14:06:18.733 INFO  o.a.p.p.graphics.color.PDDeviceRGB - To get higher rendering speed on JDK8 or later,
14:06:18.734 INFO  o.a.p.p.graphics.color.PDDeviceRGB -   use the option -Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider
14:06:18.737 INFO  o.a.p.p.graphics.color.PDDeviceRGB -   or call System.setProperty("sun.java2d.cmm", "sun.java2d.cmm.kcms.KcmsServiceProvider")
sep 08, 2018 2:06:20 PM org.apache.tika.config.InitializableProblemHandler$3 handleInitializableProblem
WARNING: J2KImageReader not loaded. JPEG2000 files will not be processed.
See https://pdfbox.apache.org/2.0/dependencies.html#jai-image-io
for optional dependencies.

sep 08, 2018 2:06:20 PM org.apache.tika.config.InitializableProblemHandler$3 handleInitializableProblem
WARNING: org.xerial's sqlite-jdbc is not loaded.
Please provide the jar on your classpath to parse sqlite files.
See tika-parsers/pom.xml for the correct version.

...

But as they are warnings and everything seems to work ok, I can live with that.

Hi Berend,

Thank you for reporting the problem. Issue: https://github.com/cuba-platform/fts/issues/36
We’ll fix it in the 6.10 release.