7 Replies Latest reply on Nov 8, 2011 12:00 PM by Alexey Loubyansky

    Datasource test from admin console and CLI fails

    Vimal Kansal Newbie

      I have created a datasource using admin console, which writes the following definition in standalone.xml :

      <datasource jndi-name="java:jboss/datasources/MyDS" pool-name="MyDS_Pool" enabled="false" jta="false" use-ccm="false">

                          <connection-url>

                              jdbc:postgresql://localhost:5432/testdb

                          </connection-url>

                          <driver-class>

                              org.postgresql.Driver

                          </driver-class>

                          <driver>

                              postgresql-8.4-702.jdbc4.jar

                          </driver>

                          <security>

                              <user-name>

                                  postgres

                              </user-name>

                              <password>

                                  postgres

                              </password>

                          </security>

       

      When I test this datasource either using admin consloe or using the following CLI operation

           /subsystem=datasources/datasource=java:jboss/datasources/MyDS: test-connection-in-pool, I get the following failure message :

       

      14:28:34,187 ERROR [org.jboss.as.controller] (HttpManagementService-threads - 4) Operation ("test-connection-in-pool") failed - address: ([

          ("subsystem" => "datasources"),

          ("data-source" => "java:jboss/datasources/MyDS")

      ]) - failure description: "failed to invoke operation: failed to match pool. Check JndiName: java:jboss/datasources/MyDS"

       

      In past, I it used to work. But with the latest ALPHA2 snapshot its not working.

        • 1. Re: Datasource test from admin console and CLI fails
          jaikiran pai Master

          What does the server side logs show?

          • 2. Re: Datasource test from admin console and CLI fails
            Vimal Kansal Newbie

            I don't see much. Only lines I see are :

             

            14:24:33,260 INFO  [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployed "postgresql-8.4-702.jdbc4.jar"

            14:25:22,394 ERROR [org.jboss.as.controller] (HttpManagementService-threads - 2) Operation ("test-connection-in-pool") failed - address: ([

                ("subsystem" => "datasources"),

                ("data-source" => "java:jboss/datasources/ComradDS")

            ]) - failure description: "failed to invoke operation: failed to match pool. Check JndiName: java:jboss/datasources/ComradDS"

            14:27:20,313 ERROR [org.jboss.as.controller] (Remoting "the_beast:MANAGEMENT" task-2) Operation ("test-connection-in-pool") failed - address: ([

                ("subsystem" => "datasources"),

                ("data-source" => "java:jboss/datasources/ComradDS")

            ]) - failure description: "failed to invoke operation: failed to match pool. Check JndiName: java:jboss/datasources/ComradDS"

            14:28:34,187 ERROR [org.jboss.as.controller] (HttpManagementService-threads - 4) Operation ("test-connection-in-pool") failed - address: ([

                ("subsystem" => "datasources"),

                ("data-source" => "java:jboss/datasources/ComradDS")

            ]) - failure description: "failed to invoke operation: failed to match pool. Check JndiName: java:jboss/datasources/ComradDS"

            14:44:32,525 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-10) JBAS010400: Bound data source [java:jboss/datasources/ComradDS]

            • 3. Re: Datasource test from admin console and CLI fails
              Vimal Kansal Newbie

              Please ignore previous one, I see following :

               

              14:24:33,260 INFO  [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployed "postgresql-8.4-702.jdbc4.jar"

              14:25:22,394 ERROR [org.jboss.as.controller] (HttpManagementService-threads - 2) Operation ("test-connection-in-pool") failed - address: ([

                  ("subsystem" => "datasources"),

                  ("data-source" => "java:jboss/datasources/MyDS")

              ]) - failure description: "failed to invoke operation: failed to match pool. Check JndiName: java:jboss/datasources/MyDS"

              14:27:20,313 ERROR [org.jboss.as.controller] (Remoting "the_beast:MANAGEMENT" task-2) Operation ("test-connection-in-pool") failed - address: ([

                  ("subsystem" => "datasources"),

                  ("data-source" => "java:jboss/datasources/MyDS")

              ]) - failure description: "failed to invoke operation: failed to match pool. Check JndiName: java:jboss/datasources/MyDS"

              14:28:34,187 ERROR [org.jboss.as.controller] (HttpManagementService-threads - 4) Operation ("test-connection-in-pool") failed - address: ([

                  ("subsystem" => "datasources"),

                  ("data-source" => "java:jboss/datasources/MyDS")

              ]) - failure description: "failed to invoke operation: failed to match pool. Check JndiName: java:jboss/datasources/MyDS"

              14:44:32,525 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-10) JBAS010400: Bound data source [java:jboss/datasources/MyDS]

              • 4. Re: Datasource test from admin console and CLI fails
                jaikiran pai Master

                From those logs it appears like the test-connection-pool is being issued before the datasource binding is completely done. What are your exact CLI operations? Are you running this in a batch?

                • 5. Re: Datasource test from admin console and CLI fails
                  Vimal Kansal Newbie

                  I have tried the admin-console also which means I don't have suppy the operation expression, even then it fails with the same log message.

                  • 6. Re: Datasource test from admin console and CLI fails
                    Vimal Kansal Newbie

                    And BTW, I am not running batch CLI, and my expression is :

                     

                    [standalone@localhost:9999 /] /subsystem=datasources/data-source=MyDS:test-connection-in-pool