Bug 1125421 - (6.4.0) Missing param-name in a web.xml causes NullPointerException during deployment
Summary: (6.4.0) Missing param-name in a web.xml causes NullPointerException during de...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Web
Version: 6.2.2
Hardware: All
OS: All
medium
medium
Target Milestone: DR4
: EAP 6.4.0
Assignee: baranowb
QA Contact: Michael Cada
URL:
Whiteboard:
Depends On:
Blocks: 1139626 1139636
TreeView+ depends on / blocked
 
Reported: 2014-07-31 19:04 UTC by Jay SenSharma
Modified: 2019-08-19 12:42 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1139636 (view as bug list)
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)
ContextParamNullDemo.war (2.38 KB, application/x-zip)
2014-08-03 12:33 UTC, Jay SenSharma
no flags Details


Links
System ID Priority Status Summary Last Updated
JBoss Issue Tracker WFLY-3699 Major Resolved Missing param-name in a web.xml causes NullPointerException during deployment 2015-12-30 08:32:16 UTC

Description Jay SenSharma 2014-07-31 19:04:02 UTC
Description of problem:
----------------------
- While deploying a WAR, If the web.xml file is used which has context <param-value> defined, However it has missing <param-name> then it causes NullPointerException as following:

{code}
00:28:18,063 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015876: Starting deployment of "ContextParamNullDemo.war" (runtime-name: "ContextParamNullDemo.war")
00:28:18,239 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.unit."ContextParamNullDemo.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."ContextParamNullDemo.war".PARSE: JBAS018733: Failed to process phase PARSE of deployment "ContextParamNullDemo.war"
	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127) [jboss-as-server-7.3.2.Final-redhat-2.jar:7.3.2.Final-redhat-2]
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
	at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
Caused by: java.lang.NullPointerException
	at org.jboss.as.jsf.deployment.JSFVersionProcessor.deploy(JSFVersionProcessor.java:91)
	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) [jboss-as-server-7.3.2.Final-redhat-2.jar:7.3.2.Final-redhat-2]
	... 5 more

00:28:18,249 ERROR [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS015870: Deploy of deployment "ContextParamNullDemo.war" was rolled back with the following failure message: 
{"JBAS014671: Failed services" => {"jboss.deployment.unit.\"ContextParamNullDemo.war\".PARSE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"ContextParamNullDemo.war\".PARSE: JBAS018733: Failed to process phase PARSE of deployment \"ContextParamNullDemo.war\"
    Caused by: java.lang.NullPointerException"}}
{code}

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


How reproducible:
- Yes

Steps to Reproduce:
------------------
- Deploy a WAR on WildFly with the following entry inside the web.xml file:

{code}
      <context-param>     
        <!--param-name>AnyName</param-name-->
        <param-value>AnyValue</param-value>
      </context-param>
{code}


Actual results:
----------------
- A NullPointerException is thrown, Without a useful user friendly information of what has become null or what is the reason of failure in user friendly manner.

Expected results:
----------------


Additional info:

Comment 1 Jay SenSharma 2014-07-31 19:05:11 UTC
- A useful/meaningful message should have been displayed during the deployment failure to the end user rather than unhandled NullPointerException

Comment 4 Jay SenSharma 2014-08-03 12:33:43 UTC
Created attachment 923611 [details]
ContextParamNullDemo.war

Comment 5 Farah Juma 2014-08-29 15:59:41 UTC
Since this is a JBoss metadata issue instead of a JSF issue, I'm updating the component to "Web".

Comment 6 baranowb 2014-09-09 10:59:03 UTC
8x: https://github.com/jboss/metadata/pull/68
7.x https://github.com/jboss/metadata/pull/69  7.1.x ->(eap 6.x)

Comment 8 Pavel Jelinek 2014-10-09 10:25:58 UTC
'javax.xml.stream.XMLStreamException: ParseError Message: param-name element missing' in context-param in EAP 6.4.0.DR4 is much better.


Note You need to log in before you can comment on or make changes to this bug.