Migrating application to JBoss EAP 5 fails to deploy with 'Element type "res-type" must be declared'

Solution Unverified - Updated -

Issue

  • We are migrating to JBoss EAP 5.x, wour application is failing to deploy with this error:
ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Parse: name=vfszip:/opt/jboss-eap-5.1/jboss-as/server/default/deploy/My.ear/ state=PreParse mode=Manual requiredState=Parse
org.jboss.deployers.spi.DeploymentException: Error creating managed object for vfszip:/opt/jboss-eap-5.1/jboss-as/server/default/deploy/My.ear/My.war/
  at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
...
Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: Element type "res-type" must be declared. @ vfszip:/opt/jboss-eap-5.1/jboss-as/server/default/deploy/My.ear/My.war/WEB-INF/jboss-web.xml[15,13]
  at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:203)
  at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:168)
  at org.jboss.xb.util.JBossXBHelper.parse(JBossXBHelper.java:189)
  at org.jboss.xb.util.JBossXBHelper.parse(JBossXBHelper.java:166)
  at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:137)
...
Caused by: org.xml.sax.SAXException: Element type "res-type" must be declared. @ vfszip:/opt/jboss-eap-5.1/jboss-as/server/default/deploy/My.ear/My.war/WEB-INF/jboss-web.xml[15,13]
  at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$MetaDataErrorHandler.error(SaxJBossXBParser.java:426)
  at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
  at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
...

Environment

Red Hat JBoss Enterprise Application Platform (EAP) 5.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content