[seam-issues] [JBoss JIRA] Issue Comment Edited: (SEAMCONFIG-50) Seam-config ignores WEB-INF/beans.xml (and WEB-INF/seam-beans.xml) in tomcat for seam-config configuration (but not weld configuration)
Geoffrey De Smet (JIRA)
jira-events at lists.jboss.org
Mon Jul 25 07:55:23 EDT 2011
[ https://issues.jboss.org/browse/SEAMCONFIG-50?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12615813#comment-12615813 ]
Geoffrey De Smet edited comment on SEAMCONFIG-50 at 7/25/11 7:53 AM:
---------------------------------------------------------------------
A probably workaround is to use "WEB-INF/classes/META-INF/seam-beans.xml" instead.
The reference manual should have a clear warning : "seam-config doesn't work for any files in the WEB-INF dir in some containers (without failing-fast)"
The <weld:scan> stuff is successful read from the WEB-INF/beans.xml by weld-servlet.
Open question: Is the <weld:scan> stuff earlier in the boot sequence than the seam-config stuff?
It probably is, yet apparently there is no portable way for seam-config to read that ? :(
was (Author: ge0ffrey):
A probably workaround is to use "WEB-INF/classes/META-INF/seam-beans.xml" instead.
The reference manual should have a clear warning : "seam-config doesn't work for any files in the WEB-INF dir"
The <weld:scan> stuff is successful read from the WEB-INF/beans.xml by weld-servlet.
Open question: Is the <weld:scan> stuff earlier in the boot sequence than the seam-config stuff?
It probably is, yet apparently there is no portable way for seam-config to read that ? :(
> 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
More information about the seam-issues
mailing list