search cancel

WildFly error: Unable to build Hibernate SessionFactory

book

Article ID: 254726

calendar_today

Updated On:

Products

CA Virtual Network Assurance DX NetOps

Issue/Introduction

VNA server was rebooted per RHEL patch cycle.  WildFly started, but server.log shows the following error:

WFLYCTL0186:   Services which failed to start:      service jboss.persistenceunit."core-22.2.3-RELEASE.war#brokerPU": javax.persistence.PersistenceException: [PersistenceUnit: brokerPU] Unable to build Hibernate SessionFactory
      service jboss.persistenceunit."oc-22.2.3-RELEASE.ear/oc-ejb-22.2.3-RELEASE.jar#ocPU": javax.persistence.PersistenceException: [PersistenceUnit: ocPU] Unable to build Hibernate SessionFactory

DX NetOps Portal shows VNA as unavailable.

DX NetOps Virtual Network Assurance (VNA) WildFly service fails to start. The OS was patched and the system rebooted. After that the WildFly service fails to start. DX NetOps Performance Management Portal web UI shows the VNA host as unreachable.

Environment

All supported DX NetOps Virtual Network Assurance (VNA) releases

Cause

MySql database and it's related services are down.

Resolution

Start the MySql database and the WildFly service is again able to start and remain running.

Defect DE552195 has been submitted to engineering. It requests they make the following change a part of the OOTB product. This article will be updated when more details are available regarding the release the changes will be included in. Last updated November 30, 2022.

As a way to resolve this the following changes can be made.

  1. Stop the wildfly and mysql services.
  2. Add the line bolded below to the wildfly.service file. The other lines should already be present.
    [Unit]
    Description=The WildFly Application Server
    After=syslog.target [syslog.target] network.target [network.target]
    Before=httpd.service
    Wants=mysql.service
  3. Start the wildfly service only.
  4. Confirm the MySQL service is started by the wildfly service start.