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

"Could not connect to the database" message when testing Data Base Connection

    Details

    • Fix Priority:
      4

      Description

      Description:
      Despite using the correct data base configuration, the "Could not connect to the database" message is shown when testing Data Base Connection.

      Steps to Reproduce:

      1. Go to Configuration > Reports Admin > Sources
      2. Click on "+" button
      3. Fill in the form with the data from the "portal-setup-wizard.properties" file
      4. Click on Test Data Base Connection

      Expected Result:
      The system should show the message "You have successfully connected to the database.".

      Actual Result:
      The system is showing the message "Could not connect to the database. Please verify that the settings are correct.".

      Verified on master DXP: c99690fd78f7cc0ddf1bdcf3d02c9872e81d5bde

      Stacktrace:

      Cannot load JDBC driver class 'com.mysql.cj.jdbc.Driver'
           [exec] java.lang.ClassNotFoundException: com.mysql.cj.jdbc.Driver
           [exec] 	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
           [exec] 	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
           [exec] 	at com.liferay.portal.osgi.web.servlet.jsp.compiler.internal.JspBundleClassloader.loadClass(JspBundleClassloader.java:114)
           [exec] 	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
           [exec] 	at org.apache.commons.dbcp2.BasicDataSource.createConnectionFactory(BasicDataSource.java:1992)
           [exec] 	at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:1897)
           [exec] 	at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1413)
           [exec] 	at com.liferay.portal.reports.engine.console.util.ReportsEngineConsoleUtil.validateJDBCConnection(ReportsEngineConsoleUtil.java:134)
           [exec] 	at org.apache.jsp.admin.data_005fsource.test_005fdatabase_005fconnection_jsp._jspService(test_005fdatabase_005fconnection_jsp.java:289)
           [exec] 	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
           [exec] 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
           [exec] 	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
           [exec] 	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
           [exec] 	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
           [exec] 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
           [exec] 	at com.liferay.portal.osgi.web.servlet.jsp.compiler.internal.JspServlet.service(JspServlet.java:370)
           [exec] 	at com.liferay.portal.osgi.web.servlet.jsp.compiler.internal.JspServlet.service(JspServlet.java:382)
           [exec] 	at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:153)
           [exec] 	at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:62)
           [exec] 	at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:120)
           [exec] 	at org.eclipse.equinox.http.servlet.internal.servlet.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:48)
           [exec] 	at com.liferay.portlet.internal.PortletRequestDispatcherImpl.dispatch(PortletRequestDispatcherImpl.java:291)
           [exec] 	at com.liferay.portlet.internal.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:123)
           [exec] 	at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.include(MVCPortlet.java:571)
           [exec] 	at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.include(MVCPortlet.java:587)
           [exec] 	at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.doDispatch(MVCPortlet.java:461)
           [exec] 	at javax.portlet.GenericPortlet.render(GenericPortlet.java:291)
           [exec] 	at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.render(MVCPortlet.java:303)
           [exec] 	at com.liferay.portal.reports.engine.console.web.internal.admin.portlet.AdminPortlet.render(AdminPortlet.java:115)
           [exec] 	at com.liferay.portlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:127)
           [exec] 	at com.liferay.portlet.ScriptDataPortletFilter.doFilter(ScriptDataPortletFilter.java:58)
           [exec] 	at com.liferay.portlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:124)
           [exec] 	at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:71)
           [exec] 	at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:115)
           [exec] 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
           [exec] 	at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:153)
           [exec] 	at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:62)
           [exec] 	at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:120)
           [exec] 	at org.eclipse.equinox.http.servlet.internal.servlet.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:48)
           [exec] 	at com.liferay.portlet.internal.InvokerPortletImpl.invoke(InvokerPortletImpl.java:569)
           [exec] 	at com.liferay.portlet.internal.InvokerPortletImpl.invokeRender(InvokerPortletImpl.java:659)
           [exec] 	at com.liferay.portlet.internal.InvokerPortletImpl.render(InvokerPortletImpl.java:344)
           [exec] 	at com.liferay.portal.monitoring.internal.portlet.MonitoringInvokerPortlet.lambda$render$0(MonitoringInvokerPortlet.java:259)
           [exec] 	at com.liferay.portal.monitoring.internal.portlet.MonitoringInvokerPortlet._render(MonitoringInvokerPortlet.java:363)
           [exec] 	at com.liferay.portal.monitoring.internal.portlet.MonitoringInvokerPortlet.render(MonitoringInvokerPortlet.java:257)
           [exec] 	at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_005fportlet_jsp.java:1432)
           [exec] 	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:71)
           [exec] 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
           [exec] 	at com.liferay.portal.servlet.DirectRequestDispatcher.include(DirectRequestDispatcher.java:64)
           [exec] 	at com.liferay.portal.servlet.DirectRequestDispatcherFactoryImpl$IndirectRequestDispatcher.include(DirectRequestDispatcherFactoryImpl.java:190)
           [exec] 	at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:79)
           [exec] 	at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53)
           [exec] 	at com.liferay.portal.servlet.TransferHeadersHelperImpl$TransferHeadersRequestDispatcher.include(TransferHeadersHelperImpl.java:162)
           [exec] 	at com.liferay.portlet.internal.PortletContainerImpl._render(PortletContainerImpl.java:908)
           [exec] 	at com.liferay.portlet.internal.PortletContainerImpl.lambda$render$2(PortletContainerImpl.java:223)
           [exec] 	at com.liferay.portlet.internal.PortletContainerImpl._preserveGroupIds(PortletContainerImpl.java:425)
           [exec] 	at com.liferay.portlet.internal.PortletContainerImpl.render(PortletContainerImpl.java:211)
           [exec] 	at com.liferay.portlet.SecurityPortletContainerWrapper.render(SecurityPortletContainerWrapper.java:144)
           [exec] 	at com.liferay.portlet.RestrictPortletContainerWrapper.lambda$render$0(RestrictPortletContainerWrapper.java:124)
           [exec] 	at com.liferay.portlet.RestrictPortletContainerWrapper._render(RestrictPortletContainerWrapper.java:185)
           [exec] 	at com.liferay.portlet.RestrictPortletContainerWrapper.render(RestrictPortletContainerWrapper.java:122)
           [exec] 	at com.liferay.portal.kernel.portlet.PortletContainerUtil.render(PortletContainerUtil.java:214)
           [exec] 	at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:421)
           [exec] 	at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:173)
           [exec] 	at com.liferay.portal.struts.PortalRequestProcessor._process(PortalRequestProcessor.java:407)
           [exec] 	at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:153)
           [exec] 	at com.liferay.portal.internal.servlet.MainServlet.doGet(MainServlet.java:207)
           [exec] 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:626)
           [exec] 	at com.liferay.portal.internal.servlet.MainServlet.service(MainServlet.java:643)
           [exec] 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
           [exec] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
           [exec] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
           [exec] 	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
           [exec] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
           [exec] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:124)
           [exec] 	at com.liferay.portal.servlet.filters.password.modified.PasswordModifiedFilter.processFilter(PasswordModifiedFilter.java:62)
           [exec] 	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
           [exec] 	at com.liferay.portal.servlet.filters.lockout.LockoutFilter.processFilter(LockoutFilter.java:58)
           [exec] 	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
           [exec] 	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
           [exec] 	at com.liferay.portal.servlet.filters.secure.BaseAuthFilter.processFilter(BaseAuthFilter.java:340)
           [exec] 	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
           [exec] 	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
           [exec] 	at com.liferay.portal.monitoring.internal.servlet.filter.MonitoringFilter.processFilter(MonitoringFilter.java:183)
           [exec] 	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:104)
           [exec] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
           [exec] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
           [exec] 	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:710)
           [exec] 	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:457)
           [exec] 	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:384)
           [exec] 	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
           [exec] 	at com.liferay.friendly.url.internal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:454)
           [exec] 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
           [exec] 	at com.liferay.portal.servlet.ServletAdapter.service(ServletAdapter.java:99)
           [exec] 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
           [exec] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
           [exec] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
           [exec] 	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
           [exec] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
           [exec] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:124)
           [exec] 	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
           [exec] 	at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:341)
           [exec] 	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
           [exec] 	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
           [exec] 	at com.liferay.portal.servlet.filters.i18n.I18nFilter.processFilter(I18nFilter.java:368)
           [exec] 	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
           [exec] 	at com.liferay.portal.servlet.filters.password.modified.PasswordModifiedFilter.processFilter(PasswordModifiedFilter.java:62)
           [exec] 	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
           [exec] 	at com.liferay.portal.servlet.filters.lockout.LockoutFilter.processFilter(LockoutFilter.java:58)
           [exec] 	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
           [exec] 	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
           [exec] 	at com.liferay.portal.servlet.filters.secure.BaseAuthFilter.processFilter(BaseAuthFilter.java:340)
           [exec] 	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
           [exec] 	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
           [exec] 	at com.liferay.portal.servlet.filters.etag.ETagFilter.processFilter(ETagFilter.java:87)
           [exec] 	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
           [exec] 	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
           [exec] 	at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:265)
           [exec] 	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
           [exec] 	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
           [exec] 	at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:88)
           [exec] 	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
           [exec] 	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
           [exec] 	at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:248)
           [exec] 	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
           [exec] 	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
           [exec] 	at com.liferay.portal.monitoring.internal.servlet.filter.MonitoringFilter.processFilter(MonitoringFilter.java:183)
           [exec] 	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:196)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:196)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
           [exec] 	at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
           [exec] 	at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
           [exec] 	at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
           [exec] 	at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:389)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              shuyang.zhou Shuyang Zhou
              Reporter:
              ana.buchmann Ana Buchmann
              Participants of an Issue:
              Recent user:
              Rodrigo Cunha
              Engineering Assignee:
              Rafael Praxedes
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Days since last comment:
                5 weeks, 6 days ago

                  Packages

                  Version Package