"application.xml" validation error while migrating from JBoss 4.X to JBoss 5

Solution Verified - Updated -

Issue

  • We get the following kind of deployment error while migrating an Application from JBoss EAP 4.x to JBoss EAP 5.x
vfsfile:/home/userone/jboss-eap-5.1/jboss-as/server/default_WAR/deploy/EJBApplication.ear/ -> org.jboss.deployers.spi.DeploymentException: Error creating managed object for vfsfile:/home/userone/jboss-eap-5.1/jboss-as/server/default_WAR/deploy/EJBApplication.ear/  

 DEPLOYMENTS IN ERROR:  
  Deployment "vfsfile:/home/userone/jboss-eap-5.1/jboss-as/server/default_WAR/deploy/EJBApplication.ear/" is in error due to the following reason(s): rg.xml.sax.SAXException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'library-directory'. One of '{"http://java.sun.com/xml/ns/javaee":display-ame, "http://java.sun.com/xml/ns/javaee":icon, "http://java.sun.com/xml/ns/javaee":module}' is expected. @ vfsfile:/home/userone/jboss-eap-5.1/jboss-as/server/default_WAR/deploy/EJBApplication.ear/META-INF/application.xml[7,22]
  • The above exception occur with the following kind of "application.xml"
<?xml version="1.0" encoding="UTF-8"?>  
<application version="5" xmlns="http://java.sun.com/xml/ns/javaee"  
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
             xsi:schemaLocation="http://java.sun.com/xml/ns/javaee  
             http://java.sun.com/xml/ns/javaee/application_5.xsd">  
              <display-name>TestEAR_EJBDisplay </display-name>  
              <library-directory>lib </library-directory>  
              <module>  
                 <ejb id="EJB_aaa">TestEJB.1.2.3.jar </ejb>  
             </module>  
              <module>  
                 <web>  
                     <web-uri>TestApp.war </web-uri>  
                     <context-root>TestApp </context-root>  
                 </web>  
             </module>  
</application>

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