Eu tenho tido o maior momento de implantar um aplicativo corporativo no Jboss. Na minha opinião, o Jboss é ridiculamente intuitivo e impossível de configurar sem ajuda extensiva. Estou migrando para o JBoss porque glassfish parou seu suporte comercial. Eu tenho tentando implantar o aplicativo corporativo por (isso é EAP7 btw): Implantações - > grupos de servidores - > main-servergroup- > add Quando clico em implantar, recebo este erro:
Unexpected HTTP response: 500 Request { "operation" => "add", "address" => [ ("server-group" => "main-server-group"), ("deployment" => "FlcErp_060116.1.ear") ], "runtime-name" => "FlcErp_060116.1.ear", "enabled" => true } Response Internal Server Error { "outcome" => "failed", "result" => undefined, "failure-description" => {"WFLYDC0074: Operation failed or was rolled back on all servers. Server failures:" => {"server-group" => {"main-server-group" => {"host" => {"master" => { "server-one" => {"WFLYCTL0180: Services with missing/unavailable dependencies" => [ "jboss.persistenceunit.\"FlcErp_060116.1.ear/FlcErp_v2-ejb.jar#FlcErp-enterprisePU\" is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/PlantTwoScanner-ejb.jar#PlantTwoScanner-ejbPU\" is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/PlantFourScanner-ejb.jar#PlantFourScanner-ejbPU\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/FlcErp_v2-ejb.jar#FlcErp-enterprisePU\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/PlantFourScanner-ejb.jar#PlantFourScanner-ejbPU\" is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/PlantTwoScanner-ejb.jar#PlantTwoScanner-ejbPU\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jdbc.erp]" ]}, "server-two" => {"WFLYCTL0180: Services with missing/unavailable dependencies" => [ "jboss.persistenceunit.\"FlcErp_060116.1.ear/PlantFourScanner-ejb.jar#PlantFourScanner-ejbPU\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/FlcErp_v2-ejb.jar#FlcErp-enterprisePU\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/PlantTwoScanner-ejb.jar#PlantTwoScanner-ejbPU\" is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/PlantTwoScanner-ejb.jar#PlantTwoScanner-ejbPU\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/PlantFourScanner-ejb.jar#PlantFourScanner-ejbPU\" is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/FlcErp_v2-ejb.jar#FlcErp-enterprisePU\" is missing [jboss.naming.context.java.jdbc.erp]" ]} }}}}}}, "rolled-back" => true, "server-groups" => {"main-server-group" => {"host" => {"master" => { "server-one" => {"response" => { "outcome" => "failed", "failure-description" => {"WFLYCTL0180: Services with missing/unavailable dependencies" => [ "jboss.persistenceunit.\"FlcErp_060116.1.ear/FlcErp_v2-ejb.jar#FlcErp-enterprisePU\" is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/PlantTwoScanner-ejb.jar#PlantTwoScanner-ejbPU\" is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/PlantFourScanner-ejb.jar#PlantFourScanner-ejbPU\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/FlcErp_v2-ejb.jar#FlcErp-enterprisePU\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/PlantFourScanner-ejb.jar#PlantFourScanner-ejbPU\" is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/PlantTwoScanner-ejb.jar#PlantTwoScanner-ejbPU\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jdbc.erp]" ]}, "rolled-back" => true }}, "server-two" => {"response" => { "outcome" => "failed", "failure-description" => {"WFLYCTL0180: Services with missing/unavailable dependencies" => [ "jboss.persistenceunit.\"FlcErp_060116.1.ear/PlantFourScanner-ejb.jar#PlantFourScanner-ejbPU\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/FlcErp_v2-ejb.jar#FlcErp-enterprisePU\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/PlantTwoScanner-ejb.jar#PlantTwoScanner-ejbPU\" is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/PlantTwoScanner-ejb.jar#PlantTwoScanner-ejbPU\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/PlantFourScanner-ejb.jar#PlantFourScanner-ejbPU\" is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/FlcErp_v2-ejb.jar#FlcErp-enterprisePU\" is missing [jboss.naming.context.java.jdbc.erp]" ]}, "rolled-back" => true }} }}}} }
Eu pouca pesquisa retornou que isso é devido a um driver ausente que eu tenho tentado corrigir sem sucesso. Eu adicionei isso ao /opt/JBoss7/domain/configuration/domain.xml:
<datasource
jndi-name="java:/erp" pool-name="erpPool"
enabled="true" jta="true"
use-java-context="true" use-ccm="true">
<connection-url>
jdbc:mysql://localhost:3306/erp
</connection-url>
<driver>
mysql
</driver>
<security>
<user-name>
root
</user-name>
<password>
flc_admin14114
</password>
</security>
<statement>
<prepared-statement-cache-size>
100
</prepared-statement-cache-size>
<share-prepared-statements/>
</statement>
</datasource>
Além de registrar o driver:
<driver name = "mysql" module = "com.mysql" />
Eu também tentei implantar meu driver mysql como aplicativo (da mesma forma que implantei o aplicativo corporativo) Ainda sem sorte, por favor, não me vincule a sites, eu já vi todos eles.
Editar: Apenas tentei implantar meu dataSource novamente e recebi este erro:
Message
Tue Jun 07 10:00:26 GMT-700 2016
Unknown error
Unexpected HTTP response: 500
Request
{
"operation" => "composite",
"address" => [],
"steps" => [
{
"password" => "flc_admin14114",
"enabled" => true,
"jndi-name" => "java:/MysqlDataSource",
"user-name" => "admin",
"pool-name" => "MysqlDataSource_Pool",
"driver-class" => "com.mysql.jdbc.Driver",
"driver-name" => "mysql",
"valid-connection-checker-class-name" => "org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker",
"background-validation" => true,
"exception-sorter-class-name" => "org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLExceptionSorter",
"use-ccm" => true,
"name" => "MysqlDataSource",
"operation" => "add",
"address" => [
("profile" => "Freres_Admin"),
("subsystem" => "datasources"),
("xa-data-source" => "MysqlDataSource")
]
},
{
"address" => [
("profile" => "Freres_Admin"),
("subsystem" => "datasources"),
("xa-data-source" => "MysqlDataSource"),
("xa-datasource-properties" => "ServerName")
],
"operation" => "add",
"value" => "localhost"
},
{
"address" => [
("profile" => "Freres_Admin"),
("subsystem" => "datasources"),
("xa-data-source" => "MysqlDataSource"),
("xa-datasource-properties" => "DatabaseName")
],
"operation" => "add",
"value" => "erp"
}
]
}
Response
Internal Server Error
{
"outcome" => "failed",
"failure-description" => {"domain-failure-description" => {"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => "WFLYCTL0158: Operation handler failed: java.lang.IllegalStateException: WFLYCTL0363: Capability 'org.wildfly.data-source.MysqlDataSource' is already registered in context 'profile=Freres_Admin'."}}},
"rolled-back" => true
}
Tags java configuration jboss redhat