[jboss-jira] [JBoss JIRA] (WFLY-12689) WAR deployment fails due to NPE when both MBean and persistence-unit are packaged

Romain Pelisse (Jira) issues at jboss.org
Mon Nov 4 08:17:00 EST 2019


     [ https://issues.jboss.org/browse/WFLY-12689?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Romain Pelisse updated WFLY-12689:
----------------------------------
    Labels: downstream_dependency  (was: )


> WAR deployment fails due to NPE when both MBean and persistence-unit are packaged
> ---------------------------------------------------------------------------------
>
>                 Key: WFLY-12689
>                 URL: https://issues.jboss.org/browse/WFLY-12689
>             Project: WildFly
>          Issue Type: Bug
>          Components: JMX, JPA / Hibernate, Server
>    Affects Versions: 18.0.0.Final
>            Reporter: Masafumi Miura
>            Assignee: Masafumi Miura
>            Priority: Major
>              Labels: downstream_dependency
>             Fix For: 19.0.0.Beta1
>
>
> When a web application contains both MBean (jboss-service.xml) and persistence-unit (persistence.xml), the WAR deployment fails due to the following NullPointerException:
> {code}
> 11:51:03,041 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.deployment.unit."helloworld-mbean-webapp.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."helloworld-mbean-webapp.war".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment "helloworld-mbean-webapp.war"
> 	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:183)
> 	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:1982)
> 	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.service.MBeanServices.<init>(MBeanServices.java:107)
> 	at org.jboss.as.service.ParsedServiceDeploymentProcessor.addServices(ParsedServiceDeploymentProcessor.java:124)
> 	at org.jboss.as.service.ParsedServiceDeploymentProcessor.deploy(ParsedServiceDeploymentProcessor.java:109)
> 	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:176)
> 	... 8 more
> ...(snip)...
> 11:51:03,687 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "helloworld-mbean-webapp.war")]) - failure description: {
>     "WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"helloworld-mbean-webapp.war\".INSTALL" => "WFLYSRV0153: Failed to process phase INSTALL of deployment \"helloworld-mbean-webapp.war\"
>     Caused by: java.lang.NullPointerException"},
>     "WFLYCTL0412: Required services that are not installed:" => [
>         "jboss.deployment.unit.\"helloworld-mbean-webapp.war\".WeldStartService",
>         "jboss.deployment.unit.\"helloworld-mbean-webapp.war\".beanmanager"
>     ],
>     "WFLYCTL0180: Services with missing/unavailable dependencies" => [
>         "jboss.deployment.unit.\"helloworld-mbean-webapp.war\".weld.weldClassIntrospector is missing [jboss.deployment.unit.\"helloworld-mbean-webapp.war\".WeldStartService, jboss.deployment.unit.\"helloworld-mbean-webapp.war\".beanmanager]",
>         "jboss.deployment.unit.\"helloworld-mbean-webapp.war\".batch.artifact.factory is missing [jboss.deployment.unit.\"helloworld-mbean-webapp.war\".beanmanager]"
>     ]
> }
> {code}
> This NPE happens because [WebNonTxEmCloserAction#dependencies()|https://github.com/wildfly/wildfly/blob/18.0.0.Final/jpa/subsystem/src/main/java/org/jboss/as/jpa/interceptor/WebNonTxEmCloserAction.java#L57-L59] returns null. It should return Collections.emptySet() instead of null.



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jboss-jira mailing list