0

When importing a Maven project to Eclipse (sometimes just refreshing the workspace), The file application.xml is modified and causes a problem deploying the EAR to Jboss 5:

org.jboss.deployers.spi.DeploymentException: Exception determining structure: AbstractVFSDeployment
Caused by: org.jboss.xb.binding.JBossXBRuntimeException: {http://java.sun.com/xml/ns/j2ee}library-directory cannot appear in this position. Expected content of {http://java.sun.com/xml/ns/j2ee}application is unordered_sequence: {http://java.sun.com/xml/ns/j2ee}module* {http://java.sun.com/xml/ns/j2ee}security-role* {all {http://java.sun.com/xml/ns/j2ee}descriptionGroup}?

IDE Has replaced:

<application version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">

By:

<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:application="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd" version="1.4">

And has added:

<library-directory>lib/</library-directory>

Has happened with Eclipse Mars and Eclipse Luna, Is this because of some configuration in the IDE?

kandan
  • 715
  • 2
  • 12
  • 39

1 Answers1

1

It is due to Eclipse configuration. Try Window - Preferences, then Maven -> Java EE Integration and uncheck the 'Enable Java EE Integration' as shown below. You'll also want to make sure that preference is not set individually for any particular project (right click on the project and choose 'Properties' then the same Maven -> Java EE Integration'). enter image description here

Chris Carcel
  • 138
  • 2
  • 6