Bug 1539985

Summary: [GSS](6.4.x) Deployment fails with "IllegalArgumentException: Empty module specification" when Dependencies is empty in a jars manifest
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Masafumi Miura <mmiura>
Component: ServerAssignee: Radovan Netuka <rnetuka>
Status: CLOSED CURRENTRELEASE QA Contact: Peter Mackay <pmackay>
Severity: unspecified Docs Contact: eap-docs <eap-docs>
Priority: unspecified    
Version: 6.4.18CC: bmaxwell, jason.greene, pmackay, rnetuka, thofman
Target Milestone: CR1   
Target Release: EAP 6.4.22   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-19 12:43:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1613417    

Description Masafumi Miura 2018-01-30 01:21:12 UTC
### Description of problem:

Deployment fails with "IllegalArgumentException: Empty module specification" when Dependencies is empty in a jars manifest.

~~~
ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.unit."example.war".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."example.war".STRUCTURE: JBAS018733: Failed to process phase STRUCTURE of deployment "example.war"
	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:184) [jboss-as-server-7.5.18.Final-redhat-1.jar:7.5.18.Final-redhat-1]
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2064) [jboss-msc-1.1.7.SP1-redhat-1.jar:1.1.7.SP1-redhat-1]
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1987) [jboss-msc-1.1.7.SP1-redhat-1.jar:1.1.7.SP1-redhat-1]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_161]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_161]
	at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_161]
Caused by: java.lang.IllegalArgumentException: Empty module specification
	at org.jboss.modules.ModuleIdentifier.fromString(ModuleIdentifier.java:169) [jboss-modules.jar:1.3.10.Final-redhat-1]
	at org.jboss.as.server.deployment.module.ManifestDependencyProcessor.deploy(ManifestDependencyProcessor.java:92) [jboss-as-server-7.5.18.Final-redhat-1.jar:7.5.18.Final-redhat-1]
	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:177) [jboss-as-server-7.5.18.Final-redhat-1.jar:7.5.18.Final-redhat-1]
	... 5 more
~~~


### How reproducible:

Anytime 


### Steps to Reproduce:

1. Put the attached reproducer in https://issues.jboss.org/browse/WFLY-232 to deployments folder
2. Start JBoss EAP 6


### Actual results:

Deployment fails with "IllegalArgumentException: Empty module specification".


### Expected results:

The application is deployed successfully without the exception.


### Additional info:

Same issue was reported as https://issues.jboss.org/browse/WFLY-232, which was already fixed in the upstream and JBoss EAP 7.x by https://github.com/wildfly/wildfly/commit/fbfdb70e948d08d1b02e0b1321bec5a47a1176b8

Please backport the fix to the EAP 6 branch.

Comment 1 Anup Kumar Dey 2018-01-30 11:20:24 UTC
PR sent: https://github.com/jbossas/jboss-eap/pull/3080

Comment 4 Anup Kumar Dey 2018-01-31 04:53:28 UTC
I closed the PR: https://github.com/jbossas/jboss-eap/pull/3080

Below PR is cherry picked from commit fbfdb70e948d08d1b02e0b1321bec5a47a1176b8

https://github.com/jbossas/jboss-eap/pull/3081

Comment 6 Tomas Hofman 2019-03-13 09:13:23 UTC
Commit is present in EAP 7.1.

Comment 7 Peter Mackay 2019-05-08 20:24:55 UTC
Regression tests passed
Verified with EAP 6.4.22.CP.CR1