[shrinkwrap-issues] [JBoss JIRA] (SHRINKWRAP-369) ShrinkWrapClassLoader does not find service provider in WAR
Davide D'Alto (Commented) (JIRA)
jira-events at lists.jboss.org
Fri Dec 16 10:41:09 EST 2011
[ https://issues.jboss.org/browse/SHRINKWRAP-369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12651648#comment-12651648 ]
Davide D'Alto commented on SHRINKWRAP-369:
------------------------------------------
If I'm not wrong this is a problem of the Weld container not really of the ShrinkWrapClassLoader. The ServiceLoader class only look for services inside the folder META-INF/services and therefore it doesn't work when you use a WAR.
https://github.com/arquillian/arquillian-container-weld/blob/master/weld-ee-embedded-1.1/src/main/java/org/jboss/arquillian/container/weld/ee/embedded_1_1/mock/ServiceLoader.java#L83
I think I have a patch for this but do I have to create a new JIRA for arquilian first?
> ShrinkWrapClassLoader does not find service provider in WAR
> -----------------------------------------------------------
>
> Key: SHRINKWRAP-369
> URL: https://issues.jboss.org/browse/SHRINKWRAP-369
> Project: ShrinkWrap
> Issue Type: Bug
> Components: api
> Affects Versions: 1.0.0-beta-3
> Reporter: Martin Kouba
>
> I ran into this issue when working with *Arquillian* and *Weld EE 1.1 Embedded container* (that uses ShrinkWrapClassLoader under the hood). ShrinkWrap correctly builds web archive with CDI extension (using org.jboss.shrinkwrap.api.container.ManifestContainer.addAsServiceProvider(Class<?>, Class<?>...); this was also discussed in SHRINKWRAP-266).
> Output:
> {code}
> test.war
> /WEB-INF/
> /WEB-INF/classes/
> /WEB-INF/classes/META-INF/
> /WEB-INF/classes/META-INF/services/
> /WEB-INF/classes/META-INF/services/javax.enterprise.inject.spi.Extension
> {code}
> However no extensions are found. *org.jboss.shrinkwrap.api.classloader.ShrinkWrapClassLoader* probably does not find any resource when looking for "META-INF/services/javax.enterprise.inject.spi.Extension".
> Note that I'm not quite sure whether it's ShrinkWrapClassLoader or WeldEEMockContainer issue.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the shrinkwrap-issues
mailing list