org.hibernate.search.exception.SearchException: HSEARCH000196: No service implementations for service 'interface org.hibernate.search.indexes.serialization.spi.SerializationProvider' can be found

Hibernate JIRA | Sanne Grinovero | 2 years ago
  1. 0

    When using clustering features, people will need to add a {{SerializationProvider}} implementation on their classpath. We need to clarify this in the documentation and migration guides. The shown error when an implementation is missing: {noformat}Caused by: org.hibernate.search.exception.SearchException: HSEARCH000196: No service implementations for service 'interface org.hibernate.search.indexes.serialization.spi.SerializationProvider' can be found at org.hibernate.search.engine.service.impl.StandardServiceManager.tryLoadingDefaultService(StandardServiceManager.java:175) at org.hibernate.search.engine.service.impl.StandardServiceManager.createAndCacheWrapper(StandardServiceManager.java:145) at org.hibernate.search.engine.service.impl.StandardServiceManager.requestService(StandardServiceManager.java:77) at org.hibernate.search.indexes.spi.DirectoryBasedIndexManager.getSerializer(DirectoryBasedIndexManager.java:145) at org.hibernate.search.backend.jms.impl.JmsBackendQueueTask.run(JmsBackendQueueTask.java:60) at org.hibernate.search.backend.jms.impl.JmsBackendQueueProcessor.applyWork(JmsBackendQueueProcessor.java:88) at org.hibernate.search.indexes.spi.DirectoryBasedIndexManager.performOperations(DirectoryBasedIndexManager.java:111) at org.hibernate.search.backend.impl.WorkQueuePerIndexSplitter.commitOperations(WorkQueuePerIndexSplitter.java:49) at org.hibernate.search.backend.impl.BatchedQueueingProcessor.performWorks(BatchedQueueingProcessor.java:82) at org.hibernate.search.backend.impl.PostTransactionWorkQueueSynchronization.afterCompletion(PostTransactionWorkQueueSynchronization.java:88) at org.hibernate.search.backend.impl.EventSourceTransactionContext$DelegateToSynchronizationOnAfterTx.doAfterTransactionCompletion(EventSourceTransactionContext.java:192) ... 161 more{noformat} Would be nice to be able to provide some hint about which artifact is needed in the error message.

    Hibernate JIRA | 2 years ago | Sanne Grinovero
    org.hibernate.search.exception.SearchException: HSEARCH000196: No service implementations for service 'interface org.hibernate.search.indexes.serialization.spi.SerializationProvider' can be found
  2. 0

    When using clustering features, people will need to add a {{SerializationProvider}} implementation on their classpath. We need to clarify this in the documentation and migration guides. The shown error when an implementation is missing: {noformat}Caused by: org.hibernate.search.exception.SearchException: HSEARCH000196: No service implementations for service 'interface org.hibernate.search.indexes.serialization.spi.SerializationProvider' can be found at org.hibernate.search.engine.service.impl.StandardServiceManager.tryLoadingDefaultService(StandardServiceManager.java:175) at org.hibernate.search.engine.service.impl.StandardServiceManager.createAndCacheWrapper(StandardServiceManager.java:145) at org.hibernate.search.engine.service.impl.StandardServiceManager.requestService(StandardServiceManager.java:77) at org.hibernate.search.indexes.spi.DirectoryBasedIndexManager.getSerializer(DirectoryBasedIndexManager.java:145) at org.hibernate.search.backend.jms.impl.JmsBackendQueueTask.run(JmsBackendQueueTask.java:60) at org.hibernate.search.backend.jms.impl.JmsBackendQueueProcessor.applyWork(JmsBackendQueueProcessor.java:88) at org.hibernate.search.indexes.spi.DirectoryBasedIndexManager.performOperations(DirectoryBasedIndexManager.java:111) at org.hibernate.search.backend.impl.WorkQueuePerIndexSplitter.commitOperations(WorkQueuePerIndexSplitter.java:49) at org.hibernate.search.backend.impl.BatchedQueueingProcessor.performWorks(BatchedQueueingProcessor.java:82) at org.hibernate.search.backend.impl.PostTransactionWorkQueueSynchronization.afterCompletion(PostTransactionWorkQueueSynchronization.java:88) at org.hibernate.search.backend.impl.EventSourceTransactionContext$DelegateToSynchronizationOnAfterTx.doAfterTransactionCompletion(EventSourceTransactionContext.java:192) ... 161 more{noformat} Would be nice to be able to provide some hint about which artifact is needed in the error message.

    Hibernate JIRA | 2 years ago | Sanne Grinovero
    org.hibernate.search.exception.SearchException: HSEARCH000196: No service implementations for service 'interface org.hibernate.search.indexes.serialization.spi.SerializationProvider' can be found
  3. 0

    The following is the exact error: {code} Result window is too large, from + size must be less than or equal to: [10000] but was [10725]. See the scroll api for a more efficient way to request large data sets. {code} To reproduce the problem, I have an index with 11,228 products and issued a query that returned 10,722 hits. The UI returns pages with a page size of 25 products, and so page 1 returned just fine with the first 25. By selecting the last page, which is page 429, I got this error. Pagination parameters are provided to the FullTextQuery by specifying: {code} query.setFirstResult( ( page - 1 ) * pageSize ).setMaxResults( pageSize ); {code} This results in 10,700 being the value for the first result. Stack Trace: {code} org.hibernate.search.exception.SearchException: HSEARCH400007: Elasticsearch request failed. Request: ======== Operation: Search Data: {"query":{"filtered":{"query":{"bool":{"must":[{"bool":{"must":{"bool":{"should":[{"range":{"id.plantId":{"gte":1.0,"lte":1.0,"boost":1.0}}},{"range":{"id.plantId":{"gte":3.0,"lte":3.0,"boost":1.0}}},{"range":{"id.plantId":{"gte":4.0,"lte":4.0,"boost":1.0}}},{"range":{"id.plantId":{"gte":5.0,"lte":5.0,"boost":1.0}}},{"range":{"id.plantId":{"gte":6.0,"lte":6.0,"boost":1.0}}},{"range":{"id.plantId":{"gte":7.0,"lte":7.0,"boost":1.0}}},{"range":{"id.plantId":{"gte":10.0,"lte":10.0,"boost":1.0}}},{"range":{"id.plantId":{"gte":8.0,"lte":8.0,"boost":1.0}}},{"range":{"id.plantId":{"gte":9.0,"lte":9.0,"boost":1.0}}}]}}}},{"bool":{"must":{"bool":{"should":[{"wildcard":{"customerItemNumber":{"value":"*0*","boost":1.0}}},{"wildcard":{"customerItemNumberScrubbed":{"value":"*0*","boost":1.0}}}]}}}},{"term":{"serviceFlag":{"value":"false","boost":1.0}}}]}},"filter":{"type":{"value":"com.setech.mrovelocityhub.inventory.domain.Item"}}}},"sort":[{"_score":{"order":"desc"}}]} Response: ========= Status: 500 Error message: {"root_cause":[{"type":"query_phase_execution_exception","reason":"Result window is too large, from + size must be less than or equal to: [10000] but was [10725]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level parameter."}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"com.setech.mrovelocityhub.inventory.domain.item","node":"TK1fAfSZSxyqX0rwgGKLhw","reason":{"type":"query_phase_execution_exception","reason":"Result window is too large, from + size must be less than or equal to: [10000] but was [10725]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level parameter."}}]} at org.hibernate.search.backend.elasticsearch.client.impl.JestClient.executeRequest(JestClient.java:89) at org.hibernate.search.backend.elasticsearch.client.impl.JestClient.executeRequest(JestClient.java:80) at org.hibernate.search.backend.elasticsearch.impl.ElasticsearchHSQueryImpl$IndexSearcher.runSearch(ElasticsearchHSQueryImpl.java:488) at org.hibernate.search.backend.elasticsearch.impl.ElasticsearchHSQueryImpl.execute(ElasticsearchHSQueryImpl.java:257) at org.hibernate.search.backend.elasticsearch.impl.ElasticsearchHSQueryImpl.queryResultSize(ElasticsearchHSQueryImpl.java:145) at org.hibernate.search.query.hibernate.impl.FullTextQueryImpl.getResultSize(FullTextQueryImpl.java:223) at org.hibernate.search.jpa.impl.FullTextQueryImpl.getResultSize(FullTextQueryImpl.java:98) at com.setech.mrovelocityhub.inventory.dao.internal.ItemSearchJpaRepository.find(ItemSearchJpaRepository.java:134) at com.setech.mrovelocityhub.inventory.internal.ItemSearchServiceImpl.search(ItemSearchServiceImpl.java:171) at com.setech.mrovelocityhub.inventory.internal.ItemSearchServiceImpl.search(ItemSearchServiceImpl.java:1) at sun.reflect.GeneratedMethodAccessor600.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.__invoke(DelegatingMethodAccessorImpl.java:43) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java) at java.lang.reflect.Method.invoke(Method.java:497) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:68) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208) at com.sun.proxy.$Proxy176.search(Unknown Source) at com.setech.mrovelocityhub.core.web.search.actions.SearchAction.getSearchResults(SearchAction.java:354) at com.setech.mrovelocityhub.core.web.search.actions.SearchAction.search(SearchAction.java:157) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.__invoke(DelegatingMethodAccessorImpl.java:43) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java) at java.lang.reflect.Method.invoke(Method.java:497) at ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:891) at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1293) at ognl.ObjectMethodAccessor.callMethod(ObjectMethodAccessor.java:68) at com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethodWithDebugInfo(XWorkMethodAccessor.java:117) at com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethod(XWorkMethodAccessor.java:108) at ognl.OgnlRuntime.callMethod(OgnlRuntime.java:1369) at ognl.ASTMethod.getValueBody(ASTMethod.java:90) at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212) at ognl.SimpleNode.getValue(SimpleNode.java:258) at ognl.Ognl.getValue(Ognl.java:494) at ognl.Ognl.getValue(Ognl.java:458) at com.opensymphony.xwork2.ognl.OgnlUtil$2.execute(OgnlUtil.java:309) at com.opensymphony.xwork2.ognl.OgnlUtil.compileAndExecute(OgnlUtil.java:340) at com.opensymphony.xwork2.ognl.OgnlUtil.getValue(OgnlUtil.java:307) at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:423) at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:287) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:250) at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:167) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244) at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265) at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:76) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244) at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:229) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:229) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244) at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:191) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244) at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:253) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244) at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244) at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:229) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244) at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:73) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244) at org.apache.struts2.interceptor.DateTextFieldInterceptor.intercept(DateTextFieldInterceptor.java:125) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244) at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:91) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244) at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:139) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244) at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:193) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244) at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:189) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244) at com.setech.struts2.interceptors.ConversationInterceptor.intercept(ConversationInterceptor.java:147) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244) at com.setech.mrovelocityhub.core.web.struts.interceptor.MenuInterceptor.doInterceptInternal(MenuInterceptor.java:67) at com.setech.mrovelocityhub.core.web.struts.interceptor.AbstractAuthenticatedInterceptor.intercept(AbstractAuthenticatedInterceptor.java:35) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244) at com.setech.mrovelocityhub.core.web.struts.interceptor.UnreadNotificationsInterceptor.doInterceptInternal(UnreadNotificationsInterceptor.java:73) at com.setech.mrovelocityhub.core.web.struts.interceptor.AbstractAuthenticatedInterceptor.intercept(AbstractAuthenticatedInterceptor.java:35) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244) at com.setech.mrovelocityhub.core.web.struts.interceptor.SiteOptionsOverrideInterceptor.intercept(SiteOptionsOverrideInterceptor.java:69) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244) at com.setech.mrovelocityhub.core.web.struts.interceptor.UserAgentCompatibleInterceptor.intercept(UserAgentCompatibleInterceptor.java:41) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244) at com.setech.mrovelocityhub.core.web.struts.interceptor.AjaxRequestAwareInterceptor.intercept(AjaxRequestAwareInterceptor.java:36) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244) at com.setech.mrovelocityhub.core.web.struts.interceptor.LocaleContextHolderInterceptor.intercept(LocaleContextHolderInterceptor.java:42) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244) at com.setech.mrovelocityhub.core.web.struts.interceptor.UserContextHolderInterceptor.intercept(UserContextHolderInterceptor.java:46) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244) at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:139) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244) at com.setech.mrovelocityhub.core.web.struts.interceptor.UserAgentTrackingInterceptor.intercept(UserAgentTrackingInterceptor.java:59) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244) at com.setech.mrovelocityhub.core.web.struts.interceptor.TypeConverterAwareInterceptor.intercept(TypeConverterAwareInterceptor.java:49) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244) at com.setech.mrovelocityhub.core.web.struts.interceptor.RequestLoggingInterceptor.intercept(RequestLoggingInterceptor.java:55) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244) at com.setech.mrovelocityhub.core.web.struts.interceptor.TimerInterceptor.intercept(TimerInterceptor.java:46) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244) at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564) at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:81) at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:316) at com.setech.mrovelocityhub.core.web.security.filter.PasswordChangeRequiredFilter.doFilterInternal(PasswordChangeRequiredFilter.java:78) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:122) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:169) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:48) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:158) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) at org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:133) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:205) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:120) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:91) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:53) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:213) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:176) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:121) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) at org.apache.catalina.core.StandardContextValve.__invoke(StandardContextValve.java:106) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.__invoke(StandardHostValve.java:141) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2500) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2489) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) {code} If I eliminate the call to {{getResultSize()}} and execute the {{getResultList()}} first, I get the same error.

    Hibernate JIRA | 9 months ago | Chris Cranford
    org.hibernate.search.exception.SearchException: HSEARCH400007: Elasticsearch request failed. Request: ======== Operation: Search Data: {"query":{"filtered":{"query":{"bool":{"must":[{"bool":{"must":{"bool":{"should":[{"range":{"id.plantId":{"gte":1.0,"lte":1.0,"boost":1.0}}},{"range":{"id.plantId":{"gte":3.0,"lte":3.0,"boost":1.0}}},{"range":{"id.plantId":{"gte":4.0,"lte":4.0,"boost":1.0}}},{"range":{"id.plantId":{"gte":5.0,"lte":5.0,"boost":1.0}}},{"range":{"id.plantId":{"gte":6.0,"lte":6.0,"boost":1.0}}},{"range":{"id.plantId":{"gte":7.0,"lte":7.0,"boost":1.0}}},{"range":{"id.plantId":{"gte":10.0,"lte":10.0,"boost":1.0}}},{"range":{"id.plantId":{"gte":8.0,"lte":8.0,"boost":1.0}}},{"range":{"id.plantId":{"gte":9.0,"lte":9.0,"boost":1.0}}}]}}}},{"bool":{"must":{"bool":{"should":[{"wildcard":{"customerItemNumber":{"value":"*0*","boost":1.0}}},{"wildcard":{"customerItemNumberScrubbed":{"value":"*0*","boost":1.0}}}]}}}},{"term":{"serviceFlag":{"value":"false","boost":1.0}}}]}},"filter":{"type":{"value":"com.setech.mrovelocityhub.inventory.domain.Item"}}}},"sort":[{"_score":{"order":"desc"}}]} Response: ========= Status: 500 Error message: {"root_cause":[{"type":"query_phase_execution_exception","reason":"Result window is too large, from + size must be less than or equal to: [10000] but was [10725]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level parameter."}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"com.setech.mrovelocityhub.inventory.domain.item","node":"TK1fAfSZSxyqX0rwgGKLhw","reason":{"type":"query_phase_execution_exception","reason":"Result window is too large, from + size must be less than or equal to: [10000] but was [10725]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level parameter."}}]}
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 46#255618681

    GitHub | 1 month ago | lhanson
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class fr.openwide.maven.artifact.notifier.core.config.spring.MavenArtifactNotifierCoreCommonJpaConfig: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory
  6. 0

    Hi, From what I heard, from Hibernate Search 5 on, adding a @SortableField annotation is required to perform any kind of sort on a field. This seems to apply to id fields too, since I get warnings in the logs if I don't. Unfortunately, putting an @SortableField on an @Id/@DocumentId will make Hibernate Search initialization explode when an entity (say Level2) is referenced from another (say Level1) as an @IndexedEmbedded: when parsing annotations for Level1, the engine will find the @SortableField on the id field of Level2, but will not find the id field on Level2 ( ?). And crash, with this kind of error : {noformat} org.hibernate.search.exception.SearchException: HSEARCH000299: @SortableField declared on org.hibernate.search.test.embedded.sortablefield.Level2SortableId#id references to undeclared field 'level2Child.id' at org.hibernate.search.engine.metadata.impl.AnnotationMetadataProvider.bindSortableFieldAnnotation(AnnotationMetadataProvider.java:810) at org.hibernate.search.engine.metadata.impl.AnnotationMetadataProvider.checkForSortableField(AnnotationMetadataProvider.java:1353) at org.hibernate.search.engine.metadata.impl.AnnotationMetadataProvider.initializeMemberLevelAnnotations(AnnotationMetadataProvider.java:853) at org.hibernate.search.engine.metadata.impl.AnnotationMetadataProvider.initializeClass(AnnotationMetadataProvider.java:469) at org.hibernate.search.engine.metadata.impl.AnnotationMetadataProvider.checkForIndexedEmbedded(AnnotationMetadataProvider.java:1584) at org.hibernate.search.engine.metadata.impl.AnnotationMetadataProvider.initializeMemberLevelAnnotations(AnnotationMetadataProvider.java:857) at org.hibernate.search.engine.metadata.impl.AnnotationMetadataProvider.initializeClass(AnnotationMetadataProvider.java:469) at org.hibernate.search.engine.metadata.impl.AnnotationMetadataProvider.getTypeMetadataFor(AnnotationMetadataProvider.java:130) at org.hibernate.search.spi.SearchIntegratorBuilder.initDocumentBuilders(SearchIntegratorBuilder.java:373) at org.hibernate.search.spi.SearchIntegratorBuilder.buildNewSearchFactory(SearchIntegratorBuilder.java:199) at org.hibernate.search.spi.SearchIntegratorBuilder.buildSearchIntegrator(SearchIntegratorBuilder.java:117) at org.hibernate.search.hcore.impl.HibernateSearchSessionFactoryObserver.sessionFactoryCreated(HibernateSearchSessionFactoryObserver.java:75) at org.hibernate.internal.SessionFactoryObserverChain.sessionFactoryCreated(SessionFactoryObserverChain.java:35) at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:541) at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:444) at org.hibernate.search.test.DefaultTestResourceManager.buildSessionFactory(DefaultTestResourceManager.java:108) at org.hibernate.search.test.DefaultTestResourceManager.openSessionFactory(DefaultTestResourceManager.java:76) at org.hibernate.search.test.SearchTestBase.setUp(SearchTestBase.java:42) 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:497) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.hibernate.testing.junit4.FailureExpectedHandler.evaluate(FailureExpectedHandler.java:41) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.hibernate.testing.junit4.BeforeClassCallbackHandler.evaluate(BeforeClassCallbackHandler.java:26) at org.hibernate.testing.junit4.AfterClassCallbackHandler.evaluate(AfterClassCallbackHandler.java:25) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192) {noformat} Adding an @Field annotation on Level2.id will not solve the issue, since it will crash another way (seems forbidden to add a field named exactly like the @Id field). {noformat} org.hibernate.search.exception.SearchException: HSEARCH000247: An indexed field defined on 'org.hibernate.search.test.embedded.sortablefield.Level2SortableId:id' tries to override the id field settings. The document id field settings cannot be modified. Use a different field name. at org.hibernate.search.engine.metadata.impl.TypeMetadata$Builder.addProperty(TypeMetadata.java:469) at org.hibernate.search.engine.metadata.impl.AnnotationMetadataProvider.initializeMemberLevelAnnotations(AnnotationMetadataProvider.java:872) at org.hibernate.search.engine.metadata.impl.AnnotationMetadataProvider.initializeClass(AnnotationMetadataProvider.java:469) at org.hibernate.search.engine.metadata.impl.AnnotationMetadataProvider.getTypeMetadataFor(AnnotationMetadataProvider.java:130) at org.hibernate.search.spi.SearchIntegratorBuilder.initDocumentBuilders(SearchIntegratorBuilder.java:373) at org.hibernate.search.spi.SearchIntegratorBuilder.buildNewSearchFactory(SearchIntegratorBuilder.java:199) at org.hibernate.search.spi.SearchIntegratorBuilder.buildSearchIntegrator(SearchIntegratorBuilder.java:117) at org.hibernate.search.hcore.impl.HibernateSearchSessionFactoryObserver.sessionFactoryCreated(HibernateSearchSessionFactoryObserver.java:75) at org.hibernate.internal.SessionFactoryObserverChain.sessionFactoryCreated(SessionFactoryObserverChain.java:35) at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:541) at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:444) at org.hibernate.search.test.DefaultTestResourceManager.buildSessionFactory(DefaultTestResourceManager.java:108) at org.hibernate.search.test.DefaultTestResourceManager.openSessionFactory(DefaultTestResourceManager.java:76) at org.hibernate.search.test.SearchTestBase.setUp(SearchTestBase.java:42) 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:497) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.hibernate.testing.junit4.FailureExpectedHandler.evaluate(FailureExpectedHandler.java:41) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.hibernate.testing.junit4.BeforeClassCallbackHandler.evaluate(BeforeClassCallbackHandler.java:26) at org.hibernate.testing.junit4.AfterClassCallbackHandler.evaluate(AfterClassCallbackHandler.java:25) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192) {noformat} Note that : * this is tied to indexing entities: when there is no @Id annotation on the "id" attribute, I can freely define an @Field on the "id" attribute, and everything works fine. * this will happen regardless of whether the id field is part of the @IndexedEmbedded or not. I see two workarounds at the moment: * refraining from adding the @SortField annotation (this works, after all) * defining a separate @Field (named "idSort", for instance) just for sorting

    Hibernate JIRA | 12 months ago | Yoann Rodière
    org.hibernate.search.exception.SearchException: HSEARCH000247: An indexed field defined on 'org.hibernate.search.test.embedded.sortablefield.Level2SortableId:id' tries to override the id field settings. The document id field settings cannot be modified. Use a different field name.

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.hibernate.search.exception.SearchException

      HSEARCH000196: No service implementations for service 'interface org.hibernate.search.indexes.serialization.spi.SerializationProvider' can be found

      at org.hibernate.search.engine.service.impl.StandardServiceManager.tryLoadingDefaultService()
    2. org.hibernate.search
      StandardServiceManager.requestService
      1. org.hibernate.search.engine.service.impl.StandardServiceManager.tryLoadingDefaultService(StandardServiceManager.java:175)
      2. org.hibernate.search.engine.service.impl.StandardServiceManager.createAndCacheWrapper(StandardServiceManager.java:145)
      3. org.hibernate.search.engine.service.impl.StandardServiceManager.requestService(StandardServiceManager.java:77)
      3 frames
    3. Hibernate Search Engine
      DirectoryBasedIndexManager.getSerializer
      1. org.hibernate.search.indexes.spi.DirectoryBasedIndexManager.getSerializer(DirectoryBasedIndexManager.java:145)
      1 frame
    4. org.hibernate.search
      JmsBackendQueueProcessor.applyWork
      1. org.hibernate.search.backend.jms.impl.JmsBackendQueueTask.run(JmsBackendQueueTask.java:60)
      2. org.hibernate.search.backend.jms.impl.JmsBackendQueueProcessor.applyWork(JmsBackendQueueProcessor.java:88)
      2 frames
    5. Hibernate Search Engine
      EventSourceTransactionContext$DelegateToSynchronizationOnAfterTx.doAfterTransactionCompletion
      1. org.hibernate.search.indexes.spi.DirectoryBasedIndexManager.performOperations(DirectoryBasedIndexManager.java:111)
      2. org.hibernate.search.backend.impl.WorkQueuePerIndexSplitter.commitOperations(WorkQueuePerIndexSplitter.java:49)
      3. org.hibernate.search.backend.impl.BatchedQueueingProcessor.performWorks(BatchedQueueingProcessor.java:82)
      4. org.hibernate.search.backend.impl.PostTransactionWorkQueueSynchronization.afterCompletion(PostTransactionWorkQueueSynchronization.java:88)
      5. org.hibernate.search.backend.impl.EventSourceTransactionContext$DelegateToSynchronizationOnAfterTx.doAfterTransactionCompletion(EventSourceTransactionContext.java:192)
      5 frames