[seam-issues] [JBoss JIRA] (SOLDER-322) Solder Servlet extensions clashing with CDI 1.1

Jozef Hartinger (JIRA) jira-events at lists.jboss.org
Mon Mar 19 03:58:47 EDT 2012


     [ https://issues.jboss.org/browse/SOLDER-322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jozef Hartinger updated SOLDER-322:
-----------------------------------

               Summary: Solder Servlet extensions clashing with CDI 1.1  (was: Problem adding Seam.Persistence 3.1.0.Final to AS 7.1.0.CR1b with Weld 2.0.0 Alpha)
         Fix Version/s: 3.2.0.Final
              Priority: Blocker  (was: Minor)
           Description: 
Solder's Servlet extensions use the default qualifier for certain beans such as ServletRequest. This clashes with built-in beans added in CDI 1.1 and results in AmbiguousResolutionException during deployment.

I think there are two ways around:
- to introduce a Solder-specific qualifier so that the "@Default" space is not poluted or
- detect CDI version and based on that either provide or not provide the overlapping Servlet integration

----

When trying out Weld 2.0.0 Alpha implementation as suggested by Weld developer (Jozef) as per Forum reference, I encountered problems starting application when including seam-persistence 3.1.0.Final in project.

I have reproduced this in quickstart example in 7.1.0.CR1b with Weld 2.0.0.  The error doesn't happen in 7.0.2.Final and 7.1.1.Final

Code files and result details for these can be provided if required (can't see how to upload).  

 


  was:
When trying out Weld 2.0.0 Alpha implementation as suggested by Weld developer (Jozef) as per Forum reference, I encountered problems starting application when including seam-persistence 3.1.0.Final in project.

I have reproduced this in quickstart example in 7.1.0.CR1b with Weld 2.0.0.  The error doesn't happen in 7.0.2.Final and 7.1.1.Final

Code files and result details for these can be provided if required (can't see how to upload).  

 


    Steps to Reproduce: 
Use the attached .war file directly, or:

----

Using jboss-as-quickstarts example kitchensink-jsp.  Add the following to POM

       <dependency>
   	   <groupId>org.jboss.seam.persistence</groupId>
	   <artifactId>seam-persistence</artifactId>
	   <version>3.1.0.Final</version>
       </dependency>   

maven clean and install

Following Exceptions thrown on Enable in JBoss following deployment


	org.jboss.weld.exceptions.DeploymentException: 
		WELD-001409 Ambiguous dependencies for type [HttpServletRequest] with qualifiers [@Default] at injection point [[field] 
			@Inject private org.jboss.solder.servlet.http.RedirectBuilderImpl.request]. 
			Possible dependencies [[
				Producer Method [HttpServletRequest] with qualifiers [@Any @Default] declared as [[method] @Produces @Typed @RequestScoped protected 
				org.jboss.solder.servlet.http.ImplicitHttpServletObjectsProducer.getHttpServletRequest()], 
				org.jboss.weld.bean-jboss-as-kitchensink-jsp.war/C:/jboss-as-7.1.0.CR1b/bin/content/jboss-as-kitchensink-jsp.war/WEB-INF/lib/solder-impl-3.1.0.Final.jar-Built-in-org.jboss.weld.bean.builtin.ee.HttpServletRequestBean]]


  was:
Using jboss-as-quickstarts example kitchensink-jsp.  Add the following to POM

       <dependency>
   	   <groupId>org.jboss.seam.persistence</groupId>
	   <artifactId>seam-persistence</artifactId>
	   <version>3.1.0.Final</version>
       </dependency>   

maven clean and install

Following Exceptions thrown on Enable in JBoss following deployment


	org.jboss.weld.exceptions.DeploymentException: 
		WELD-001409 Ambiguous dependencies for type [HttpServletRequest] with qualifiers [@Default] at injection point [[field] 
			@Inject private org.jboss.solder.servlet.http.RedirectBuilderImpl.request]. 
			Possible dependencies [[
				Producer Method [HttpServletRequest] with qualifiers [@Any @Default] declared as [[method] @Produces @Typed @RequestScoped protected 
				org.jboss.solder.servlet.http.ImplicitHttpServletObjectsProducer.getHttpServletRequest()], 
				org.jboss.weld.bean-jboss-as-kitchensink-jsp.war/C:/jboss-as-7.1.0.CR1b/bin/content/jboss-as-kitchensink-jsp.war/WEB-INF/lib/solder-impl-3.1.0.Final.jar-Built-in-org.jboss.weld.bean.builtin.ee.HttpServletRequestBean]]


       Forum Reference: https://community.jboss.org/message/724400#724400  (was: https://community.jboss.org/message/724400#724400)

    
> Solder Servlet extensions clashing with CDI 1.1
> -----------------------------------------------
>
>                 Key: SOLDER-322
>                 URL: https://issues.jboss.org/browse/SOLDER-322
>             Project: Solder
>          Issue Type: Bug
>          Components: Core, Generic Beans
>    Affects Versions: 3.1.0.Final
>         Environment: Windows 7, Eclipse, Maven
>            Reporter: David Hubbard
>            Priority: Blocker
>              Labels: deploy, jboss, maven, persistence, weld
>             Fix For: 3.2.0.Final
>
>         Attachments: jboss-as-kitchensink-jsp.war, kitchensink-jsp.zip, Seam-Persistence - 7_0_2.txt, Seam-Persistence - 7_1_0_CR1b_Weld.txt, Seam-Persistence - 7_1_1.txt
>
>
> Solder's Servlet extensions use the default qualifier for certain beans such as ServletRequest. This clashes with built-in beans added in CDI 1.1 and results in AmbiguousResolutionException during deployment.
> I think there are two ways around:
> - to introduce a Solder-specific qualifier so that the "@Default" space is not poluted or
> - detect CDI version and based on that either provide or not provide the overlapping Servlet integration
> ----
> When trying out Weld 2.0.0 Alpha implementation as suggested by Weld developer (Jozef) as per Forum reference, I encountered problems starting application when including seam-persistence 3.1.0.Final in project.
> I have reproduced this in quickstart example in 7.1.0.CR1b with Weld 2.0.0.  The error doesn't happen in 7.0.2.Final and 7.1.1.Final
> Code files and result details for these can be provided if required (can't see how to upload).  
>  

--
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 seam-issues mailing list