Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-119083

Portal Search integration test: com.liferay.portal.kernel.search.SearchException: java.lang.RuntimeException: com.liferay.portal.kernel.search.SearchException: java.lang.reflect.UndeclaredThrowableException

    Details

      Description

      After the rsync from 7.2.x to 7.1.x, we are getting the following stack trace in many tests:

      com.liferay.portal.kernel.search.SearchException: java.lang.RuntimeException: com.liferay.portal.kernel.search.SearchException: java.lang.reflect.UndeclaredThrowableException
      	at com.liferay.portal.kernel.search.BaseIndexer.search(BaseIndexer.java:659)
      	at com.liferay.portal.search.facet.faceted.searcher.test.BaseFacetedSearcherTestCase.search(BaseFacetedSearcherTestCase.java:143)
      	at com.liferay.portal.search.facet.faceted.searcher.test.AggregationFilteringTest.assertSearch(AggregationFilteringTest.java:332)
      	at com.liferay.portal.search.facet.faceted.searcher.test.AggregationFilteringTest.testSelectNone(AggregationFilteringTest.java:122)
      	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 com.liferay.arquillian.extension.junit.bridge.server.TestExecutorRunnable$2.evaluate(TestExecutorRunnable.java:234)
      	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$1.evaluate(BaseTestRule.java:55)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$1.evaluate(BaseTestRule.java:55)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$1.evaluate(BaseTestRule.java:55)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$1.evaluate(BaseTestRule.java:55)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$1.evaluate(BaseTestRule.java:55)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$1.evaluate(BaseTestRule.java:55)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$1.evaluate(BaseTestRule.java:55)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$1.evaluate(BaseTestRule.java:55)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$1.evaluate(BaseTestRule.java:55)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$1.evaluate(BaseTestRule.java:55)
      	at com.liferay.portal.test.rule.LiferayIntegrationTestRule$1$1.evaluate(LiferayIntegrationTestRule.java:154)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$1.evaluate(BaseTestRule.java:55)
      	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
      	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
      	at com.liferay.arquillian.extension.junit.bridge.server.TestExecutorRunnable$1.evaluate(TestExecutorRunnable.java:143)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$2.evaluate(BaseTestRule.java:72)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$2.evaluate(BaseTestRule.java:72)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$2.evaluate(BaseTestRule.java:72)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$2.evaluate(BaseTestRule.java:72)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$2.evaluate(BaseTestRule.java:72)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$2.evaluate(BaseTestRule.java:72)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$2.evaluate(BaseTestRule.java:72)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$2.evaluate(BaseTestRule.java:72)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$2.evaluate(BaseTestRule.java:72)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$2.evaluate(BaseTestRule.java:72)
      	at com.liferay.portal.test.rule.LiferayIntegrationTestRule$1$1.evaluate(LiferayIntegrationTestRule.java:154)
      	at com.liferay.portal.kernel.test.rule.BaseTestRule$2.evaluate(BaseTestRule.java:72)
      	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
      	at com.liferay.arquillian.extension.junit.bridge.server.TestExecutorRunnable._execute(TestExecutorRunnable.java:181)
      	at com.liferay.arquillian.extension.junit.bridge.server.TestExecutorRunnable.run(TestExecutorRunnable.java:95)
      	at java.base/java.lang.Thread.run(Thread.java:834)
      Caused by: java.lang.RuntimeException: com.liferay.portal.kernel.search.SearchException: java.lang.reflect.UndeclaredThrowableException
      	at com.liferay.portal.search.internal.permission.SearchResultPermissionFilterFactoryImpl._search(SearchResultPermissionFilterFactoryImpl.java:92)
      	at com.liferay.portal.search.internal.permission.SearchResultPermissionFilterFactoryImpl.lambda$create$0(SearchResultPermissionFilterFactoryImpl.java:57)
      	at com.liferay.portal.search.internal.permission.DefaultSearchResultPermissionFilter.getHits(DefaultSearchResultPermissionFilter.java:186)
      	at com.liferay.portal.search.internal.permission.DefaultSearchResultPermissionFilter.search(DefaultSearchResultPermissionFilter.java:98)
      	at com.liferay.portal.kernel.search.BaseIndexer.search(BaseIndexer.java:645)
      	... 41 more
      Caused by: com.liferay.portal.kernel.search.SearchException: java.lang.reflect.UndeclaredThrowableException
      	at com.liferay.portal.search.internal.searcher.FacetedSearcherImpl.doSearch(FacetedSearcherImpl.java:150)
      	at com.liferay.portal.search.internal.permission.SearchResultPermissionFilterFactoryImpl._search(SearchResultPermissionFilterFactoryImpl.java:89)
      	... 45 more
      Caused by: java.lang.reflect.UndeclaredThrowableException
      	at com.sun.proxy.$Proxy235.search(Unknown Source)
      	at com.liferay.portal.search.internal.IndexSearcherHelperImpl.search(IndexSearcherHelperImpl.java:70)
      	at com.liferay.portal.search.internal.searcher.IndexSearcherHelperImpl.search(IndexSearcherHelperImpl.java:42)
      	at com.liferay.portal.search.internal.searcher.FacetedSearcherImpl.doSearch(FacetedSearcherImpl.java:147)
      	... 46 more
      Caused by: java.lang.Exception: java.lang.AssertionError: {level=ERROR, loggerName=com.liferay.portal.search.elasticsearch7.internal.ElasticsearchIndexSearcher, message=java.lang.NullPointerException
      	at com.liferay.portal.kernel.messaging.proxy.ProxyRequest.execute(ProxyRequest.java:91)
      	at com.liferay.portal.kernel.messaging.proxy.ProxyMessageListener.receive(ProxyMessageListener.java:58)
      	at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)
      	at com.liferay.portal.kernel.messaging.SynchronousDestination.send(SynchronousDestination.java:41)
      	at com.liferay.portal.messaging.internal.sender.DirectSynchronousMessageSender.send(DirectSynchronousMessageSender.java:59)
      	at com.liferay.portal.kernel.messaging.proxy.BaseMultiDestinationProxyBean.synchronousSend(BaseMultiDestinationProxyBean.java:72)
      	at com.liferay.portal.messaging.proxy.MultiDestinationMessagingProxyInvocationHandler.invoke(MultiDestinationMessagingProxyInvocationHandler.java:50)
      	... 50 more
      Caused by: java.lang.AssertionError: {level=ERROR, loggerName=com.liferay.portal.search.elasticsearch7.internal.ElasticsearchIndexSearcher, message=java.lang.NullPointerException
      	at com.liferay.portal.test.rule.LogAssertionAppender.append(LogAssertionAppender.java:61)
      	at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
      	at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
      	at org.apache.log4j.Category.callAppenders(Category.java:206)
      	at org.apache.log4j.Category.forcedLog(Category.java:391)
      	at org.apache.log4j.Category.log(Category.java:856)
      	at com.liferay.portal.log.Log4jLogImpl.error(Log4jLogImpl.java:54)
      	at com.liferay.portal.kernel.log.LogWrapper.error(LogWrapper.java:69)
      	at com.liferay.portal.kernel.log.SanitizerLogWrapper.error(SanitizerLogWrapper.java:114)
      	at com.liferay.portal.search.elasticsearch7.internal.ElasticsearchIndexSearcher.search(ElasticsearchIndexSearcher.java:169)
      	at jdk.internal.reflect.GeneratedMethodAccessor1509.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.liferay.portal.kernel.messaging.proxy.ProxyRequest.execute(ProxyRequest.java:82)
      	... 56 more
      Caused by: java.lang.NullPointerException
      	at com.liferay.portal.search.elasticsearch7.internal.search.engine.adapter.search.SearchSearchResponseAssemblerImpl.setCount(SearchSearchResponseAssemblerImpl.java:160)
      	at com.liferay.portal.search.elasticsearch7.internal.search.engine.adapter.search.SearchSearchResponseAssemblerImpl.assemble(SearchSearchResponseAssemblerImpl.java:73)
      	at com.liferay.portal.search.elasticsearch7.internal.search.engine.adapter.search.SearchSearchRequestExecutorImpl.execute(SearchSearchRequestExecutorImpl.java:64)
      	at com.liferay.portal.search.elasticsearch7.internal.search.engine.adapter.search.ElasticsearchSearchRequestExecutor.executeSearchRequest(ElasticsearchSearchRequestExecutor.java:59)
      	at com.liferay.portal.search.engine.adapter.search.SearchSearchRequest.accept(SearchSearchRequest.java:42)
      	at com.liferay.portal.search.engine.adapter.search.SearchSearchRequest.accept(SearchSearchRequest.java:35)
      	at com.liferay.portal.search.elasticsearch7.internal.search.engine.adapter.ElasticsearchSearchEngineAdapterImpl.execute(ElasticsearchSearchEngineAdapterImpl.java:90)
      	at com.liferay.portal.search.elasticsearch7.internal.ElasticsearchIndexSearcher.search(ElasticsearchIndexSearcher.java:131)
      	... 60 more
      

      It sounds related to changes of fields who were primitive types (float, boolean etc.) in 7.1.x, became boxed types (java.lang.Float, java.lang.Boolean etc.) in 7.2.x but then we had to revert back to primitives to avoid version bumping (e.g. c8ba4528)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              adam.brandizzi Adam Brandizzi
              Reporter:
              adam.brandizzi Adam Brandizzi
              Engineering Assignee:
              SE Support
              Recent user:
              Annie Wu (Inactive)
              Participants of an Issue:
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Packages

                  Version Package