Bug 1184292

Summary: web.xml parser process cannot handle exception for xml file which does not have the encoding attribute
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Eiichi Nagai <enagai>
Component: WebAssignee: Tomas Hofman <thofman>
Status: CLOSED CURRENTRELEASE QA Contact: Radim Hatlapatka <rhatlapa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.3.2CC: bbaranow, cdewolf, jawilson, pjelinek, rsvoboda, thofman
Target Milestone: CR2   
Target Release: EAP 6.4.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-17 09:59:42 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: 1207953    

Description Eiichi Nagai 2015-01-21 00:37:36 UTC
Created attachment 982104 [details]
web.xml for reproducing

Description of problem:
When XMLStreamException occurs by web.xml parser process for xml file which does not have the encoding attribute, e.getLocation()[1] is null. We cannot find cause of exception by NullPointerException.

[1]
- org.jboss.as.web.deployment.WebParsingDeploymentProcessor.java
#115            } catch (XMLStreamException e) {
-> #116                throw new DeploymentUnitProcessingException(MESSAGES.failToParseXMLDescriptor(webXml, e.getLocation().getLineNumber(), e.getLocation().getColumnNumber()), e);
#117            } catch (IOException e) {
#118                throw new DeploymentUnitProcessingException(MESSAGES.failToParseXMLDescriptor(webXml), e);
#119            } 

Version-Release number of selected component (if applicable):
EAP 6.3.2

How reproducible:
Attached web.xml for reproducing.

Steps to Reproduce:
1. Create war application using attached web.xml.
2. Deploy war to EAP.
3. Start EAP.

Actual results:
You can confirm NullPointerException.

15:56:23,190 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.unit."test.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."test.war".PARSE: JBAS018733: Failed to process phase PARSE of deployment "test.war"
	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [jboss-as-server-7.4.2.Final-redhat-2.jar:7.4.2.Final-redhat-2]
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_71]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_71]
	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_71]
Caused by: java.lang.NullPointerException
	at org.jboss.as.web.deployment.WebParsingDeploymentProcessor.deploy(WebParsingDeploymentProcessor.java:116)
	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [jboss-as-server-7.4.2.Final-redhat-2.jar:7.4.2.Final-redhat-2]
	... 5 more

Comment 1 JBoss JIRA Server 2015-03-18 10:42:12 UTC
Tomas Hofman <thofman> updated the status of jira WFLY-4441 to Coding In Progress

Comment 2 Tomas Hofman 2015-04-03 09:46:12 UTC
PR: https://github.com/jbossas/jboss-eap/pull/2361

Comment 5 Rostislav Svoboda 2015-04-27 11:44:58 UTC
SET/GSS - please provide automated test (as discussed on triage) to increase CP throughput.
I will qa_ack afterwards or when the scope of CP01 is clear and we have enough seats.

Comment 6 Tomas Hofman 2015-04-27 13:26:50 UTC
Test case added to the PR.

Comment 7 Rostislav Svoboda 2015-04-28 15:17:48 UTC
qa_acking, thank you for the test

Comment 9 Pavel Jelinek 2015-05-15 12:14:54 UTC
Verified for EAP 6.4.1.CP.CR2.

Comment 10 Petr Penicka 2017-01-17 09:59:42 UTC
Retroactively bulk-closing issues from released EAP 6.4 cummulative patches.

Comment 11 Petr Penicka 2017-01-17 10:00:32 UTC
Retroactively bulk-closing issues from released EAP 6.4 cummulative patches.