[
https://issues.jboss.org/browse/SEAMCONFIG-50?page=com.atlassian.jira.plu...
]
Hendy Irawan commented on SEAMCONFIG-50:
----------------------------------------
According to section 12.1 of the JSR-299 specification:
Bean classes of enabled beans must be deployed in bean archives.
* A library jar, EJB jar, application client jar or rar archive is a bean
archive if it has a file named beans.xml in the META-INF directory.
* The WEB-INF/classes directory of a war is a bean archive ***if there is a file
named beans.xml in the WEB-INF directory*** of the war.
* A directory in the JVM classpath is a bean archive if it has a file named
beans.xml in the META-INF directory.
For the second point above, it seems backwards that Seam Config contradicts directly with
the JSR-299 spec. :(
Seam-config ignores WEB-INF/beans.xml (and WEB-INF/seam-beans.xml) in
tomcat for seam-config configuration (but not weld configuration)
---------------------------------------------------------------------------------------------------------------------------------------
Key: SEAMCONFIG-50
URL:
https://issues.jboss.org/browse/SEAMCONFIG-50
Project: Seam Config
Issue Type: Bug
Affects Versions: 3.0.0.Final
Environment: Tomcat 6, linux, IntelliJ
Reporter: Geoffrey De Smet
Assignee: Stuart Douglas
Priority: Critical
Probably does work in AS 6/7, but not in Tomcat 6.
Occurs for both exploded war and not exploded war.
Strangely enough, it doesn't ignore it for the root xml schema validation.
The problem is probably in ClasspathResourceLoader.getResources(String name):
when name = "WEB-INF/beans.xml", it returnts an empty Set, while it should
contain something like:
/.../guvnor/guvnor-webapp/target/guvnor-webapp-5.3.0-SNAPSHOT/WEB-INF/beans.xml
Thread.currentThread().getContextClassLoader() returns an instance of
org.apache.catalina.loader.WebappClassLoader
When asking
Thread.currentThread().getContextClassLoader().getResourceAsStream("WEB-INF/beans.xml")
or
Thread.currentThread().getContextClassLoader().getResourceAsStream("/WEB-INF/beans.xml")
it returns null (so the catalina WebappClassLoader returns null for that).
even this returns null:
or
Thread.currentThread().getContextClassLoader().getResourceAsStream("WEB-INF/web.xml")
yet asking a resource, such as
Thread.currentThread().getContextClassLoader().getResourceAsStream("/drools-asseteditors.xml")
does not return null, but the correct resource.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira