WFLYCTL0412: Required services that are not installed

464 views
Skip to first unread message

Cezar Apulchro

unread,
Oct 23, 2023, 9:54:53 AM10/23/23
to WildFly

I am trying to deploy my application after change my persistence.xml but I am receiving errors relative to my persistence.

I do the test connection to my MySQL DB in HAL Management Console and the test is made as success.

persistence:

<?xml version="1.0" encoding="UTF-8"?> <persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"> <persistence-unit name="itcmedbr_PU" transaction-type="RESOURCE_LOCAL"> <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider> <jta-data-source>java:MySqlDS</jta-data-source> <exclude-unlisted-classes>false</exclude-unlisted-classes> <properties> <property name="jakarta.persistence.jdbc.driver" value="com.mysql.cj.jdbc.Driver"/> <property name="jakarta.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/db_medical?zeroDateTimeBehavior=CONVERT_TO_NULL"/> <property name="jakarta.persistence.jdbc.user" value="root"/> <property name="jakarta.persistence.jdbc..password" value="root"/> <!-- Configurações específicas do Hibernate --> <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/> <property name="hibernate.hbm2ddl.auto" value="update"/> <property name="hibernate.show_sql" value="true"/> <property name="hibernate.format_sql" value="true"/> </properties> </persistence-unit> </persistence>

definition of datasource and driver in standalone:

<datasource jndi-name="java:jboss/MySqlDS" pool-name="MySqlDS"> <connection-url>jdbc:mysql://localhost:3306/db_medical</connection-url> <driver-class>com.mysql.cj.jdbc.Driver</driver-class> <driver>mysql</driver> <security> <user-name>root</user-name> <password>root</password> </security> <validation> <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker"/> <validate-on-match>true</validate-on-match> <background-validation>false</background-validation> <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLExceptionSorter"/> </validation> </datasource> <driver name="mysql" module="com.mysql"> <driver-class>com.mysql.cj.jdbc.Driver</driver-class> <xa-datasource-class>com.mysql.cj.jdbc.MysqlXADataSource</xa-datasource-class> </driver>

error log:

08:48:34,097 INFO [org.jboss.as.repository] (External Management Request Threads -- 1) WFLYDR0001: Content added at location C:\Users\Ilo Gabriel\eclipse-workspace\wildfly-27.0.1.Final\standalone\data\content\ac\a7e4b6ad429643a5813552677f49ab30f6fdb9\content 08:48:34,188 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 100) WFLYUT0022: Unregistered web context: '/itcmedbr' from server 'default-server' 08:48:34,370 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 218) WFLYJPA0011: Stopping Persistence Unit (phase 2 of 2) Service 'itcmedbr.war#itcmedbr_PU' 08:48:34,393 INFO [org.hibernate.orm.beans] (ServerService Thread Pool -- 218) HHH10005004: Stopping BeanContainer : org.hibernate.resource.beans.container.internal.CdiBeanContainerExtendedAccessImpl@5a4ec8bd 08:48:34,408 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 218) WFLYJPA0011: Stopping Persistence Unit (phase 1 of 2) Service 'itcmedbr.war#itcmedbr_PU' 08:48:35,232 INFO [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0028: Stopped deployment itcmedbr.war (runtime-name: itcmedbr.war) in 1116ms 08:48:35,254 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0027: Starting deployment of "itcmedbr.war" (runtime-name: "itcmedbr.war") 08:48:48,146 INFO [org.jboss.as.jpa] (MSC service thread 1-7) WFLYJPA0002: Read persistence.xml for itcmedbr_PU 08:48:48,840 INFO [org.jipijapa] (MSC service thread 1-6) JIPIORMV6020260: Second level cache enabled for itcmedbr.war#itcmedbr_PU 08:48:48,880 INFO [org.infinispan.CONTAINER] (ServerService Thread Pool -- 218) ISPN000556: Starting user marshaller 'org.wildfly.clustering.infinispan.marshalling.jboss.JBossMarshaller' 08:48:49,127 INFO [org.jboss.weld.deployer] (MSC service thread 1-6) WFLYWELD0003: Processing weld deployment itcmedbr.war 08:48:49,502 WARN [org.wildfly.extension.microprofile.opentracing] (MSC service thread 1-6) WFLYTRACEXT0012: No Jaeger endpoint or sender-binding configured. Installing a no-op sender 08:48:49,507 INFO [io.jaegertracing.internal.JaegerTracer] (MSC service thread 1-6) No shutdown hook registered: Please call close() manually on application shutdown. 08:48:49,509 INFO [org.wildfly.microprofile.opentracing.smallrye] (MSC service thread 1-6) WFLYTRAC0001: Tracer initialized: JaegerTracer(version=Java-1.6.0, serviceName=itcmedbr.war, reporter=RemoteReporter(sender=NoopSender(), closeEnqueueTimeout=1000), sampler=ConstSampler(decision=true, tags={sampler.type=const, sampler.param=true}), tags={hostname=DESKTOP-MOJECP9, jaeger.version=Java-1.6.0, ip=192.168.100.185}, zipkinSharedRpcSpan=false, expandExceptionLogs=false, useTraceId128Bit=false) 08:48:49,723 INFO [org.jipijapa] (MSC service thread 1-5) JIPIORMV6020260: Second level cache enabled for itcmedbr.war#itcmedbr_PU 08:48:49,949 ERROR [org.jboss.as.controller.management-operation] (External Management Request Threads -- 1) WFLYCTL0013: Operation ("full-replace-deployment") failed - address: ([]) - failure description: { "WFLYCTL0412: Required services that are not installed:" => ["jboss.naming.context.java.jboss.java:MySqlDS"], "WFLYCTL0180: Services with missing/unavailable dependencies" => [ "jboss.persistenceunit.\"itcmedbr.war#itcmedbr_PU\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jboss.java:MySqlDS]", "jboss.persistenceunit.\"itcmedbr.war#itcmedbr_PU\" is missing [jboss.naming.context.java.jboss.java:MySqlDS]" ] } 08:48:49,951 ERROR [org.jboss.as.controller.management-operation] (External Management Request Threads -- 1) WFLYCTL0013: Operation ("full-replace-deployment") failed - address: ([]) - failure description: { "WFLYCTL0412: Required services that are not installed:" => ["jboss.naming.context.java.jboss.java:MySqlDS"], "WFLYCTL0180: Services with missing/unavailable dependencies" => [ "jboss.persistenceunit.\"itcmedbr.war#itcmedbr_PU\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jboss.java:MySqlDS]", "jboss.persistenceunit.\"itcmedbr.war#itcmedbr_PU\" is missing [jboss.naming.context.java.jboss.java:MySqlDS]" ] } 08:48:50,598 INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) WFLYSRV0028: Stopped deployment itcmedbr.war (runtime-name: itcmedbr.war) in 645ms 08:48:50,600 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0027: Starting deployment of "itcmedbr.war" (runtime-name: "itcmedbr.war") 08:48:50,600 ERROR [org.jboss.as.server] (External Management Request Threads -- 1) WFLYSRV0014: Replacement of deployment "itcmedbr.war" by deployment "itcmedbr.war" was rolled back with the following failure message: { "WFLYCTL0412: Required services that are not installed:" => ["jboss.naming.context.java.jboss.java:MySqlDS"], "WFLYCTL0180: Services with missing/unavailable dependencies" => [ "jboss.persistenceunit.\"itcmedbr.war#itcmedbr_PU\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jboss.java:MySqlDS]", "jboss.persistenceunit.\"itcmedbr.war#itcmedbr_PU\" is missing [jboss.naming.context.java.jboss.java:MySqlDS]" ] } 08:49:04,360 INFO [org.jboss.as.jpa] (MSC service thread 1-1) WFLYJPA0002: Read persistence.xml for itcmedbr_PU 08:49:05,174 INFO [org.jipijapa] (MSC service thread 1-6) JIPIORMV6020260: Second level cache enabled for itcmedbr.war#itcmedbr_PU 08:49:05,210 INFO [org.infinispan.CONTAINER] (ServerService Thread Pool -- 218) ISPN000556: Starting user marshaller 'org.wildfly.clustering.infinispan.marshalling.jboss.JBossMarshaller' 08:49:05,266 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 245) WFLYJPA0010: Starting Persistence Unit (phase 1 of 2) Service 'itcmedbr.war#itcmedbr_PU' 08:49:05,268 INFO [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool -- 245) HHH000204: Processing PersistenceUnitInfo [name: itcmedbr_PU] 08:49:05,295 WARN [org.hibernate.orm.deprecation] (ServerService Thread Pool -- 245) HHH90000021: Encountered deprecated setting [javax.persistence.sharedCache.mode], use [jakarta.persistence.sharedCache.mode] instead 08:49:07,622 INFO [org.jboss.weld.deployer] (MSC service thread 1-8) WFLYWELD0003: Processing weld deployment itcmedbr.war 08:49:07,922 WARN [org.wildfly.extension.microprofile.opentracing] (MSC service thread 1-8) WFLYTRACEXT0012: No Jaeger endpoint or sender-binding configured. Installing a no-op sender 08:49:07,931 INFO [io.jaegertracing.internal.JaegerTracer] (MSC service thread 1-8) No shutdown hook registered: Please call close() manually on application shutdown. 08:49:07,932 INFO [org.wildfly.microprofile.opentracing.smallrye] (MSC service thread 1-8) WFLYTRAC0001: Tracer initialized: JaegerTracer(version=Java-1.6.0, serviceName=itcmedbr.war, reporter=RemoteReporter(sender=NoopSender(), closeEnqueueTimeout=1000), sampler=ConstSampler(decision=true, tags={sampler.type=const, sampler.param=true}), tags={hostname=DESKTOP-MOJECP9, jaeger.version=Java-1.6.0, ip=192.168.100.185}, zipkinSharedRpcSpan=false, expandExceptionLogs=false, useTraceId128Bit=false) 08:49:08,081 INFO [org.jipijapa] (MSC service thread 1-4) JIPIORMV6020260: Second level cache enabled for itcmedbr.war#itcmedbr_PU 08:49:08,251 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 245) WFLYJPA0010: Starting Persistence Unit (phase 2 of 2) Service 'itcmedbr.war#itcmedbr_PU' 08:49:08,266 INFO [SQL dialect] (ServerService Thread Pool -- 245) HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect 08:49:08,278 INFO [org.hibernate.envers.boot.internal.EnversServiceImpl] (ServerService Thread Pool -- 245) Envers integration enabled? : true 08:49:10,084 INFO [jakarta.enterprise.resource.webcontainer.faces.config] (ServerService Thread Pool -- 286) Inicializando Mojarra 4.0.0.SP01 para o contexto '/itcmedbr' 08:49:11,832 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 286) WFLYUT0021: Registered web context: '/itcmedbr' for server 'default-server' 08:49:11,974 INFO [org.jboss.as.repository] (External Management Request Threads -- 1) WFLYDR0002: Content removed from location C:\Users\Ilo Gabriel\eclipse-workspace\wildfly-27.0.1.Final\standalone\data\content\ac\a7e4b6ad429643a5813552677f49ab30f6fdb9\content

I appreciate any assistance. Thanks and best regards.

Scott Marlow

unread,
Oct 23, 2023, 10:02:59 AM10/23/23
to Cezar Apulchro, WildFly
Can you please show us what the persistence.xml was set to when it worked.

Scott
> --
> You received this message because you are subscribed to the Google Groups "WildFly" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to wildfly+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/wildfly/4cf729e9-3b8f-486b-b872-f6f05b0502b3n%40googlegroups.com.

Cezar Apulchro

unread,
Oct 23, 2023, 10:20:17 AM10/23/23
to WildFly
My application never was worked I changed my persistence and standalone.xml to read my MySQL DB, before the change I don't received any type of error and I also didn't have access to my db now I've this error that you can see in the error log.
Thanks by assistance.

Paul Ferraro

unread,
Oct 23, 2023, 12:46:07 PM10/23/23
to WildFly
The jta-data-source JNDI name in your persistence.xml "java:MySqlDS" does not match the jndi-name of your DataSource "java:jboss/MySqlDS".

Cezar Apulchro

unread,
Oct 23, 2023, 5:08:34 PM10/23/23
to WildFly
My IDE Eclipse carried me to error, when I write in my persistence correct way the eclipse underlines the word jboss in red and when I point to word eclipse show that "The word 'jboss' is not correctly spelled". Now I doing the deploy of my application.
Thanks guys.
Reply all
Reply to author
Forward
0 new messages