1
0
-1

I am trying to connect from a Joget hosted cloud instance of Joget to a MySQL database on AWS using Configure Datasource > Configure Custom Database. When I test it seems to almost connect but I get the error:

Cause:
Cannot create PoolableConnectionFactory (Access denied for user 'mysqlroot'@'ec2-54-193-24-224.us-west-1.compute.amazonaws.com' (using password: YES))

These credentials work just fine from other non-Joget applications.

Why does this not work as expected?

Thanks, Bill

    CommentAdd your comment...

    5 answers

    1.  
      1
      0
      -1

      Hi,

      Thanks for your provided information. I managed to replicate your issue with password containing "$' character. This issue is fixed. Our team will inform you when a new release is available. For a temporary solution, can you remove the "$" character from your password? Sorry for any inconvenience caused.

      Best regards.

        CommentAdd your comment...
      1.  
        1
        0
        -1
        Also in the log, I notice the error “java.lang.IllegalArgumentException:" at the beginning of this section before the first error regarding authentication " java.sql.SQLException:” (see below). Could the first error be causing the issue?
         at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
         at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
         at java.lang.Thread.run(Unknown Source)
        2017-09-02 15:50:45,667: java.lang.IllegalArgumentException: Illegal group reference: group index is missing
        java.lang.IllegalArgumentException: Illegal group reference: group index is missing
         at java.util.regex.Matcher.appendReplacement(Unknown Source)
         at java.util.regex.Matcher.replaceAll(Unknown Source)
         at java.lang.String.replaceAll(Unknown Source)
         at org.joget.commons.util.StringUtil.decryptContent(StringUtil.java:442)
         at org.joget.apps.app.service.AppUtil.processHashVariable(AppUtil.java:428)
         at org.joget.apps.app.service.AppUtil.processHashVariable(AppUtil.java:410)
         at org.joget.apps.app.controller.DatalistBuilderWebController.createDataListBinderFromRequestInternal(DatalistBuilderWebController.java:299)
         at org.joget.apps.app.controller.DatalistBuilderWebController.getBuilderDataColumnList(DatalistBuilderWebController.java:211)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:180)
         at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:440)
         at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:428)
         at org.joget.commons.spring.web.ParameterizedAnnotationMethodHandlerAdapter.handle(ParameterizedAnnotationMethodHandlerAdapter.java:32)
         at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)
         at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
         at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
         at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
         at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
         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:52)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
         at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
         at org.owasp.csrfguard.CsrfGuardFilter.doFilter(CsrfGuardFilter.java:88)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
         at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)
         at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
         at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
         at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
         at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:115)
         at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
         at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
         at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
         at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
         at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
         at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
         at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
         at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200)
         at org.joget.apps.workflow.security.WorkflowHttpAuthProcessingFilter.doFilter(WorkflowHttpAuthProcessingFilter.java:85)
         at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
         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:331)
         at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200)
         at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
         at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:121)
         at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
         at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66)
         at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
         at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
         at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
         at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
         at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
         at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
         at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
         at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)
         at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
         at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
         at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
         at org.joget.commons.spring.web.CustomDelegatingFilterProxy.doFilter(CustomDelegatingFilterProxy.java:31)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
         at org.joget.apps.app.web.ExpireFilter.doFilter(ExpireFilter.java:43)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
         at org.joget.apps.app.web.JsonResponseFilter.doFilter(JsonResponseFilter.java:138)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
         at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
         at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
         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:198)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
         at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799)
         at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
         at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
         at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)
         at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
         at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
         at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
         at java.lang.Thread.run(Unknown Source)
        2017-09-02 15:50:45,672: java.sql.SQLException: Cannot create PoolableConnectionFactory (Access denied for user 'mysqlroot'@'ec2-54-83-5-152.compute-1.amazonaws.com' (using password: YES))
        java.sql.SQLException: Cannot create PoolableConnectionFactory (Access denied for user 'mysqlroot'@'ec2-54-83-5-152.compute-1.amazonaws.com' (using password: YES))
        1. Julian

          Hi William, Yes the error message "java.lang.IllegalArgumentException: Illegal group reference: group index is missing" does seem like a possible cause, although it's difficult to tell at this point without more information. If you could provide a sample app or detailed steps to reproduce the error, then we can help to have a look. Best Regards Julian

        CommentAdd your comment...
      2.  
        1
        0
        -1

        Hi Anders,

        No, I have now tried to access this same database in a simple datalist. I have verified that the correct credentials have been entered because if I change the password to anything else I get

        But it I use the correct password, I get

        But when when I click ok in the Custom Datasource screen, i get

        The corresponding error in the log is

        2017-09-02 15:50:45,674: java.lang.RuntimeException: java.sql.SQLException: Cannot create PoolableConnectionFactory (Access denied for user 'mysqlroot'@'ec2-54-83-5-152.compute-1.amazonaws.com' (using password: YES))
        java.lang.RuntimeException: java.sql.SQLException: Cannot create PoolableConnectionFactory (Access denied for user 'mysqlroot'@'ec2-54-83-5-152.compute-1.amazonaws.com' (using password: YES))

        The SQL Query is simple and correct

        SELECT * FROM x2_churches

        It appears that when the Query request is made the same/proper credentials are not being used as for the connection test.

        How can I get this resolved?

        Thank, Bill

          CommentAdd your comment...
        1.  
          1
          0
          -1

          I thought this might be the case so I tried it on an enterprise self-hosted version. Now I get

          When I create the Custom Datasource for the Jasper Reports plugin. This looks correct.

          However, then why I try to execute the same report from the userview I get

          Can this plug not use current TIBCO Jaspersoft Studio jrxml files?

          Thanks, Bill

          1. Anders

            Hi, in this case the error message says "Access denied for user" which actually indicates that the authentication failed. Perhaps its some incorrect jdbc configuration in the jrxml file.

          CommentAdd your comment...
        2.  
          1
          0
          -1

          Hi, I believe this is due to security restrictions as mentioned in Problem connecting external Database in Joget onDemand

            CommentAdd your comment...