]
Arcadiy Ivanov updated JBOSGI-793:
----------------------------------
Git Pull Request:
Can't deploy wab fragment
-------------------------
Key: JBOSGI-793
URL:
https://issues.jboss.org/browse/JBOSGI-793
Project: JBoss OSGi
Issue Type: Bug
Components: wildfly
Affects Versions: JBossOSGI 2.5.0
Reporter: Roman Smushkevich
Assignee: Arcadiy Ivanov
Attachments: com.mrs.budget.portal.jar, com.mrs.budget.portal.resources.jar,
standalone.xml
If you try to deploy a wab fragment to already deployed wab comes exception:
{code:java}
00:26:42,178 INFO [org.jboss.osgi.framework] (MSC service thread 1-7) JBOSGI011001:
Bundle installed: com.mrs.budget.portal:1.0.0
00:26:42,180 INFO [org.jboss.osgi.framework] (MSC service thread 1-8) JBOSGI011001:
Bundle installed: com.mrs.budget.portal.resources:1.0.0
00:26:50,267 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001:
Failed to start service
jboss.deployment.unit."com.mrs.budget.portal.resources.jar".POST_MODULE:
org.jboss.msc.service.StartException in service
jboss.deployment.unit."com.mrs.budget.portal.resources.jar".POST_MODULE:
WFLYSRV0153: Failed to process phase POST_MODULE of deployment
"com.mrs.budget.portal.resources.jar"
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:154)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at
org.jboss.as.webservices.deployers.WSClassVerificationProcessor.deploy(WSClassVerificationProcessor.java:75)
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
... 5 more
00:26:55,362 INFO [org.wildfly.extension.undertow] (MSC service thread 1-8) WFLYUT0021:
Registered web context: /budget
00:26:55,374 INFO [org.jboss.osgi.framework] (MSC service thread 1-8) JBOSGI011002:
Bundle started: com.mrs.budget.portal:1.0.0
00:26:55,376 ERROR [org.jboss.as.controller.management-operation] (Controller Boot
Thread) WFLYCTL0013: Operation ("deploy") failed - address:
([("deployment" => "com.mrs.budget.portal.resources.jar")]) -
failure description: {"WFLYCTL0080: Failed services" =>
{"jboss.deployment.unit.\"com.mrs.budget.portal.resources.jar\".POST_MODULE"
=> "org.jboss.msc.service.StartException in service
jboss.deployment.unit.\"com.mrs.budget.portal.resources.jar\".POST_MODULE:
WFLYSRV0153: Failed to process phase POST_MODULE of deployment
\"com.mrs.budget.portal.resources.jar\"
Caused by: java.lang.NullPointerException"}}
00:26:55,393 INFO [org.jboss.as.server] (ServerService Thread Pool -- 36) WFLYSRV0010:
Deployed "com.mrs.budget.portal.resources.jar" (runtime-name :
"com.mrs.budget.portal.resources.jar")
00:26:55,394 INFO [org.jboss.as.server] (ServerService Thread Pool -- 36) WFLYSRV0010:
Deployed "com.mrs.budget.portal.jar" (runtime-name :
"com.mrs.budget.portal.jar")
00:26:55,397 INFO [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183:
Service status report
WFLYCTL0186: Services which failed to start: service
jboss.deployment.unit."com.mrs.budget.portal.resources.jar".POST_MODULE:
org.jboss.msc.service.StartException in service
jboss.deployment.unit."com.mrs.budget.portal.resources.jar".POST_MODULE:
WFLYSRV0153: Failed to process phase POST_MODULE of deployment
"com.mrs.budget.portal.resources.jar"
{code}
Debugging showd, that the deployment of wab Fragment tryes to pass through WS
verification, that needs a deployment unit module:
{code:java}
@Override
public void deploy(DeploymentPhaseContext phaseContext) throws
DeploymentUnitProcessingException {
final DeploymentUnit unit = phaseContext.getDeploymentUnit();
final JAXWSDeployment wsDeployment = unit.getAttachment(JAXWS_ENDPOINTS_KEY);
if (wsDeployment != null) {
final Module module = unit.getAttachment(Attachments.MODULE);
final DeploymentReflectionIndex deploymentReflectionIndex = unit
.getAttachment(org.jboss.as.server.deployment.Attachments.REFLECTION_INDEX);
final ClassLoader moduleClassLoader = module.getClassLoader();
for (AbstractEndpoint pojoEndpoint : wsDeployment.getPojoEndpoints()) {
verifyEndpoint(pojoEndpoint, moduleClassLoader,
deploymentReflectionIndex);
}
for (AbstractEndpoint ejbEndpoint : wsDeployment.getEjbEndpoints()) {
verifyEndpoint(ejbEndpoint, moduleClassLoader,
deploymentReflectionIndex);
}
verifyApacheCXFModuleDependencyRequirement(unit);
}
}
{code}
but according to ModelManager - fragment is not a module