possible jboss as7 bug
abisaro Sep 6, 2011 10:48 AMHi all,
i ported a webapp (.war) running on JBoss 4.2.2 to JBoss 5.1.0 without big problems, then I was asked to try to port it to JBoss AS 7.
After two or three days of frustrating temptatives, always getting an obscure error at deployment time, trying to modify, add, remove xml conf files in the app's WEB-INF, I cleaned up my mind and started from beginning, that is the error printed by the server.
The error is the following:
14:36:26,605 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC00001: Failed to start service jboss.deployment.unit."XXXX.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."XXXX.war".PARSE: Failed to process phase PARSE of deployment "XXXX.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)
at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_20]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_20]
at java.lang.Thread.run(Thread.java:619) [:1.6.0_20]
Caused by: java.lang.IllegalArgumentException: No enum const class org.jboss.metadata.web.spec.BodyContentType.emtpy
at java.lang.Enum.valueOf(Enum.java:196) [:1.6.0_20]
at org.jboss.metadata.web.spec.BodyContentType.valueOf(BodyContentType.java:30)
at org.jboss.metadata.parser.jsp.TagMetaDataParser.parse(TagMetaDataParser.java:117)
at org.jboss.metadata.parser.jsp.TldMetaDataParser.parse(TldMetaDataParser.java:226)
at org.jboss.as.web.deployment.TldParsingDeploymentProcessor.parseTLD(TldParsingDeploymentProcessor.java:124)
at org.jboss.as.web.deployment.TldParsingDeploymentProcessor.deploy(TldParsingDeploymentProcessor.java:89)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115)
... 5 more
and I noticed what looks like a typo error somewhere in the code that parse the TLDs.
I put it in bold for your convenience
Caused by: java.lang.IllegalArgumentException: No enum const class org.jboss.metadata.web.spec.BodyContentType.emtpy
The BodyContentType enum declaration is:
public enum BodyContentType {
tagdependent, JSP, empty, scriptless
}
the valueOf method throwing the exception is:
public static <T extends Enum<T>> T valueOf(Class<T> enumType, String name) {
T result = enumType.enumConstantDirectory().get(name);
if (result != null)
return result;
if (name == null)
throw new NullPointerException("Name is null");
throw new IllegalArgumentException("No enum const " + enumType +"." + name);
}
I think that the wrong emtpy name is passed instead of the right empty
I got it using jboss-as-7.0.1.Final but I think it affects also previous versions