I have been historically pretty quick to upgrade from one wildfly release to to the next and this time was no different.
I have this proccess pretty streamlined for my app and it normally takes me about 30-60 min.
I did my normal process this time but when my wildfly container comes up, I get this early in the process
2025-04-15 15:17:31,749 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.deployment.unit."postgresql-42.7.5.jar".FIRST_MODULE_USE: org.jboss.msc.service.StartException in service jboss.deployment.unit."postgresql-42.7.5.jar".FIRST_MODULE_USE: WFLYSRV0153: Failed to process phase FIRST_MODULE_USE of deployment "postgresql-42.7.5.jar"
at org.jboss...@28.0.0.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:172)
at org.jb...@1.5.5.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1617)
at org.jb...@1.5.5.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1580)
at org.jb...@1.5.5.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1438)
at org.jbos...@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jbos...@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
at org.jbos...@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jbos...@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException: Cannot invoke "org.jboss.as.jpa.config.PersistenceUnitsInApplication.getPersistenceUnitHolders()" because "persistenceUnitsInApplication" is null
at org.jbos...@36.0.0.Final//org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.nextPhaseDependsOnPersistenceUnit(PersistenceUnitServiceHandler.java:1025)
at org.jbos...@36.0.0.Final//org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.deploy(PersistenceUnitServiceHandler.java:118)
at org.jbos...@36.0.0.Final//org.jboss.as.jpa.processor.PersistenceBeginInstallProcessor.deploy(PersistenceBeginInstallProcessor.java:35)
at org.jboss...@28.0.0.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:165)
... 8 more
This happens even if I update the persistence.xml to 3.1 from 2.1
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="3.1" xmlns="https://jakarta.ee/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/persistence
https://jakarta.ee/xml/ns/persistence/persistence_3_1.xsd">
<persistence-unit name="jlogiPU">
<jta-data-source>java:jboss/datasources/jlogiDS</jta-data-source>
<!-- list of JPA classes, these aren't strictly required
since modern hibernate auto-discovers based on @Entity annotations
-->
<!-- properties for configurating this persistence unit -->
<properties>
<property name="hibernate.hbm2ddl.auto" value="update"/>
<property name="jakarta.persistence.schema-generation.create-source" value="metadata"/>
<property name="jakarta.persistence.schema-generation.drop-source" value="metadata"/>
<!-- USE THIS ONLY FOR DEBUGGING!-->
<property name="hibernate.show_sql" value="false"/>
<!--<property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.JBossStandAloneJtaPlatform"/>-->
<!-- according to the wildfly startup the following prop is no longer required, commenting out for now-->
<!-- <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>-->
<property name="hibernate.jdbc.batch_size" value="800"/>
</properties>
</persistence-unit>
</persistence>
I was looking at the release notes for wildfly 36 and I saw a few things related to persistence.
I've been using the same scheme to update wildfly releases for quite a number of releases and they normally go off without a hitch.
Any thoughts?