Full Text Indexing: When create/delete or toggle enable/disable guestbook at collection level, tika full indexing error appears in logs.
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 564
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 29
Description
When toggle enable/disable guestbook at collection level, tika full indexing error appears in logs.
With full text indexing enabled, log in as admin, edit guestbooks, toggle enable/disable button next to an existing guestbook or first create one then do that.
Observe the following error in server log:
[2022-04-22T19:42:04.420+0000] [Payara 5.2021.5] [WARNING] [jsf.externalcontext.flash.response.already.committed] [javax.enterprise.resource.webcontainer.jsf.flash] [tid: _ThreadID=98 _ThreadName=http-thread-pool::jk-connector(1)] [timeMillis: 1650656524420] [levelValue: 900] [[
JSF1095: The response was already committed by the time we tried to set the outgoing cookie for the flash. Any values stored to the flash will not be available on the next request.]]
[2022-04-22T19:42:04.560+0000] [Payara 5.2021.5] [WARNING] [] [edu.harvard.iq.dataverse.search.IndexServiceBean] [tid: _ThreadID=247 _ThreadName=__ejb-thread-pool6] [timeMillis: 1650656524560] [levelValue: 900] [[
Full-text indexing for test_stream.jpg failed]]
[2022-04-22T19:42:04.561+0000] [Payara 5.2021.5] [SEVERE] [] [] [tid: _ThreadID=247 _ThreadName=__ejb-thread-pool6] [timeMillis: 1650656524561] [levelValue: 1000] [[
org.apache.tika.exception.ZeroByteFileException: InputStream must have > 0 bytes
at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:163)
at edu.harvard.iq.dataverse.search.IndexServiceBean.addOrUpdateDataset(IndexServiceBean.java:1044)
at edu.harvard.iq.dataverse.search.IndexServiceBean.addOrUpdateDataset(IndexServiceBean.java:727)
at edu.harvard.iq.dataverse.search.IndexServiceBean.indexDataset(IndexServiceBean.java:484)
at edu.harvard.iq.dataverse.search.IndexServiceBean.asyncIndexDatasetList(IndexServiceBean.java:360)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:588)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:408)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4826)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:665)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:834)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:615)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCall(SystemInterceptorProxy.java:163)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:140)
at jdk.internal.reflect.GeneratedMethodAccessor278.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:888)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:833)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:615)
at org.jboss.weld.module.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:81)
at org.jboss.weld.module.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:52)
at jdk.internal.reflect.GeneratedMethodAccessor276.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:888)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:833)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:375)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:4798)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4786)
at com.sun.ejb.containers.EjbAsyncTask.call(EjbAsyncTask.java:101)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
]]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue by toggling an existing guestbook with full-text indexing enabled, then inspect edu.harvard.iq.dataverse.search.IndexServiceBean, especially addOrUpdateDataset at lines 727 and 1044. Trace the test_stream.jpg indexing path and the reported Tika ZeroByteFileException. Done means guestbook create or enable/disable operations no longer produce the full-text indexing error in the server log.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, search
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100