Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

persistence unit problem on upgrade from wildfly 35 to 36

92 views
Skip to first unread message

Stephen Sill II

unread,
Apr 15, 2025, 11:25:41 AMApr 15
to WildFly
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?

Scott Marlow

unread,
Apr 15, 2025, 2:38:09 PMApr 15
to Stephen Sill II, WildFly
Thanks for reporting this!  Could you please open a tracking issue via https://issues.redhat.com/browse/WFLY

If you can create a tracking issue (with component = jpa), I'd like to see more of the previous output (related to jpa/persistence) just in case there are any clues as to why this happened.  So please add more of the console (or server.log output) that preceded the error.

Please respond here with the created issue number.  If you cannot create an issue for whatever reason, please send the additional output here.

Thank you,
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 visit https://groups.google.com/d/msgid/wildfly/4110d2fe-5248-4ce0-9a88-504702f6bbd1n%40googlegroups.com.

Stephen Sill II

unread,
Apr 15, 2025, 4:34:18 PMApr 15
to WildFly
I have opened the ticket
https://issues.redhat.com/browse/WFLY-20564

I'm going to switch back to that branch and capture the requested additional logs and attach to that ticket

Stephen Sill II

unread,
Apr 15, 2025, 4:41:39 PMApr 15
to WildFly
I have attached the additional server.log output to the ticket

Stephen Sill II

unread,
Apr 17, 2025, 12:14:26 PMApr 17
to WildFly
that module thing got me past the issue but now I'm seeing odd behavior with the oidc client continually losing the notion that the user is logged in.  I'll have to dig into that further.
Reply all
Reply to author
Forward
0 new messages