I have stumbled upon this bug too. IMHO putting libraries as modules into application.xml
breaks Java EE specification compatibility.
Java EE 5 specification (page 152) defines four module types: web, ejb, application client
and resource adapter. Libraries, commonly used in ejb and/or web modules may be placed in
ear file, but they *are not* modules.
Libraries should be dealt this way (Java EE 5 specification page 167):
...
c. A directory named lib is considered to be the library directory, as described in
Section EE.8.2.1, âÂÂBundled Libraries.âÂÂ
d.For all files in the application package with a filename extension of .jar, but not
contained in the lib directory, do the following:
i. If the JAR file contains a META-INF/MANIFEST.MF file with a Main-Class attribute, or
contains a META-INF/application-client.xml file, consider the JAR file to be an
application client module.
ii. If the JAR file contains a META-INF/ejb-jar.xml file, or contains any class with an
EJB component annotation (Stateless, etc.), consider the JAR file to be an EJB module.
iii. All other JAR files are ignored unless referenced by a JAR file discovered above
using one of the JAR file reference mechanisms such as the Class-Path header in a manifest
file.
If deleting tags "modules" with libraries solves the issue, this means, that bug
is not with WTP, but with JBoss Tools implementation. Libraries must not be placed within
tags "module".
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4137060#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...