Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-6936

NiFi Stateless - Controller service DBCPConnectionPool will not be initialized

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 1.10.0
    • Fix Version/s: None
    • Component/s: NiFi Stateless
    • Labels:
      None

      Description

      When trying to initialize a Flow with the controller service DBCPConnectionPool 1.10.0, it will fail.

       

      Configuration: 

      JSON-Example for stateless-configuration

      {
        "registryUrl": "http://localhost:18080",
        "bucketId": "9ee153c5-ae62-4616-96e2-9335e2bd442b",
        "flowId" : "87fccff0-336d-4d34-b3a4-293390364e0c",
        "parameters": {
          "sql_connection_url" : "jdbc:mariadb://xx.xx.xx.xx:3306/test",
          "sql_user": "test",
          "sql_password": { "sensitive": "true", "value": "anypassword" },
          "sql_driver_name" : "org.mariadb.jdbc.Driver",
          "sql_driver_location": "/var/www/share/nifi_data/configuration_resources/custom_lib/mariadb-java-client-2.3.0.jar"
        }
      }

      The error i get is the following

      12:59:51.542 [main] INFO org.apache.nifi.stateless.bootstrap.ExtensionDiscovery - Successfully discovered extensions in 6255 milliseconds
      12:59:51.549 [main] DEBUG org.apache.nifi.stateless.core.ComponentFactory - Setting context class loader to org.apache.nifi.nar.InstanceClassLoader@1124dd79 (parent = org.apache.nifi.nar.NarClassLoader[/var/www/share/nifi_archive/nifi-1.10.0/work/stateless-nars/nifi-dbcp-service-nar-1.10.0.nar-unpacked]) to create org.apache.nifi.dbcp.DBCPConnectionPool
      12:59:51.562 [main] DEBUG org.apache.nifi.parameter.ExpressionLanguageAwareParameterParser - For input #{sql_driver_location} found 1 Parameter references: [org.apache.nifi.parameter.StandardParameterReference@3265995e]
      12:59:51.565 [main] DEBUG org.apache.nifi.parameter.ExpressionLanguageAwareParameterParser - For input /var/www/share/nifi_data/configuration_resources/custom_lib/mariadb-java-client-2.3.0.jar found 0 Parameter references: []
      12:59:51.566 [main] DEBUG org.apache.nifi.parameter.ExpressionLanguageAwareParameterParser - For input 500 millis found 0 Parameter references: []
      12:59:51.566 [main] DEBUG org.apache.nifi.parameter.ExpressionLanguageAwareParameterParser - For input 8 found 0 Parameter references: []
      12:59:51.566 [main] DEBUG org.apache.nifi.parameter.ExpressionLanguageAwareParameterParser - For input 0 found 0 Parameter references: []
      12:59:51.566 [main] DEBUG org.apache.nifi.parameter.ExpressionLanguageAwareParameterParser - For input 8 found 0 Parameter references: []
      12:59:51.567 [main] DEBUG org.apache.nifi.parameter.ExpressionLanguageAwareParameterParser - For input -1 found 0 Parameter references: []
      12:59:51.567 [main] DEBUG org.apache.nifi.parameter.ExpressionLanguageAwareParameterParser - For input -1 found 0 Parameter references: []
      12:59:51.567 [main] DEBUG org.apache.nifi.parameter.ExpressionLanguageAwareParameterParser - For input 30 mins found 0 Parameter references: []
      12:59:51.567 [main] DEBUG org.apache.nifi.parameter.ExpressionLanguageAwareParameterParser - For input -1 found 0 Parameter references: []
      Exception in thread "main" java.lang.reflect.InvocationTargetException
      	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:498)
      	at org.apache.nifi.bootstrap.RunStatelessNiFi.main(RunStatelessNiFi.java:69)
      Caused by: java.lang.reflect.InvocationTargetException
      	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:498)
      	at org.apache.nifi.StatelessNiFi.main(StatelessNiFi.java:103)
      	... 5 more
      Caused by: java.lang.RuntimeException: Failed to enable Controller Service {id=92c03c8d-ae33-31fd-93e6-827768979734, name=SQL-Verbindung, type=class org.apache.nifi.dbcp.DBCPConnectionPool} because validation failed: ['Database Connection URL' is invalid because Database Connection URL is required, 'Database Driver Class Name' is invalid because Database Driver Class Name is required]
      	at org.apache.nifi.stateless.core.StatelessControllerServiceLookup.enableControllerServices(StatelessControllerServiceLookup.java:133)
      	at org.apache.nifi.stateless.core.StatelessFlow.<init>(StatelessFlow.java:153)
      	at org.apache.nifi.stateless.core.StatelessFlow.createAndEnqueueFromJSON(StatelessFlow.java:469)
      	at org.apache.nifi.stateless.runtimes.Program.runLocal(Program.java:133)
      	at org.apache.nifi.stateless.runtimes.Program.launch(Program.java:67)
      	... 10 more

       

        Attachments

        1. image-2019-12-10-13-13-15-953.png
          52 kB
          Don Bosco Nguyen van Hoi

          Issue Links

            Activity

              People

              • Assignee:
                pvillard Pierre Villard
                Reporter:
                donbosco Don Bosco Nguyen van Hoi
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: