Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-10973

@XmlJavaTypeAdapter ignored at package-info.java level when using Generics

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: EAP_EWP 5.2.0
    • Fix Version/s: EAP_EWP 5.3.0.GA
    • Component/s: Web Services
    • Labels:
      None
    • Environment:

      JBoss EAP 5.2.0 + CXF + JBPAPP-10628 + JBPAPP-10927 (one off patches for EAP 5.2.0)

    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      A good workaround for this is to not use package-info.java and have the annotation @XmlJavaTypeAdapter sit on the property instead

          @XmlJavaTypeAdapter(type = TestRef.class, value = TestXmlAdapter.class)
          private List<TestRef> refs;
      

      You should make sure that the @XmlAccessType annotation is also removed prior to this.

      Show
      A good workaround for this is to not use package-info.java and have the annotation @XmlJavaTypeAdapter sit on the property instead @XmlJavaTypeAdapter(type = TestRef.class, value = TestXmlAdapter.class) private List<TestRef> refs; You should make sure that the @XmlAccessType annotation is also removed prior to this.
    • Release Notes Text:
      Hide
      In previous versions of JBoss EAP 5, it was found that, in environments that incorporated the resolutions to bugs JBPAPP-10458 and JBPAPP-10926, the @XmlJavaTypeAdapter attribute was ignored at the package-info.java level. This was because a related upstream CXF fix (CXF-5219) had not been included in the product. This fix has now been incorporated and the issue resolved.
      Show
      In previous versions of JBoss EAP 5, it was found that, in environments that incorporated the resolutions to bugs JBPAPP-10458 and JBPAPP-10926 , the @XmlJavaTypeAdapter attribute was ignored at the package-info.java level. This was because a related upstream CXF fix (CXF-5219) had not been included in the product. This fix has now been incorporated and the issue resolved.
    • Release Notes Docs Status:
      Documented as Resolved Issue
    • Docs QE Status:
      NEW

      Description

      With an environment with both fixes for JBPAPP-10458 and JBPAPP-10926 applied, the below does not work and throws an exception as if JBPAPP-10458 was not there.

      Unable to find source-code formatter for language: title:usedinws.java. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      @XmlType(name = "TestDto")
      @XmlAccessorType(XmlAccessType.FIELD)
      public class TestDto {
      
          private List<TestRef> refs;
          private TestRef refObj;
      
          public List<TestRef> getRefs() {
              return refs;
          }
      	
         public TestRef getRefObj() {
      	return refObj;
         }
      }
      

      If you remove the use of Generics from this example everything works as expected.

      This is a regression caused by JBPAPP-10926.

        Gliffy Diagrams

          Attachments

          1. cxf-rt-frontend-jaxws.jar-JBPAPP-10628
            324 kB
          2. JBPAPP-10927.zip
            400 kB
          3. MyWs.jar
            5 kB
          4. outcomes.txt
            7 kB

            Issue Links

              Activity

                People

                • Assignee:
                  jim.ma Jim Ma
                  Reporter:
                  mmusaji Mustafa Musaji
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: