Instalação no Linux - Erro de Inicialização - "Error create table method [31: FDN_USER]"

Olá, tudo bem?

Estou tentando instalar o Fluig (1.8) em um ambiente Linux (Xubuntu).

Ao inicializar o serviço pela primeira vez pra um database novo, o fluig está criando as tabelas no banco de dados (aparentemente sem erro) até chegar na tabela FDN_USER, em que está gerando o seguinte stacktrance em /opt/fluig/appserver/console.log:

[...]
[Server:fluig1] 17:17:21,412 WARN  [com.fluig.database.service.DBUpdateService] (MSC service thread 1-1) FLUIG_DB_UPDATE does not exists. Creating tables
[Server:fluig1] 17:17:21,476 INFO  [com.fluig.database.update.wcm.CreateFoundationTables] (MSC service thread 1-1) CreateFoundationTables(database=mysql)
[Server:fluig1] 17:17:21,479 INFO  [com.fluig.database.service.DBUpdateService] (MSC service thread 1-1) Create table method [1: FDN_TENANT] will be executed
[Server:fluig1] 17:17:21,492 INFO  [com.fluig.database.common.util.DBUtil] (MSC service thread 1-1) Creating table: FDN_TENANT
[Server:fluig1] 17:17:21,554 INFO  [com.fluig.database.service.DBUpdateService] (MSC service thread 1-1) Create table method [2: FDN_TENANTDATA] will be executed
[Server:fluig1] 17:17:21,554 INFO  [com.fluig.database.common.util.DBUtil] (MSC service thread 1-1) Creating table: FDN_TENANTDATA
[Server:fluig1] 17:17:21,595 INFO  [com.fluig.database.service.DBUpdateService] (MSC service thread 1-1) Create table method [3: FDN_PRODUCT] will be executed
[Server:fluig1] 17:17:21,596 INFO  [com.fluig.database.common.util.DBUtil] (MSC service thread 1-1) Creating table: FDN_PRODUCT
[Server:fluig1] 17:17:21,626 INFO  [com.fluig.database.service.DBUpdateService] (MSC service thread 1-1) Create table method [4: FDN_TENANTPRODUCT] will be executed
[Server:fluig1] 17:17:21,626 INFO  [com.fluig.database.common.util.DBUtil] (MSC service thread 1-1) Creating table: FDN_TENANTPRODUCT
[Server:fluig1] 17:17:21,664 INFO  [com.fluig.database.service.DBUpdateService] (MSC service thread 1-1) Create table method [5: FDN_PARAMGERAL] will be executed
[Server:fluig1] 17:17:21,664 INFO  [com.fluig.database.common.util.DBUtil] (MSC service thread 1-1) Creating table: FDN_PARAMGERAL
[Server:fluig1] 17:17:21,689 INFO  [com.fluig.database.service.DBUpdateService] (MSC service thread 1-1) Create table method [6: FDN_IDENTITYPARTNER] will be executed
[Server:fluig1] 17:17:21,690 INFO  [com.fluig.database.common.util.DBUtil] (MSC service thread 1-1) Creating table: FDN_IDENTITYPARTNER
[Server:fluig1] 17:17:21,718 INFO  [com.fluig.database.service.DBUpdateService] (MSC service thread 1-1) Create table method [7: FDN_AUTHORIZECLIENTDATA] will be executed
[Server:fluig1] 17:17:21,718 INFO  [com.fluig.database.common.util.DBUtil] (MSC service thread 1-1) Creating table: FDN_AUTHORIZECLIENTDATA
[Server:fluig1] 17:17:21,753 INFO  [com.fluig.database.service.DBUpdateService] (MSC service thread 1-1) Create table method [8: FDN_DIGITALSIGNATURE] will be executed
[Server:fluig1] 17:17:21,753 INFO  [com.fluig.database.common.util.DBUtil] (MSC service thread 1-1) Creating table: FDN_DIGITALSIGNATURE
[Server:fluig1] 17:17:21,778 INFO  [com.fluig.database.service.DBUpdateService] (MSC service thread 1-1) Create table method [10: HIBERNATE_SEQUENCE] will be executed
[Server:fluig1] 17:17:21,789 INFO  [com.fluig.database.service.DBUpdateService] (MSC service thread 1-1) Create table method [21: FDN_ROLE] will be executed
[Server:fluig1] 17:17:21,789 INFO  [com.fluig.database.common.util.DBUtil] (MSC service thread 1-1) Creating table: FDN_ROLE
[Server:fluig1] 17:17:21,844 INFO  [com.fluig.database.service.DBUpdateService] (MSC service thread 1-1) Create table method [22: FDN_ROLEDATA] will be executed
[Server:fluig1] 17:17:21,844 INFO  [com.fluig.database.common.util.DBUtil] (MSC service thread 1-1) Creating table: FDN_ROLEDATA
[Server:fluig1] 17:17:21,874 INFO  [com.fluig.database.service.DBUpdateService] (MSC service thread 1-1) Create table method [25: FDN_GROUP] will be executed
[Server:fluig1] 17:17:21,874 INFO  [com.fluig.database.common.util.DBUtil] (MSC service thread 1-1) Creating table: FDN_GROUP
[Server:fluig1] 17:17:21,908 INFO  [com.fluig.database.service.DBUpdateService] (MSC service thread 1-1) Create table method [31: FDN_USER] will be executed
[Server:fluig1] 17:17:21,908 INFO  [com.fluig.database.common.util.DBUtil] (MSC service thread 1-1) Creating table: FDN_USER
[Server:fluig1] 17:17:21,931 ERROR [com.fluig.database.service.DBUpdateService] (MSC service thread 1-1) Error create table method [31: FDN_USER]
[Server:fluig1] 17:17:21,933 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.unit."01001-fluig-database-wcm.jar".DEPENDENCIES: org.jboss.msc.service.StartException in service jboss.deployment.unit."01001-fluig-database-wcm.jar".DEPENDENCIES: WFLYSRV0153: Failed to process phase DEPENDENCIES of deployment "01001-fluig-database-wcm.jar"
[Server:fluig1]     at org.jboss.as.server@10.0.3.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:183)
[Server:fluig1]     at org.jboss.msc@1.4.11.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
[Server:fluig1]     at org.jboss.msc@1.4.11.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
[Server:fluig1]     at org.jboss.msc@1.4.11.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
[Server:fluig1]     at org.jboss.threads@2.3.3.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
[Server:fluig1]     at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
[Server:fluig1]     at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
[Server:fluig1]     at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1363)
[Server:fluig1]     at java.base/java.lang.Thread.run(Thread.java:834)
[Server:fluig1] Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: java.lang.RuntimeException: java.sql.SQLException: Cannot add foreign key constraint
[Server:fluig1]     at com.fluig.dbupdate//com.fluig.database.service.deployment.SubsystemDeploymentProcessor.deploy(SubsystemDeploymentProcessor.java:77)
[Server:fluig1]     at org.jboss.as.server@10.0.3.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:176)
[Server:fluig1]     ... 8 more
[Server:fluig1] Caused by: java.lang.RuntimeException: java.sql.SQLException: Cannot add foreign key constraint
[Server:fluig1]     at com.fluig.dbupdate//com.fluig.database.service.DBUpdateService.addUpdate(DBUpdateService.java:167)
[Server:fluig1]     at com.fluig.dbupdate//com.fluig.database.service.deployment.SubsystemDeploymentProcessor.deploy(SubsystemDeploymentProcessor.java:71)
[Server:fluig1]     ... 9 more
[Server:fluig1] Caused by: java.sql.SQLException: Cannot add foreign key constraint
[Server:fluig1]     at com.mysql@8.0.29//com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
[Server:fluig1]     at com.mysql@8.0.29//com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
[Server:fluig1]     at com.mysql@8.0.29//com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:763)
[Server:fluig1]     at com.mysql@8.0.29//com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:648)
[Server:fluig1]     at org.jboss.ironjacamar.jdbcadapters@1.4.17.Final//org.jboss.jca.adapters.jdbc.WrappedStatement.execute(WrappedStatement.java:198)
[Server:fluig1]     at com.fluig.dbupdate//com.fluig.database.common.util.DBUtil.executeSQLs(DBUtil.java:118)
[Server:fluig1]     at com.fluig.dbupdate//com.fluig.database.common.util.DBUtil.executeSQLs(DBUtil.java:103)
[Server:fluig1]     at com.fluig.dbupdate//com.fluig.database.common.util.DBUtil.createTableFromStream(DBUtil.java:213)
[Server:fluig1]     at com.fluig.database.update.wcm.CreateFoundationTables.createTable(CreateFoundationTables.java:35)
[Server:fluig1]     at com.fluig.database.update.wcm.CreateFoundationTables.createFdnUser(CreateFoundationTables.java:133)
[Server:fluig1]     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[Server:fluig1]     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[Server:fluig1]     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[Server:fluig1]     at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[Server:fluig1]     at com.fluig.dbupdate//com.fluig.database.service.DBUpdateService.addUpdate(DBUpdateService.java:147)
[Server:fluig1]     ... 10 more
[Server:fluig1] 
[Server:fluig1] 17:17:21,944 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 18.0.1.Final (WildFly Core 10.0.3.Final) started (with errors) in 12151ms - Started 516 of 881 services (1 services failed or missing dependencies, 604 services are lazy, passive or on-demand)
[Server:fluig1] 17:17:21,949 ERROR [org.jboss.as.controller.management-operation] (WCM DEPLOYER-threads - 1) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "01001-fluig-database-wcm.jar")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"01001-fluig-database-wcm.jar\".DEPENDENCIES" => "WFLYSRV0153: Failed to process phase DEPENDENCIES of deployment \"01001-fluig-database-wcm.jar\"
[Server:fluig1]     Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: java.lang.RuntimeException: java.sql.SQLException: Cannot add foreign key constraint
[Server:fluig1]     Caused by: java.lang.RuntimeException: java.sql.SQLException: Cannot add foreign key constraint
[Server:fluig1]     Caused by: java.sql.SQLException: Cannot add foreign key constraint"}}
[Server:fluig1] 17:17:21,956 ERROR [org.jboss.as.server] (WCM DEPLOYER-threads - 1) WFLYSRV0021: Deploy of deployment "01001-fluig-database-wcm.jar" was rolled back with the following failure message: 
[Server:fluig1] {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"01001-fluig-database-wcm.jar\".DEPENDENCIES" => "WFLYSRV0153: Failed to process phase DEPENDENCIES of deployment \"01001-fluig-database-wcm.jar\"
[Server:fluig1]     Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: java.lang.RuntimeException: java.sql.SQLException: Cannot add foreign key constraint
[Server:fluig1]     Caused by: java.lang.RuntimeException: java.sql.SQLException: Cannot add foreign key constraint
[Server:fluig1]     Caused by: java.sql.SQLException: Cannot add foreign key constraint"}}
[Server:fluig1] 17:17:21,958 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0028: Stopped deployment 01001-fluig-database-wcm.jar (runtime-name: 01001-fluig-database-wcm.jar) in 5ms
[Server:fluig1] 17:17:21,960 ERROR [stderr] (Thread-87) java.lang.Exception: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"01001-fluig-database-wcm.jar\".DEPENDENCIES" => "WFLYSRV0153: Failed to process phase DEPENDENCIES of deployment \"01001-fluig-database-wcm.jar\"
[Server:fluig1] 17:17:21,960 ERROR [stderr] (Thread-87)     Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: java.lang.RuntimeException: java.sql.SQLException: Cannot add foreign key constraint
[Server:fluig1] 17:17:21,960 ERROR [stderr] (Thread-87)     Caused by: java.lang.RuntimeException: java.sql.SQLException: Cannot add foreign key constraint
[Server:fluig1] 17:17:21,961 ERROR [stderr] (Thread-87)     Caused by: java.sql.SQLException: Cannot add foreign key constraint"}}
[Server:fluig1] 17:17:21,961 ERROR [stderr] (Thread-87)     at com.totvs.technology.wcm//com.totvs.technology.wcm.deployment.WCMStandaloneDeploymentManager$ServerDeploymentPlanResultFuture.getActionResult(WCMStandaloneDeploymentManager.java:263)
[Server:fluig1] 17:17:21,961 ERROR [stderr] (Thread-87)     at com.totvs.technology.wcm//com.totvs.technology.wcm.deployment.WCMStandaloneDeploymentManager$ServerDeploymentPlanResultFuture.getResultFromNode(WCMStandaloneDeploymentManager.java:251)
[Server:fluig1] 17:17:21,961 ERROR [stderr] (Thread-87)     at com.totvs.technology.wcm//com.totvs.technology.wcm.deployment.WCMStandaloneDeploymentManager$ServerDeploymentPlanResultFuture.get(WCMStandaloneDeploymentManager.java:231)
[Server:fluig1] 17:17:21,961 ERROR [stderr] (Thread-87)     at com.totvs.technology.wcm//com.totvs.technology.wcm.deployment.WCMStandaloneDeploymentManager$ServerDeploymentPlanResultFuture.get(WCMStandaloneDeploymentManager.java:146)
[Server:fluig1] 17:17:21,961 ERROR [stderr] (Thread-87)     at com.totvs.technology.wcm//com.totvs.technology.wcm.deployment.StandaloneDeployer.deploy(StandaloneDeployer.java:140)
[Server:fluig1] 17:17:21,962 ERROR [stderr] (Thread-87)     at com.totvs.technology.wcm//com.totvs.technology.wcm.deployment.StandaloneDeployer.deploy(StandaloneDeployer.java:250)
[Server:fluig1] 17:17:21,968 ERROR [stderr] (Thread-87)     at com.totvs.technology.wcm//com.totvs.technology.wcm.WCMService.doStartUp(WCMService.java:512)
[Server:fluig1] 17:17:21,969 ERROR [stderr] (Thread-87)     at com.totvs.technology.wcm//com.totvs.technology.wcm.WCMService.access$000(WCMService.java:111)
[Server:fluig1] 17:17:21,970 ERROR [stderr] (Thread-87)     at com.totvs.technology.wcm//com.totvs.technology.wcm.WCMService$StandAloneScanner.run(WCMService.java:1073)
[Server:fluig1] 17:17:21,970 ERROR [stderr] (Thread-87)     at java.base/java.lang.Thread.run(Thread.java:834)
[Server:fluig1] 17:17:21,994 ERROR [com.totvs.technology.wcm.WCMService] (Thread-87)    WCM MOD SERV STARTUP FAILED

O banco é MySQL, versão 5.7. Foi criado um usuário com todas as permissões (GRANT ALL PRIVILEGES) para os databases mysql e fluig (database da instalação)

Alguém sabe se falta alguma configuração específica, seja na instalação do Fluig ou no SGDB?

Obrigado.

compartilhar
  1. Você vai ver essas setas em qualquer página de pergunta. Com elas, você pode dizer se uma pergunta ou uma resposta foram relevantes ou não.
  2. Edite sua pergunta ou resposta caso queira alterar ou adicionar detalhes.
  3. Caso haja alguma dúvida sobre a pergunta, adicione um comentário. O espaço de respostas deve ser utilizado apenas para responder a pergunta.
  4. Se o autor da pergunta marcar uma resposta como solucionada, esta marca aparecerá.
  5. Clique aqui para mais detalhes sobre o funcionamento do fluig Forum!

1 resposta

Não é a resposta que estava procurando? Procure outras perguntas com as tags instalacao tabela erro inicializacao ou faça a sua própria pergunta.