2 Replies Latest reply on Sep 29, 2015 9:44 AM by Yuko Katori

    JBAS014739 when I added JDBC module and data-source for mariaDB

    Yuko Katori Newbie

      Hi, experts

       

      I'm trying to install JBossAS 7.1.1 to use an application called EJBCA based on http://www.ejbca.org/docs/installation.html.

       

      When I add data-source and JDBC module for mariaDB on JBossAS, I got the error "JBAS014739".

      Excuse me, my procedure is wrong?

      Any comment would be appreciated.

       

      Version:

      Ubuntu Server    12.04.5 LTS

      EJBCA            ce_6.3.1.1

      JBossAS            7.1.1

      MariaDB            5.5.45

      OpenJDK            1.7.0_79

      Apache Ant         1.8.2

      # supported versions

       

      1. preparation for required S/W

      # apt-get install mariadb-server-5.5 ant ant-optional unzip ntp openssh-server tree openjdk-7-jdk libmysql-java

      # JBoss and EJBCA with wget and unzip

       

      2. mariadb(mysql) setup

      # mysql_secure_installation

       

      3. my.cnf edit <<< I modified based on the guide of EJBCA

      # modified part

          [mysqld]

          default-storage-engine = INNODB

          transaction_isolation = REPEATABLE-READ

          innodb_file_per_table = 1

          innodb_file_format = Barracuda

          innodb_flush_log_at_trx_commit = 1

          sync_binlog = 1

          collation-server=utf8_general_ci=utf8_general_ci

          character-set-server=utf8

       

      4. mariadb(mysql) setup (cont.)

            $ mysql -u root -p

            mysql> CREATE DATABASE ejbca CHARACTER SET utf8 COLLATE utf8_general_ci;

            mysql> GRANT ALL PRIVILEGES ON ejbca.* TO 'ejbca'@'localhost' IDENTIFIED BY 'ejbca';

            mysql> exit

            $ mysql -u root -p ejbca < doc/sql-scripts/create-tables-ejbca-mysql.sql

            $ mysql -u root -p ejbca < doc/sql-scripts/create-index-ejbca.sql

            $ mysql -u root -p ejbca < doc/sql-scripts/optimize-ejbca-mysql.sql

       

      5. jboss setup

      # ./add-user.sh

       

      6. and boot

      # ./standalone.sh -b 0.0.0.0 -bmanagement=0.0.0.0

       

      Then...

      I added JDBC module and data-sources. When I added the module, it seemed successful.

      But after adding data-sources, I checked the status, it seems wrong... with the error "failure-description" => "JBAS014739: No handler for read-resources at address".

      And one more.... the result of ":jdbc-driver-info" was JBAS014739 too. I got no error but my procedure was not correct?

       

      I attached the procedure and the result of JBoss command, :read-resource and jdbc-driver-info

       

      7. add JDBC module

          root@ejbca:/opt/jboss-as-7.1.1.Final/modules/org/mariadb/main# ls -al

          total 240

          drwxr-xr-x 2 root root   4096 Sep 27 16:59 .

          drwxr-xr-x 3 root root   4096 Sep 27 16:58 ..

          -rw-r--r-- 1 root root 229708 Sep 27 16:59 mariadb-java-client-1.1.5.jar

          -rw-r--r-- 1 root root    303 Sep 27 16:59 module.xml

          root@ejbca:/opt/jboss-as-7.1.1.Final/modules/org/mariadb/main# cat module.xml

          <?xml version="1.0" encoding="UTF-8"?>

          <module xmlns="urn:jboss:module:1.1" name="org.mariadb">

            <resources>

              <resource-root path="mariadb-java-client-1.1.5.jar"/>

            </resources>

            <dependencies>

              <module name="javax.api"/>

              <module name="javax.transaction.api"/>

            </dependencies>

          </module>

       

          root@ejbca:/opt/jboss-as-7.1.1.Final/modules/org/mariadb/main#

       

      7. add JDBC module (cont.)

          root@xxx:/opt/jboss-as-7.1.1.Final/modules/org/mariadb/main# cd /opt/jboss-as-7.1.1.Final/bin/

          root@xxx:/opt/jboss-as-7.1.1.Final/bin#  ./jboss-cli.sh --connect

          [standalone@localhost:9999 /]

          [standalone@localhost:9999 /] /subsystem=datasources/jdbc-driver=org.mariadb.jdbc.Driver:add(driver-name=org.mariadb.jdbc.Driver,driver-module-name=org.mariadb,driver-xa-datasource-class-name=org.mariadb.jdbc.MySQLDataSource)

          {"outcome" => "success"}

          [standalone@localhost:9999 /] :reload

          {"outcome" => "success"}

          [standalone@localhost:9999 /]

       

      8. status check

          [standalone@localhost:9999 /] cd /subsystem=datasources

          [standalone@localhost:9999 subsystem=datasources] :read-resource

          {

              "outcome" => "success",

              "result" => {

                  "xa-data-source" => undefined,

                  "data-source" => {"ExampleDS" => undefined},

                  "jdbc-driver" => {

                      "org.mariadb.jdbc.Driver" => undefined,

                      "h2" => undefined

                  }

              }

          }

          [standalone@localhost:9999 subsystem=datasources]

          [standalone@localhost:9999 subsystem=datasources] cd /susbystem

          [standalone@localhost:9999 susbystem] :read-resource

          {

              "outcome" => "success",

              "result" => {

                  "deployment" => undefined,

                  "management-major-version" => 1,

                  "management-minor-version" => 1,

                  "name" => "ejbca",

                  "namespaces" => [],

                  "path" => undefined,

                  "product-name" => undefined,

                  "product-version" => undefined,

                  "profile-name" => undefined,

                  "release-codename" => "Brontes",

                  "release-version" => "7.1.1.Final",

                  "schema-locations" => [],

                  "system-property" => undefined,

                  "core-service" => {

                      "platform-mbean" => undefined,

                      "server-environment" => undefined,

                      "service-container" => undefined,

                      "management" => undefined

                  },

                  "extension" => {

                      "org.jboss.as.weld" => undefined,

                      "org.jboss.as.jdr" => undefined,

                      "org.jboss.as.naming" => undefined,

                      "org.jboss.as.configadmin" => undefined,

                      "org.jboss.as.ejb3" => undefined,

                      "org.jboss.as.jpa" => undefined,

                      "org.jboss.as.security" => undefined,

                      "org.jboss.as.pojo" => undefined,

                      "org.jboss.as.ee" => undefined,

                      "org.jboss.as.clustering.infinispan" => undefined,

                      "org.jboss.as.sar" => undefined,

                      "org.jboss.as.deployment-scanner" => undefined,

                      "org.jboss.as.threads" => undefined,

                      "org.jboss.as.web" => undefined,

                      "org.jboss.as.osgi" => undefined,

                      "org.jboss.as.remoting" => undefined,

                      "org.jboss.as.jaxrs" => undefined,

                      "org.jboss.as.logging" => undefined,

                      "org.jboss.as.jmx" => undefined,

                      "org.jboss.as.mail" => undefined,

                      "org.jboss.as.transactions" => undefined,

                      "org.jboss.as.connector" => undefined,

                      "org.jboss.as.webservices" => undefined

                  },

                  "interface" => {

                      "unsecure" => undefined,

                      "public" => undefined,

                      "management" => undefined

                  },

                  "socket-binding-group" => {"standard-sockets" => undefined},

                  "subsystem" => {

                      "jca" => undefined,

                      "transactions" => undefined,

                      "webservices" => undefined,

                      "weld" => undefined,

                      "jmx" => undefined,

                      "remoting" => undefined,

                      "jpa" => undefined,

                      "osgi" => undefined,

                      "security" => undefined,

                      "threads" => undefined,

                      "ejb3" => undefined,

                      "mail" => undefined,

                      "naming" => undefined,

                      "logging" => undefined,

                      "web" => undefined,

                      "pojo" => undefined,

                      "deployment-scanner" => undefined,

                      "resource-adapters" => undefined,

                      "datasources" => undefined,

                      "jdr" => undefined,

                      "ee" => undefined,

                      "infinispan" => undefined,

                      "jaxrs" => undefined,

                      "sar" => undefined,

                      "configadmin" => undefined

                  }

              }

          }

          [standalone@localhost:9999 susbystem]

          [standalone@localhost:9999 susbystem] /subsystem=naming:jndi-view

          {

              "outcome" => "success",

              "result" => {

                  "java: contexts" => {

                      "java:" => {"TransactionManager" => {

                          "class-name" => "com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate",

                          "value" => "com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate@389579ca"

                      }},

                      "java:jboss" => {

                          "TransactionManager" => {

                              "class-name" => "com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate",

                              "value" => "com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate@389579ca"

                          },

                          "TransactionSynchronizationRegistry" => {

                              "class-name" => "com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple",

                              "value" => "com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple@7c1a5bc2"

                          },

                          "UserTransaction" => {

                              "class-name" => "org.jboss.tm.usertx.client.ServerVMClientUserTransaction",

                              "value" => "org.jboss.tm.usertx.client.ServerVMClientUserTransaction@e44e370"

                          },

                          "jaas" => {

                              "class-name" => "com.sun.proxy.$Proxy7",

                              "children" => {

                                  "jboss-ejb-policy" => {

                                      "class-name" => "org.jboss.as.security.plugins.SecurityDomainContext",

                                      "value" => "org.jboss.security.authentication.JBossCachedAuthenticationManager@6b321f49"

                                  },

                                  "other" => {

                                      "class-name" => "org.jboss.as.security.plugins.SecurityDomainContext",

                                      "value" => "org.jboss.security.authentication.JBossCachedAuthenticationManager@27a4289a"

                                  },

                                  "jboss-web-policy" => {

                                      "class-name" => "org.jboss.as.security.plugins.SecurityDomainContext",

                                      "value" => "org.jboss.security.authentication.JBossCachedAuthenticationManager@a65aacb"

                                  }

                              }

                          },

                          "mail" => {

                              "class-name" => "javax.naming.Context",

                              "children" => {"Default" => {

                                  "class-name" => "javax.mail.Session",

                                  "value" => "javax.mail.Session@6ae9d641"

                              }}

                          },

                          "datasources" => {

                              "class-name" => "javax.naming.Context",

                              "children" => {"ExampleDS" => {

                                  "class-name" => "org.jboss.jca.adapters.jdbc.WrapperDataSource",

                                  "value" => "org.jboss.jca.adapters.jdbc.WrapperDataSource@156a147a"

                              }}

                          }

                      },

                      "java:global" => undefined

                  },

                  "applications" => undefined

              }

          }

          [standalone@localhost:9999 susbystem]

          [standalone@localhost:9999 susbystem] :jdbc-driver-info

          {

              "outcome" => "failed",

              "failure-description" => "JBAS014739: No handler for jdbc-driver-info at address []",

              "rolled-back" => true

          }

          [standalone@localhost:9999 susbystem]

       

      9. add data-source

          root@xxx:/opt/jboss-as-7.1.1.Final/bin#  ./jboss-cli.sh --connect

          [standalone@localhost:9999 /] data-source add --name=ejbcads --driver-name="org.mariadb.jdbc.Driver" --connection-url="jdbc:mysql://127.0.0.1:3306/ejbca" --jndi-name="java:/EjbcaDS" --use-ccm=true --driver-class="org.mariadb.jdbc.Driver" --user-name="ejbca" --password="ejbca" --validate-on-match=true --background-validation=false --prepared-statements-cache-size=50 --share-prepared-statements=true --min-pool-size=5 --max-pool-size=150 --pool-prefill=true --transaction-isolation=TRANSACTION_READ_COMMITTED --check-valid-connection-sql="select 1;"

          [standalone@localhost:9999 /] :reload

          {"outcome" => "success"}

          [standalone@localhost:9999 /]

       

      10. status check

          [standalone@localhost:9999 susbystem] cd /subsystem=datasources

          [standalone@localhost:9999 subsystem=datasources]

          [standalone@localhost:9999 subsystem=datasources] :read-resources

          {

              "outcome" => "failed",

              "failure-description" => "JBAS014739: No handler for read-resources at address [(\"subsystem\" => \"datasources\")]",

              "rolled-back" => true

          }

          [standalone@localhost:9999 subsystem=datasources] cd /subsystem

          [standalone@localhost:9999 subsystem] :read-resources

          {

              "outcome" => "failed",

              "failure-description" => "JBAS014739: No handler for read-resources at address []",

              "rolled-back" => true

          }

          [standalone@localhost:9999 subsystem] cd /susbsystem

          [standalone@localhost:9999 susbsystem] :read-resources

          {

              "outcome" => "failed",

              "failure-description" => "JBAS014739: No handler for read-resources at address []",

              "rolled-back" => true

          }

          [standalone@localhost:9999 susbsystem] /subsystem=naming:jndi-view

          {

              "outcome" => "success",

              "result" => {

                  "java: contexts" => {

                      "java:" => {

                          "EjbcaDS" => {

                              "class-name" => "org.jboss.jca.adapters.jdbc.WrapperDataSource",

                              "value" => "org.jboss.jca.adapters.jdbc.WrapperDataSource@ff47cbc"

                          },

                          "TransactionManager" => {

                              "class-name" => "com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate",

                              "value" => "com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate@389579ca"

                          }

                      },

                      "java:jboss" => {

                          "TransactionManager" => {

                              "class-name" => "com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate",

                              "value" => "com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate@389579ca"

                          },

                          "TransactionSynchronizationRegistry" => {

                              "class-name" => "com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple",

                              "value" => "com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple@6be5add3"

                          },

                          "UserTransaction" => {

                              "class-name" => "org.jboss.tm.usertx.client.ServerVMClientUserTransaction",

                              "value" => "org.jboss.tm.usertx.client.ServerVMClientUserTransaction@1fa0fb20"

                          },

                          "jaas" => {

                              "class-name" => "com.sun.proxy.$Proxy7",

                              "children" => {

                                  "jboss-ejb-policy" => {

                                      "class-name" => "org.jboss.as.security.plugins.SecurityDomainContext",

                                      "value" => "org.jboss.security.authentication.JBossCachedAuthenticationManager@5d80186a"

                                  },

                                  "other" => {

                                      "class-name" => "org.jboss.as.security.plugins.SecurityDomainContext",

                                      "value" => "org.jboss.security.authentication.JBossCachedAuthenticationManager@4c3071b"

                                  },

                                  "jboss-web-policy" => {

                                      "class-name" => "org.jboss.as.security.plugins.SecurityDomainContext",

                                      "value" => "org.jboss.security.authentication.JBossCachedAuthenticationManager@2007800e"

                                  }

                              }

                          },

                          "mail" => {

                              "class-name" => "javax.naming.Context",

                              "children" => {"Default" => {

                                  "class-name" => "javax.mail.Session",

                                  "value" => "javax.mail.Session@545eb62c"

                              }}

                          },

                          "datasources" => {

                              "class-name" => "javax.naming.Context",

                              "children" => {"ExampleDS" => {

                                  "class-name" => "org.jboss.jca.adapters.jdbc.WrapperDataSource",

                                  "value" => "org.jboss.jca.adapters.jdbc.WrapperDataSource@38a106df"

                              }}

                          }

                      },

                      "java:global" => undefined

                  },

                  "applications" => undefined

              }

          }

          [standalone@localhost:9999 susbsystem] :jdbc-driver-info

          {

              "outcome" => "failed",

              "failure-description" => "JBAS014739: No handler for jdbc-driver-info at address []",

              "rolled-back" => true

          }

          [standalone@localhost:9999 susbsystem]