'After migrating from Wildfly 12 to 22 getting NullPointerException on Startup

I tried to migrate my Wildfly from 12 to 22. After I run the migration tool I put my war-file into the deployments folder. But when I try to start it with the following command

./standalone.sh -c standalone-full.xml

I get the following error:

2021-08-24 12:23:54,295 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC000001: Failed to start service jboss.deployment.unit." .war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit." .war".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment " .war"
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:189)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
    at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
    at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
    at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.addJndiBinding(ModuleJndiBindingProcessor.java:279)
    at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.deploy(ModuleJndiBindingProcessor.java:202)
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:182)
    ... 8 more

2021-08-24 12:23:54,510 INFO  [org.infinispan.PERSISTENCE] (ServerService Thread Pool -- 88) ISPN000556: Starting user marshaller 'org.wildfly.clustering.infinispan.spi.marshalling.InfinispanProtoStreamMarshaller'
2021-08-24 12:23:55,053 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 88) WFLYCLINF0002: Started http-remoting-connector cache from ejb container
2021-08-24 12:23:55,294 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => " .war")]) - failure description: {
    "WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\" .war\".INSTALL" => "WFLYSRV0153: Failed to process phase INSTALL of deployment \" .war\"
    Caused by: java.lang.NullPointerException"},
    "WFLYCTL0412: Required services that are not installed:" => [
        "jboss.deployment.unit.\" .war\".WeldStartService",
        "jboss.deployment.unit.\" .war\".beanmanager"
    ],
    "WFLYCTL0180: Services with missing/unavailable dependencies" => [
        "jboss.deployment.unit.\" .war\".batch.artifact.factory is missing [jboss.deployment.unit.\" .war\".beanmanager]",
        "jboss.deployment.unit.\" .war\".weld.weldClassIntrospector is missing [jboss.deployment.unit.\" .war\".WeldStartService, jboss.deployment.unit.\" .war\".beanmanager]"
    ]
}

My standanlone-full.xml you can find here: https://pastebin.com/a5UZY1Su

Can anyone help me or do you need more informations?



Solution 1:[1]

I found the issue,

in my persistence.xml under the properties path, I had the following

<property name="jboss.entity.manager.jndi.name" value="java:comp/env/..." />

After removing this line, everything worked.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Nimal