peerkar / liferay-gsearch

Google like search for Liferay 7 CE and DXP
Other
56 stars 36 forks source link

Adapted the code to run inside Liferay DXP 7.1.0 GA1 - Error with resource #8

Closed abu-zamzan closed 6 years ago

abu-zamzan commented 6 years ago

Greetings!

I was able to port the 4 main modules so that it runs inside of the latest Liferay 7.1.

However I get this error message concerning the resource bündle for i18n.

2018-08-02 15:25:14.101 INFO  [Declarative Service Unsatisfied Component Scanner][UnsatisfiedComponentScanner:88] All declarative service components are satisfied
2018-08-02 15:25:15.167 ERROR [http-nio-8080-exec-131][ViewMVCRenderCommand:95] java.util.MissingResourceException: Can't find bundle for base name content.Language, locale en_US
java.util.MissingResourceException: Can't find bundle for base name content.Language, locale en_US
    at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1573)
    at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1396)
    at java.util.ResourceBundle.getBundle(ResourceBundle.java:1308)
    at com.liferay.portal.kernel.util.ResourceBundleUtil.getBundle(ResourceBundleUtil.java:77)
    at com.liferay.portal.kernel.util.ResourceBundleUtil.getBundle(ResourceBundleUtil.java:71)
    at fi.soveltia.liferay.gsearch.core.impl.configuration.ConfigurationHelperImpl.getLocalization(ConfigurationHelperImpl.java:113)
    at fi.soveltia.liferay.gsearch.core.impl.configuration.ConfigurationHelperImpl.getAssetTypeOptions(ConfigurationHelperImpl.java:59)
    at fi.soveltia.liferay.gsearch.web.portlet.action.ViewMVCRenderCommand.render(ViewMVCRenderCommand.java:90)
    at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.render(MVCPortlet.java:287)
    at com.liferay.portal.portlet.bridge.soy.internal.SoyPortlet.render(SoyPortlet.java:162)
    at com.liferay.portlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:127)
    at com.liferay.portlet.ScriptDataPortletFilter.doFilter(ScriptDataPortletFilter.java:58)
    at com.liferay.portlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:124)
    at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:71)
    at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:108)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
    at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:153)
    at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:62)
    at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:118)
    at org.eclipse.equinox.http.servlet.internal.servlet.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:48)
    at com.liferay.portlet.internal.InvokerPortletImpl.invoke(InvokerPortletImpl.java:606)
    at com.liferay.portlet.internal.InvokerPortletImpl.invokeRender(InvokerPortletImpl.java:702)
    at com.liferay.portlet.internal.InvokerPortletImpl.render(InvokerPortletImpl.java:399)
    at com.liferay.portal.monitoring.internal.portlet.MonitoringInvokerPortlet.lambda$render$0(MonitoringInvokerPortlet.java:272)
    at com.liferay.portal.monitoring.internal.portlet.MonitoringInvokerPortlet._render(MonitoringInvokerPortlet.java:375)
    at com.liferay.portal.monitoring.internal.portlet.MonitoringInvokerPortlet.render(MonitoringInvokerPortlet.java:270)
    at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_005fportlet_jsp.java:1591)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
    at com.liferay.portal.servlet.DirectRequestDispatcher.include(DirectRequestDispatcher.java:64)
    at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:78)
    at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53)
    at com.liferay.portal.servlet.TransferHeadersHelperImpl$TransferHeadersRequestDispatcher.include(TransferHeadersHelperImpl.java:162)
    at com.liferay.portlet.internal.PortletContainerImpl._render(PortletContainerImpl.java:839)
    at com.liferay.portlet.internal.PortletContainerImpl.lambda$render$2(PortletContainerImpl.java:212)
    at com.liferay.portlet.internal.PortletContainerImpl._preserveGroupIds(PortletContainerImpl.java:390)
    at com.liferay.portlet.internal.PortletContainerImpl.render(PortletContainerImpl.java:201)
    at com.liferay.portlet.SecurityPortletContainerWrapper.render(SecurityPortletContainerWrapper.java:144)
    at com.liferay.portlet.RestrictPortletContainerWrapper.lambda$render$0(RestrictPortletContainerWrapper.java:126)
    at com.liferay.portlet.RestrictPortletContainerWrapper._render(RestrictPortletContainerWrapper.java:183)
    at com.liferay.portlet.RestrictPortletContainerWrapper.render(RestrictPortletContainerWrapper.java:124)
    at com.liferay.portal.kernel.portlet.PortletContainerUtil.render(PortletContainerUtil.java:173)
    at com.liferay.portal.layoutconfiguration.util.PortletRenderer._render(PortletRenderer.java:190)
    at com.liferay.portal.layoutconfiguration.util.PortletRenderer.render(PortletRenderer.java:84)
    at com.liferay.portal.layoutconfiguration.util.RuntimePageImpl.doProcessTemplate(RuntimePageImpl.java:495)
    at com.liferay.portal.layoutconfiguration.util.RuntimePageImpl.doDispatch(RuntimePageImpl.java:331)
    at com.liferay.portal.layoutconfiguration.util.RuntimePageImpl.processTemplate(RuntimePageImpl.java:146)
    at com.liferay.portal.layoutconfiguration.util.RuntimePageImpl.processTemplate(RuntimePageImpl.java:167)
    at com.liferay.portal.kernel.layoutconfiguration.util.RuntimePageUtil.processTemplate(RuntimePageUtil.java:88)
    at org.apache.jsp.html.portal.layout.view.portlet_jsp._jspService(portlet_jsp.java:783)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
    at com.liferay.portal.servlet.DirectRequestDispatcher.include(DirectRequestDispatcher.java:64)
    at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:78)
    at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53)
    at com.liferay.portal.servlet.TransferHeadersHelperImpl$TransferHeadersRequestDispatcher.include(TransferHeadersHelperImpl.java:162)
    at com.liferay.portal.model.impl.LayoutTypeControllerImpl.includeLayoutContent(LayoutTypeControllerImpl.java:171)
    at com.liferay.portal.model.impl.LayoutImpl.includeLayoutContent(LayoutImpl.java:908)
    at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:406)
    at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:173)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
    at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:172)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
    at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:605)
    at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:582)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:119)
    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
    at com.liferay.portal.servlet.filters.secure.BaseAuthFilter.processFilter(BaseAuthFilter.java:340)
    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
    at com.liferay.portal.monitoring.internal.servlet.filter.MonitoringFilter.processFilter(MonitoringFilter.java:181)
    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:100)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:712)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:459)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:384)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
    at com.liferay.friendly.url.internal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:355)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
    at com.liferay.portal.servlet.ServletAdapter.service(ServletAdapter.java:98)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:119)
    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
    at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:343)
    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
    at com.liferay.portal.servlet.filters.i18n.I18nFilter.processFilter(I18nFilter.java:362)
    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
    at com.liferay.portal.servlet.filters.secure.BaseAuthFilter.processFilter(BaseAuthFilter.java:340)
    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
    at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:261)
    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
    at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:88)
    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
    at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:263)
    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
    at com.liferay.portal.monitoring.internal.servlet.filter.MonitoringFilter.processFilter(MonitoringFilter.java:181)
    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
    at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
    at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
    at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
    at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:389)
    at com.liferay.portal.servlet.filters.urlrewrite.UrlRewriteFilter.processFilter(UrlRewriteFilter.java:65)
    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:168)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:168)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:100)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:494)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:651)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:407)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:754)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1376)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:748)

This seems to happen inside of gsearch-query-impl -> ConfigurationHelperImpl.java -> at https://github.com/peerkar/liferay-gsearch/blob/master/gsearch-core-impl/src/main/java/fi/soveltia/liferay/gsearch/core/impl/configuration/ConfigurationHelperImpl.java#L125

which is triggered in the Stack by -> https://github.com/peerkar/liferay-gsearch/blob/master/gsearch-web/src/main/java/fi/soveltia/liferay/gsearch/web/portlet/action/ViewMVCRenderCommand.java#L98

abu-zamzan commented 6 years ago

Ok I was able to resolve the issue by copying the i18n folder content/Language* with all files inside of the gsearch-query-impl project within src/main/java/resources folder and it seems that it recognize the right files within the right class path.

This is weird

abu-zamzan commented 6 years ago

But now I still have another problem there is a double rendering problem inside of Liferay DXP 7.1.10. It seems that the render function is called twice when I do a debug :

image

peerkar commented 6 years ago

Hi,

Please see my comment in https://github.com/peerkar/liferay-gsearch/issues/7.

The upgrade for 7.1 is on its way.