[ 
https://issues.apache.org/jira/browse/CXF-8666?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andriy Redko reassigned CXF-8666:
---------------------------------

    Assignee: Andriy Redko

> Spring6 for JSR 250 annotations isn't disabled for 
> jakarta.xml.ws.WebServiceContext
> -----------------------------------------------------------------------------------
>
>                 Key: CXF-8666
>                 URL: https://issues.apache.org/jira/browse/CXF-8666
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 4.0.0
>            Reporter: Jim Ma
>            Assignee: Andriy Redko
>            Priority: Major
>             Fix For: 4.0.1
>
>
> The test is failed after Spring6 upgrade. 
> {code:java}
> [INFO] Running org.apache.cxf.jaxws.spring.SpringBeansTest
> [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.716 
> s <<< FAILURE! - in org.apache.cxf.jaxws.spring.SpringBeansTest
> [ERROR] org.apache.cxf.jaxws.spring.SpringBeansTest.testCXF3959SpringInject  
> Time elapsed: 0.661 s  <<< ERROR!
> org.springframework.beans.factory.BeanCreationException: Error creating bean 
> with name 'org.apache.cxf.jaxws.EndpointImpl--1761046809': Cannot create 
> inner bean '(inner bean)#338c99c8' of type 
> [org.apache.cxf.jaxws.spring.PostConstructCalledCount] while setting 
> constructor argument; nested exception is 
> org.springframework.beans.factory.BeanCreationException: Error creating bean 
> with name '(inner bean)#338c99c8': Injection of resource dependencies failed; 
> nested exception is 
> org.springframework.beans.factory.NoSuchBeanDefinitionException: No 
> qualifying bean of type 'jakarta.xml.ws.WebServiceContext' available: 
> expected at least 1 bean which qualifies as autowire candidate. Dependency 
> annotations: {@jakarta.annotation.Resource(shareable=true, lookup="", 
> name="", description="", authenticationType=CONTAINER, 
> type=java.lang.Object.class, mappedName="")}
>     at 
> org.apache.cxf.jaxws.spring.SpringBeansTest.testCXF3959SpringInject(SpringBeansTest.java:482)
> Caused by: org.springframework.beans.factory.BeanCreationException: Error 
> creating bean with name '(inner bean)#338c99c8': Injection of resource 
> dependencies failed; nested exception is 
> org.springframework.beans.factory.NoSuchBeanDefinitionException: No 
> qualifying bean of type 'jakarta.xml.ws.WebServiceContext' available: 
> expected at least 1 bean which qualifies as autowire candidate. Dependency 
> annotations: {@jakarta.annotation.Resource(shareable=true, lookup="", 
> name="", description="", authenticationType=CONTAINER, 
> type=java.lang.Object.class, mappedName="")}
>     at 
> org.apache.cxf.jaxws.spring.SpringBeansTest.testCXF3959SpringInject(SpringBeansTest.java:482)
> Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: 
> No qualifying bean of type 'jakarta.xml.ws.WebServiceContext' available: 
> expected at least 1 bean which qualifies as autowire candidate. Dependency 
> annotations: {@jakarta.annotation.Resource(shareable=true, lookup="", 
> name="", description="", authenticationType=CONTAINER, 
> type=java.lang.Object.class, mappedName="")}
>     at 
> org.apache.cxf.jaxws.spring.SpringBeansTest.testCXF3959SpringInject(SpringBeansTest.java:482){code}
>  
> Spring5 has this setting in 
> {code:java}
> org.springframework.context.annotation.CommonAnnotationBeanPostProcessor{code}
> {code:java}
> this.ignoreResourceType("javax.xml.ws.WebServiceContext");{code}
> but this setting for jakarta.xml.ws.WebServiceContext is removed in Spring6, 
> see
> [https://github.com/spring-projects/spring-framework/issues/27422]
>  
> The source code in Spirng5 and Spring6:
> https://github.com/spring-projects/spring-framework/blob/v5.3.16/spring-context/src/main/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessor.java#L207
> https://github.com/spring-projects/spring-framework/blob/v6.0.0-M2/spring-context/src/main/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessor.java#L179



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to