You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Vassilis Virvilis (JIRA)" <ji...@apache.org> on 2012/10/26 14:25:12 UTC

[jira] [Created] (CXF-4605) SortedMap is not returned when another unrelated method exists in the interface

Vassilis Virvilis created CXF-4605:
--------------------------------------

             Summary: SortedMap is not returned when another unrelated method exists in the interface
                 Key: CXF-4605
                 URL: https://issues.apache.org/jira/browse/CXF-4605
             Project: CXF
          Issue Type: Bug
          Components: Aegis Databinding
    Affects Versions: 2.7.0
         Environment: Debian unstable / tomcat7 / opennjdk7
            Reporter: Vassilis Virvilis


 During testing of bug 4534 I stumbled upon the following behavior. Subsets of tests were passing when run standalone but failing when run in the full test suite.

So I have narrowed it down to one method that fails when another is uncommented in the interface.

Interface:
    // uncomment this for the next method to fail
    // public Map<String, Map<Integer, Integer>> testDirectComplexMapResult();

    // fail -- puts data into a hashmap instead of a SortedMap if the above is uncommented
    public Map<String, SortedMap<Integer, Integer>> testDirectComplexTreeMapResult();

Implementation:
    //@Override
    public Map<String, Map<Integer, Integer>> testDirectComplexMapResult() {
        final Map<String, Map<Integer, Integer>> result = new HashMap<String, Map<Integer, Integer>>();
        final TreeMap<Integer, Integer> map1 = new TreeMap<Integer, Integer>();
        map1.put(1, 3);
        result.put("key1", map1);
        return result;
    }

    @Override
    public Map<String, SortedMap<Integer, Integer>> testDirectComplexTreeMapResult() {
        final Map<String, SortedMap<Integer, Integer>> result = new HashMap<String, SortedMap<Integer, Integer>>();
        final TreeMap<Integer, Integer> map1 = new TreeMap<Integer, Integer>();
        map1.put(1, 3);
        map1.put(0, 2);
        result.put("key1", map1);
        return result;
    }

Client:
    @Test
    public void testDirectComplexTreeMapResult() {
        final Map map = TestServiceFactory.getService()
                .testDirectComplexTreeMapResult();
        log.info(map);
        for (final Object vmap : map.values()) {
            Assert.assertTrue(vmap instanceof SortedMap);
        }
    }


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CXF-4605) SortedMap is not returned when another unrelated method exists in the interface

Posted by "Vassilis Virvilis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-4605?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vassilis Virvilis updated CXF-4605:
-----------------------------------

    Attachment: ws-test-issue-4605.tgz

I cannot reproduce the exceptions with these test cases but the results are still wrong. It returns null instead of the value map.

   Vassilis
                
> SortedMap is not returned when another unrelated method exists in the interface
> -------------------------------------------------------------------------------
>
>                 Key: CXF-4605
>                 URL: https://issues.apache.org/jira/browse/CXF-4605
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.7.0
>         Environment: Debian unstable / tomcat7 / opennjdk7
>            Reporter: Vassilis Virvilis
>            Assignee: Daniel Kulp
>             Fix For: 2.7.1
>
>         Attachments: ws-test-issue-4605.tgz, ws-test-issue-4605.tgz
>
>
>  During testing of bug 4534 I stumbled upon the following behavior. Subsets of tests were passing when run standalone but failing when run in the full test suite.
> So I have narrowed it down to one method that fails when another is uncommented in the interface.
> Interface:
>     // uncomment this for the next method to fail
>     // public Map<String, Map<Integer, Integer>> testDirectComplexMapResult();
>     // fail -- puts data into a hashmap instead of a SortedMap if the above is uncommented
>     public Map<String, SortedMap<Integer, Integer>> testDirectComplexTreeMapResult();
> Implementation:
>     //@Override
>     public Map<String, Map<Integer, Integer>> testDirectComplexMapResult() {
>         final Map<String, Map<Integer, Integer>> result = new HashMap<String, Map<Integer, Integer>>();
>         final TreeMap<Integer, Integer> map1 = new TreeMap<Integer, Integer>();
>         map1.put(1, 3);
>         result.put("key1", map1);
>         return result;
>     }
>     @Override
>     public Map<String, SortedMap<Integer, Integer>> testDirectComplexTreeMapResult() {
>         final Map<String, SortedMap<Integer, Integer>> result = new HashMap<String, SortedMap<Integer, Integer>>();
>         final TreeMap<Integer, Integer> map1 = new TreeMap<Integer, Integer>();
>         map1.put(1, 3);
>         map1.put(0, 2);
>         result.put("key1", map1);
>         return result;
>     }
> Client:
>     @Test
>     public void testDirectComplexTreeMapResult() {
>         final Map map = TestServiceFactory.getService()
>                 .testDirectComplexTreeMapResult();
>         log.info(map);
>         for (final Object vmap : map.values()) {
>             Assert.assertTrue(vmap instanceof SortedMap);
>         }
>     }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-4605) SortedMap is not returned when another unrelated method exists in the interface

Posted by "Vassilis Virvilis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13496058#comment-13496058 ] 

Vassilis Virvilis commented on CXF-4605:
----------------------------------------

Daniel,

Thanks a lot for your work on this. For sure I will test and report.

I understand the "No this is not supported" answer. What I am saying and have said in other bug reports and in the mailing is that Aegis can:

1) work ok (as you are trying to do)
2) complain (even at run time, better in deploy time) that this is not supported
3) fail silently by corrupting data (returning HashMap instead of SortedMap) or by returning null

What I am saying behavior #3 must be treated as a bug. Behavior #1, #2 are acceptable.

       Vassilis


                
> SortedMap is not returned when another unrelated method exists in the interface
> -------------------------------------------------------------------------------
>
>                 Key: CXF-4605
>                 URL: https://issues.apache.org/jira/browse/CXF-4605
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.7.0
>         Environment: Debian unstable / tomcat7 / opennjdk7
>            Reporter: Vassilis Virvilis
>            Assignee: Daniel Kulp
>             Fix For: 2.7.1
>
>         Attachments: ws-test-issue-4605.tgz, ws-test-issue-4605.tgz
>
>
>  During testing of bug 4534 I stumbled upon the following behavior. Subsets of tests were passing when run standalone but failing when run in the full test suite.
> So I have narrowed it down to one method that fails when another is uncommented in the interface.
> Interface:
>     // uncomment this for the next method to fail
>     // public Map<String, Map<Integer, Integer>> testDirectComplexMapResult();
>     // fail -- puts data into a hashmap instead of a SortedMap if the above is uncommented
>     public Map<String, SortedMap<Integer, Integer>> testDirectComplexTreeMapResult();
> Implementation:
>     //@Override
>     public Map<String, Map<Integer, Integer>> testDirectComplexMapResult() {
>         final Map<String, Map<Integer, Integer>> result = new HashMap<String, Map<Integer, Integer>>();
>         final TreeMap<Integer, Integer> map1 = new TreeMap<Integer, Integer>();
>         map1.put(1, 3);
>         result.put("key1", map1);
>         return result;
>     }
>     @Override
>     public Map<String, SortedMap<Integer, Integer>> testDirectComplexTreeMapResult() {
>         final Map<String, SortedMap<Integer, Integer>> result = new HashMap<String, SortedMap<Integer, Integer>>();
>         final TreeMap<Integer, Integer> map1 = new TreeMap<Integer, Integer>();
>         map1.put(1, 3);
>         map1.put(0, 2);
>         result.put("key1", map1);
>         return result;
>     }
> Client:
>     @Test
>     public void testDirectComplexTreeMapResult() {
>         final Map map = TestServiceFactory.getService()
>                 .testDirectComplexTreeMapResult();
>         log.info(map);
>         for (final Object vmap : map.values()) {
>             Assert.assertTrue(vmap instanceof SortedMap);
>         }
>     }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Comment Edited] (CXF-4605) SortedMap is not returned when another unrelated method exists in the interface

Posted by "Vassilis Virvilis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13493203#comment-13493203 ] 

Vassilis Virvilis edited comment on CXF-4605 at 11/8/12 2:19 PM:
-----------------------------------------------------------------

I cannot reproduce the exceptions with the update test case I attached but the results are still wrong. It returns null instead of the value map. Hope that helps

   Vassilis
                
      was (Author: vasvir):
    I cannot reproduce the exceptions with these test cases but the results are still wrong. It returns null instead of the value map.

   Vassilis
                  
> SortedMap is not returned when another unrelated method exists in the interface
> -------------------------------------------------------------------------------
>
>                 Key: CXF-4605
>                 URL: https://issues.apache.org/jira/browse/CXF-4605
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.7.0
>         Environment: Debian unstable / tomcat7 / opennjdk7
>            Reporter: Vassilis Virvilis
>            Assignee: Daniel Kulp
>             Fix For: 2.7.1
>
>         Attachments: ws-test-issue-4605.tgz, ws-test-issue-4605.tgz
>
>
>  During testing of bug 4534 I stumbled upon the following behavior. Subsets of tests were passing when run standalone but failing when run in the full test suite.
> So I have narrowed it down to one method that fails when another is uncommented in the interface.
> Interface:
>     // uncomment this for the next method to fail
>     // public Map<String, Map<Integer, Integer>> testDirectComplexMapResult();
>     // fail -- puts data into a hashmap instead of a SortedMap if the above is uncommented
>     public Map<String, SortedMap<Integer, Integer>> testDirectComplexTreeMapResult();
> Implementation:
>     //@Override
>     public Map<String, Map<Integer, Integer>> testDirectComplexMapResult() {
>         final Map<String, Map<Integer, Integer>> result = new HashMap<String, Map<Integer, Integer>>();
>         final TreeMap<Integer, Integer> map1 = new TreeMap<Integer, Integer>();
>         map1.put(1, 3);
>         result.put("key1", map1);
>         return result;
>     }
>     @Override
>     public Map<String, SortedMap<Integer, Integer>> testDirectComplexTreeMapResult() {
>         final Map<String, SortedMap<Integer, Integer>> result = new HashMap<String, SortedMap<Integer, Integer>>();
>         final TreeMap<Integer, Integer> map1 = new TreeMap<Integer, Integer>();
>         map1.put(1, 3);
>         map1.put(0, 2);
>         result.put("key1", map1);
>         return result;
>     }
> Client:
>     @Test
>     public void testDirectComplexTreeMapResult() {
>         final Map map = TestServiceFactory.getService()
>                 .testDirectComplexTreeMapResult();
>         log.info(map);
>         for (final Object vmap : map.values()) {
>             Assert.assertTrue(vmap instanceof SortedMap);
>         }
>     }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-4605) SortedMap is not returned when another unrelated method exists in the interface

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13490705#comment-13490705 ] 

Daniel Kulp commented on CXF-4605:
----------------------------------


If using Aegis on both sides, it really won't matter as Aegis doesn't actually use the schema.   The issue is if you have a client that has taken the WSDL and generated JAXWS/JAXB code based on the WSDL.  With the new code, a separate type is generated for the sorted maps compared to the non-sorted (and a couple others).   HOWEVER, this is likely not an issue as the schema for the old case was actually invalid.   It was generating two "int2intMap" types into the schema.  Two types, same name.   Not valid.  It would now have an int2intMap (for the non-sorted case) and an int2intSortedMap to differentiate them.

                
> SortedMap is not returned when another unrelated method exists in the interface
> -------------------------------------------------------------------------------
>
>                 Key: CXF-4605
>                 URL: https://issues.apache.org/jira/browse/CXF-4605
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.7.0
>         Environment: Debian unstable / tomcat7 / opennjdk7
>            Reporter: Vassilis Virvilis
>            Assignee: Daniel Kulp
>             Fix For: 2.7.1
>
>         Attachments: ws-test-issue-4605.tgz
>
>
>  During testing of bug 4534 I stumbled upon the following behavior. Subsets of tests were passing when run standalone but failing when run in the full test suite.
> So I have narrowed it down to one method that fails when another is uncommented in the interface.
> Interface:
>     // uncomment this for the next method to fail
>     // public Map<String, Map<Integer, Integer>> testDirectComplexMapResult();
>     // fail -- puts data into a hashmap instead of a SortedMap if the above is uncommented
>     public Map<String, SortedMap<Integer, Integer>> testDirectComplexTreeMapResult();
> Implementation:
>     //@Override
>     public Map<String, Map<Integer, Integer>> testDirectComplexMapResult() {
>         final Map<String, Map<Integer, Integer>> result = new HashMap<String, Map<Integer, Integer>>();
>         final TreeMap<Integer, Integer> map1 = new TreeMap<Integer, Integer>();
>         map1.put(1, 3);
>         result.put("key1", map1);
>         return result;
>     }
>     @Override
>     public Map<String, SortedMap<Integer, Integer>> testDirectComplexTreeMapResult() {
>         final Map<String, SortedMap<Integer, Integer>> result = new HashMap<String, SortedMap<Integer, Integer>>();
>         final TreeMap<Integer, Integer> map1 = new TreeMap<Integer, Integer>();
>         map1.put(1, 3);
>         map1.put(0, 2);
>         result.put("key1", map1);
>         return result;
>     }
> Client:
>     @Test
>     public void testDirectComplexTreeMapResult() {
>         final Map map = TestServiceFactory.getService()
>                 .testDirectComplexTreeMapResult();
>         log.info(map);
>         for (final Object vmap : map.values()) {
>             Assert.assertTrue(vmap instanceof SortedMap);
>         }
>     }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-4605) SortedMap is not returned when another unrelated method exists in the interface

Posted by "Vassilis Virvilis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13490540#comment-13490540 ] 

Vassilis Virvilis commented on CXF-4605:
----------------------------------------

Daniel,

Thanks again for the quick fix.

I can see that there is a apache-cxf-2.7.1-20121105.071034-21.tar.gz pre-release and the patch is 2 of November so I will try to test it later today...

One question: These schema changes you mentioned what implications do they have for older versions? For example what happens if I mix 2.7.1 server with 2.6.x clients. In that case I don't mind about SortedMap but I do care about plain maps behavior...

  Vassilis
                
> SortedMap is not returned when another unrelated method exists in the interface
> -------------------------------------------------------------------------------
>
>                 Key: CXF-4605
>                 URL: https://issues.apache.org/jira/browse/CXF-4605
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.7.0
>         Environment: Debian unstable / tomcat7 / opennjdk7
>            Reporter: Vassilis Virvilis
>            Assignee: Daniel Kulp
>             Fix For: 2.7.1
>
>         Attachments: ws-test-issue-4605.tgz
>
>
>  During testing of bug 4534 I stumbled upon the following behavior. Subsets of tests were passing when run standalone but failing when run in the full test suite.
> So I have narrowed it down to one method that fails when another is uncommented in the interface.
> Interface:
>     // uncomment this for the next method to fail
>     // public Map<String, Map<Integer, Integer>> testDirectComplexMapResult();
>     // fail -- puts data into a hashmap instead of a SortedMap if the above is uncommented
>     public Map<String, SortedMap<Integer, Integer>> testDirectComplexTreeMapResult();
> Implementation:
>     //@Override
>     public Map<String, Map<Integer, Integer>> testDirectComplexMapResult() {
>         final Map<String, Map<Integer, Integer>> result = new HashMap<String, Map<Integer, Integer>>();
>         final TreeMap<Integer, Integer> map1 = new TreeMap<Integer, Integer>();
>         map1.put(1, 3);
>         result.put("key1", map1);
>         return result;
>     }
>     @Override
>     public Map<String, SortedMap<Integer, Integer>> testDirectComplexTreeMapResult() {
>         final Map<String, SortedMap<Integer, Integer>> result = new HashMap<String, SortedMap<Integer, Integer>>();
>         final TreeMap<Integer, Integer> map1 = new TreeMap<Integer, Integer>();
>         map1.put(1, 3);
>         map1.put(0, 2);
>         result.put("key1", map1);
>         return result;
>     }
> Client:
>     @Test
>     public void testDirectComplexTreeMapResult() {
>         final Map map = TestServiceFactory.getService()
>                 .testDirectComplexTreeMapResult();
>         log.info(map);
>         for (final Object vmap : map.values()) {
>             Assert.assertTrue(vmap instanceof SortedMap);
>         }
>     }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CXF-4605) SortedMap is not returned when another unrelated method exists in the interface

Posted by "Vassilis Virvilis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-4605?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vassilis Virvilis updated CXF-4605:
-----------------------------------

    Attachment: ws-test-issue-4605.tgz

The attached project demonstrates the problem if you uncomment the other method in the interface
                
> SortedMap is not returned when another unrelated method exists in the interface
> -------------------------------------------------------------------------------
>
>                 Key: CXF-4605
>                 URL: https://issues.apache.org/jira/browse/CXF-4605
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.7.0
>         Environment: Debian unstable / tomcat7 / opennjdk7
>            Reporter: Vassilis Virvilis
>         Attachments: ws-test-issue-4605.tgz
>
>
>  During testing of bug 4534 I stumbled upon the following behavior. Subsets of tests were passing when run standalone but failing when run in the full test suite.
> So I have narrowed it down to one method that fails when another is uncommented in the interface.
> Interface:
>     // uncomment this for the next method to fail
>     // public Map<String, Map<Integer, Integer>> testDirectComplexMapResult();
>     // fail -- puts data into a hashmap instead of a SortedMap if the above is uncommented
>     public Map<String, SortedMap<Integer, Integer>> testDirectComplexTreeMapResult();
> Implementation:
>     //@Override
>     public Map<String, Map<Integer, Integer>> testDirectComplexMapResult() {
>         final Map<String, Map<Integer, Integer>> result = new HashMap<String, Map<Integer, Integer>>();
>         final TreeMap<Integer, Integer> map1 = new TreeMap<Integer, Integer>();
>         map1.put(1, 3);
>         result.put("key1", map1);
>         return result;
>     }
>     @Override
>     public Map<String, SortedMap<Integer, Integer>> testDirectComplexTreeMapResult() {
>         final Map<String, SortedMap<Integer, Integer>> result = new HashMap<String, SortedMap<Integer, Integer>>();
>         final TreeMap<Integer, Integer> map1 = new TreeMap<Integer, Integer>();
>         map1.put(1, 3);
>         map1.put(0, 2);
>         result.put("key1", map1);
>         return result;
>     }
> Client:
>     @Test
>     public void testDirectComplexTreeMapResult() {
>         final Map map = TestServiceFactory.getService()
>                 .testDirectComplexTreeMapResult();
>         log.info(map);
>         for (final Object vmap : map.values()) {
>             Assert.assertTrue(vmap instanceof SortedMap);
>         }
>     }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (CXF-4605) SortedMap is not returned when another unrelated method exists in the interface

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-4605?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-4605.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.7.1
         Assignee: Daniel Kulp


This changes the generated schema a bit so likely not going to merge back
                
> SortedMap is not returned when another unrelated method exists in the interface
> -------------------------------------------------------------------------------
>
>                 Key: CXF-4605
>                 URL: https://issues.apache.org/jira/browse/CXF-4605
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.7.0
>         Environment: Debian unstable / tomcat7 / opennjdk7
>            Reporter: Vassilis Virvilis
>            Assignee: Daniel Kulp
>             Fix For: 2.7.1
>
>         Attachments: ws-test-issue-4605.tgz
>
>
>  During testing of bug 4534 I stumbled upon the following behavior. Subsets of tests were passing when run standalone but failing when run in the full test suite.
> So I have narrowed it down to one method that fails when another is uncommented in the interface.
> Interface:
>     // uncomment this for the next method to fail
>     // public Map<String, Map<Integer, Integer>> testDirectComplexMapResult();
>     // fail -- puts data into a hashmap instead of a SortedMap if the above is uncommented
>     public Map<String, SortedMap<Integer, Integer>> testDirectComplexTreeMapResult();
> Implementation:
>     //@Override
>     public Map<String, Map<Integer, Integer>> testDirectComplexMapResult() {
>         final Map<String, Map<Integer, Integer>> result = new HashMap<String, Map<Integer, Integer>>();
>         final TreeMap<Integer, Integer> map1 = new TreeMap<Integer, Integer>();
>         map1.put(1, 3);
>         result.put("key1", map1);
>         return result;
>     }
>     @Override
>     public Map<String, SortedMap<Integer, Integer>> testDirectComplexTreeMapResult() {
>         final Map<String, SortedMap<Integer, Integer>> result = new HashMap<String, SortedMap<Integer, Integer>>();
>         final TreeMap<Integer, Integer> map1 = new TreeMap<Integer, Integer>();
>         map1.put(1, 3);
>         map1.put(0, 2);
>         result.put("key1", map1);
>         return result;
>     }
> Client:
>     @Test
>     public void testDirectComplexTreeMapResult() {
>         final Map map = TestServiceFactory.getService()
>                 .testDirectComplexTreeMapResult();
>         log.info(map);
>         for (final Object vmap : map.values()) {
>             Assert.assertTrue(vmap instanceof SortedMap);
>         }
>     }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (CXF-4605) SortedMap is not returned when another unrelated method exists in the interface

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-4605?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-4605.
------------------------------

    Resolution: Fixed
    
> SortedMap is not returned when another unrelated method exists in the interface
> -------------------------------------------------------------------------------
>
>                 Key: CXF-4605
>                 URL: https://issues.apache.org/jira/browse/CXF-4605
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.7.0
>         Environment: Debian unstable / tomcat7 / opennjdk7
>            Reporter: Vassilis Virvilis
>            Assignee: Daniel Kulp
>             Fix For: 2.7.1
>
>         Attachments: ws-test-issue-4605.tgz, ws-test-issue-4605.tgz
>
>
>  During testing of bug 4534 I stumbled upon the following behavior. Subsets of tests were passing when run standalone but failing when run in the full test suite.
> So I have narrowed it down to one method that fails when another is uncommented in the interface.
> Interface:
>     // uncomment this for the next method to fail
>     // public Map<String, Map<Integer, Integer>> testDirectComplexMapResult();
>     // fail -- puts data into a hashmap instead of a SortedMap if the above is uncommented
>     public Map<String, SortedMap<Integer, Integer>> testDirectComplexTreeMapResult();
> Implementation:
>     //@Override
>     public Map<String, Map<Integer, Integer>> testDirectComplexMapResult() {
>         final Map<String, Map<Integer, Integer>> result = new HashMap<String, Map<Integer, Integer>>();
>         final TreeMap<Integer, Integer> map1 = new TreeMap<Integer, Integer>();
>         map1.put(1, 3);
>         result.put("key1", map1);
>         return result;
>     }
>     @Override
>     public Map<String, SortedMap<Integer, Integer>> testDirectComplexTreeMapResult() {
>         final Map<String, SortedMap<Integer, Integer>> result = new HashMap<String, SortedMap<Integer, Integer>>();
>         final TreeMap<Integer, Integer> map1 = new TreeMap<Integer, Integer>();
>         map1.put(1, 3);
>         map1.put(0, 2);
>         result.put("key1", map1);
>         return result;
>     }
> Client:
>     @Test
>     public void testDirectComplexTreeMapResult() {
>         final Map map = TestServiceFactory.getService()
>                 .testDirectComplexTreeMapResult();
>         log.info(map);
>         for (final Object vmap : map.values()) {
>             Assert.assertTrue(vmap instanceof SortedMap);
>         }
>     }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-4605) SortedMap is not returned when another unrelated method exists in the interface

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13495708#comment-13495708 ] 

Daniel Kulp commented on CXF-4605:
----------------------------------

Just committed some more fixes for this.  I'd appreciate you testing tomorrows snapshots with it.

That said, you are rapidly getting out of our "this is supported" areas of Aegis.   Nothing in Aegis really is accounting for custom subclasses of the java Collections.   Passing the Generics through the various subclasses and interfaces is very complex and error prone so not something we really support.   Direct instances of the various collections that have their types directly declared there should be fine.   

That said, my commit MAY allow a lot more strange cases of Maps and such to work.  
                
> SortedMap is not returned when another unrelated method exists in the interface
> -------------------------------------------------------------------------------
>
>                 Key: CXF-4605
>                 URL: https://issues.apache.org/jira/browse/CXF-4605
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.7.0
>         Environment: Debian unstable / tomcat7 / opennjdk7
>            Reporter: Vassilis Virvilis
>            Assignee: Daniel Kulp
>             Fix For: 2.7.1
>
>         Attachments: ws-test-issue-4605.tgz, ws-test-issue-4605.tgz
>
>
>  During testing of bug 4534 I stumbled upon the following behavior. Subsets of tests were passing when run standalone but failing when run in the full test suite.
> So I have narrowed it down to one method that fails when another is uncommented in the interface.
> Interface:
>     // uncomment this for the next method to fail
>     // public Map<String, Map<Integer, Integer>> testDirectComplexMapResult();
>     // fail -- puts data into a hashmap instead of a SortedMap if the above is uncommented
>     public Map<String, SortedMap<Integer, Integer>> testDirectComplexTreeMapResult();
> Implementation:
>     //@Override
>     public Map<String, Map<Integer, Integer>> testDirectComplexMapResult() {
>         final Map<String, Map<Integer, Integer>> result = new HashMap<String, Map<Integer, Integer>>();
>         final TreeMap<Integer, Integer> map1 = new TreeMap<Integer, Integer>();
>         map1.put(1, 3);
>         result.put("key1", map1);
>         return result;
>     }
>     @Override
>     public Map<String, SortedMap<Integer, Integer>> testDirectComplexTreeMapResult() {
>         final Map<String, SortedMap<Integer, Integer>> result = new HashMap<String, SortedMap<Integer, Integer>>();
>         final TreeMap<Integer, Integer> map1 = new TreeMap<Integer, Integer>();
>         map1.put(1, 3);
>         map1.put(0, 2);
>         result.put("key1", map1);
>         return result;
>     }
> Client:
>     @Test
>     public void testDirectComplexTreeMapResult() {
>         final Map map = TestServiceFactory.getService()
>                 .testDirectComplexTreeMapResult();
>         log.info(map);
>         for (final Object vmap : map.values()) {
>             Assert.assertTrue(vmap instanceof SortedMap);
>         }
>     }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-4605) SortedMap is not returned when another unrelated method exists in the interface

Posted by "Vassilis Virvilis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13510473#comment-13510473 ] 

Vassilis Virvilis commented on CXF-4605:
----------------------------------------

Hi there,

I finally find the time to test with the apache-cxf-2.7.1-20121204.070440-41.tar.gz. All our internal tests are passing now...

Thank you so much...

    Vassilis Virvilis
                
> SortedMap is not returned when another unrelated method exists in the interface
> -------------------------------------------------------------------------------
>
>                 Key: CXF-4605
>                 URL: https://issues.apache.org/jira/browse/CXF-4605
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.7.0
>         Environment: Debian unstable / tomcat7 / opennjdk7
>            Reporter: Vassilis Virvilis
>            Assignee: Daniel Kulp
>             Fix For: 2.7.1
>
>         Attachments: ws-test-issue-4605.tgz, ws-test-issue-4605.tgz
>
>
>  During testing of bug 4534 I stumbled upon the following behavior. Subsets of tests were passing when run standalone but failing when run in the full test suite.
> So I have narrowed it down to one method that fails when another is uncommented in the interface.
> Interface:
>     // uncomment this for the next method to fail
>     // public Map<String, Map<Integer, Integer>> testDirectComplexMapResult();
>     // fail -- puts data into a hashmap instead of a SortedMap if the above is uncommented
>     public Map<String, SortedMap<Integer, Integer>> testDirectComplexTreeMapResult();
> Implementation:
>     //@Override
>     public Map<String, Map<Integer, Integer>> testDirectComplexMapResult() {
>         final Map<String, Map<Integer, Integer>> result = new HashMap<String, Map<Integer, Integer>>();
>         final TreeMap<Integer, Integer> map1 = new TreeMap<Integer, Integer>();
>         map1.put(1, 3);
>         result.put("key1", map1);
>         return result;
>     }
>     @Override
>     public Map<String, SortedMap<Integer, Integer>> testDirectComplexTreeMapResult() {
>         final Map<String, SortedMap<Integer, Integer>> result = new HashMap<String, SortedMap<Integer, Integer>>();
>         final TreeMap<Integer, Integer> map1 = new TreeMap<Integer, Integer>();
>         map1.put(1, 3);
>         map1.put(0, 2);
>         result.put("key1", map1);
>         return result;
>     }
> Client:
>     @Test
>     public void testDirectComplexTreeMapResult() {
>         final Map map = TestServiceFactory.getService()
>                 .testDirectComplexTreeMapResult();
>         log.info(map);
>         for (final Object vmap : map.values()) {
>             Assert.assertTrue(vmap instanceof SortedMap);
>         }
>     }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-4605) SortedMap is not returned when another unrelated method exists in the interface

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13496371#comment-13496371 ] 

Daniel Kulp commented on CXF-4605:
----------------------------------


The problem is whether due to TypeErasure of the generics can we even detect #2 or not.   In your test case, CXF was detecting it to be a map of Object -> Object due to the erasure.   That IS "supported" as it is treated as an "xsd:anyType" and the value mapped to a DOM object.  Mostly what I'm trying to do is to traverse the various generics information that is available to see if we can determine the actual type or whether the actual type isn't available and we just get "Object" for the type.

I've just committed a couple more changes that will try and detect if the type erasure is resulting in "Object" (as opposed to just being "Object" to begin with) and log a warning.  
                
> SortedMap is not returned when another unrelated method exists in the interface
> -------------------------------------------------------------------------------
>
>                 Key: CXF-4605
>                 URL: https://issues.apache.org/jira/browse/CXF-4605
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.7.0
>         Environment: Debian unstable / tomcat7 / opennjdk7
>            Reporter: Vassilis Virvilis
>            Assignee: Daniel Kulp
>             Fix For: 2.7.1
>
>         Attachments: ws-test-issue-4605.tgz, ws-test-issue-4605.tgz
>
>
>  During testing of bug 4534 I stumbled upon the following behavior. Subsets of tests were passing when run standalone but failing when run in the full test suite.
> So I have narrowed it down to one method that fails when another is uncommented in the interface.
> Interface:
>     // uncomment this for the next method to fail
>     // public Map<String, Map<Integer, Integer>> testDirectComplexMapResult();
>     // fail -- puts data into a hashmap instead of a SortedMap if the above is uncommented
>     public Map<String, SortedMap<Integer, Integer>> testDirectComplexTreeMapResult();
> Implementation:
>     //@Override
>     public Map<String, Map<Integer, Integer>> testDirectComplexMapResult() {
>         final Map<String, Map<Integer, Integer>> result = new HashMap<String, Map<Integer, Integer>>();
>         final TreeMap<Integer, Integer> map1 = new TreeMap<Integer, Integer>();
>         map1.put(1, 3);
>         result.put("key1", map1);
>         return result;
>     }
>     @Override
>     public Map<String, SortedMap<Integer, Integer>> testDirectComplexTreeMapResult() {
>         final Map<String, SortedMap<Integer, Integer>> result = new HashMap<String, SortedMap<Integer, Integer>>();
>         final TreeMap<Integer, Integer> map1 = new TreeMap<Integer, Integer>();
>         map1.put(1, 3);
>         map1.put(0, 2);
>         result.put("key1", map1);
>         return result;
>     }
> Client:
>     @Test
>     public void testDirectComplexTreeMapResult() {
>         final Map map = TestServiceFactory.getService()
>                 .testDirectComplexTreeMapResult();
>         log.info(map);
>         for (final Object vmap : map.values()) {
>             Assert.assertTrue(vmap instanceof SortedMap);
>         }
>     }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Reopened] (CXF-4605) SortedMap is not returned when another unrelated method exists in the interface

Posted by "Vassilis Virvilis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-4605?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vassilis Virvilis reopened CXF-4605:
------------------------------------


Thanks a bunch as usual,

I tested it with 2.7.1 snapshot 20121107 and it passes the provided test. However it still fails our internal test-suite. The only reason I bringing it up here and not another bug is that the one failure is a regression. If you want me to open it as new issue please tell me so.

So the purpose of the tests is to test inheritance of complex maps. So here are the objects we are trying pass through...

    public class ComplexMapResult extends
            HashMap<String, Map<Integer, Integer>> {
    }


 public class ComplexTreeMapResult extends
            HashMap<String, TreeMap<Integer, Integer>> {
    }


The interface is 
    // fail returns null map value in cxf-2.3.3
    // works in cxf-2.6.2
    // fails with exceptions in 2.7.1
    public ComplexMapResult testComplexMapResult();

    // this was always failing...
    public ComplexTreeMapResult testComplexTreeMapResult();

The server side code (implementation) is

    @Override
    public ComplexMapResult testComplexMapResult() {
        final ComplexMapResult result = new ComplexMapResult();
        final Map<Integer, Integer> map1 = new HashMap<Integer, Integer>();
        map1.put(1, 3);
        result.put("key1", map1);
        return result;
    }

    @Override
    public ComplexTreeMapResult testComplexTreeMapResult() {
        final ComplexTreeMapResult result = new ComplexTreeMapResult();
        final TreeMap<Integer, Integer> map1 = new TreeMap<Integer, Integer>();
        map1.put(1, 3);
        map1.put(0, 2);
        result.put("key1", map1);
        return result;
    }

The client side code is:

    @Test
    public void testComplexMapResult() {
        log.info(TestServiceFactory.getService().testComplexMapResult());
    }

    @Test
    public void testComplexTreeMapResult() {
        final Map map = TestServiceFactory.getService()
                .testComplexTreeMapResult();
        log.info(map);
        for (final Object vmap : map.values()) {
            Assert.assertTrue(vmap instanceof SortedMap);
        }
    }

I will update the test case...

           Vassilis
                
> SortedMap is not returned when another unrelated method exists in the interface
> -------------------------------------------------------------------------------
>
>                 Key: CXF-4605
>                 URL: https://issues.apache.org/jira/browse/CXF-4605
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.7.0
>         Environment: Debian unstable / tomcat7 / opennjdk7
>            Reporter: Vassilis Virvilis
>            Assignee: Daniel Kulp
>             Fix For: 2.7.1
>
>         Attachments: ws-test-issue-4605.tgz
>
>
>  During testing of bug 4534 I stumbled upon the following behavior. Subsets of tests were passing when run standalone but failing when run in the full test suite.
> So I have narrowed it down to one method that fails when another is uncommented in the interface.
> Interface:
>     // uncomment this for the next method to fail
>     // public Map<String, Map<Integer, Integer>> testDirectComplexMapResult();
>     // fail -- puts data into a hashmap instead of a SortedMap if the above is uncommented
>     public Map<String, SortedMap<Integer, Integer>> testDirectComplexTreeMapResult();
> Implementation:
>     //@Override
>     public Map<String, Map<Integer, Integer>> testDirectComplexMapResult() {
>         final Map<String, Map<Integer, Integer>> result = new HashMap<String, Map<Integer, Integer>>();
>         final TreeMap<Integer, Integer> map1 = new TreeMap<Integer, Integer>();
>         map1.put(1, 3);
>         result.put("key1", map1);
>         return result;
>     }
>     @Override
>     public Map<String, SortedMap<Integer, Integer>> testDirectComplexTreeMapResult() {
>         final Map<String, SortedMap<Integer, Integer>> result = new HashMap<String, SortedMap<Integer, Integer>>();
>         final TreeMap<Integer, Integer> map1 = new TreeMap<Integer, Integer>();
>         map1.put(1, 3);
>         map1.put(0, 2);
>         result.put("key1", map1);
>         return result;
>     }
> Client:
>     @Test
>     public void testDirectComplexTreeMapResult() {
>         final Map map = TestServiceFactory.getService()
>                 .testDirectComplexTreeMapResult();
>         log.info(map);
>         for (final Object vmap : map.values()) {
>             Assert.assertTrue(vmap instanceof SortedMap);
>         }
>     }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-4605) SortedMap is not returned when another unrelated method exists in the interface

Posted by "Vassilis Virvilis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13493199#comment-13493199 ] 

Vassilis Virvilis commented on CXF-4605:
----------------------------------------

Here are the exceptions I get

WARNING: Interceptor for {http://iface/}TestInterface#{http://iface/}testComplexMapResult has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Could not determine how to read type: {http://iface/}anyType2anyTypeHashMap
	at org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamDataReader.java:58)
	at org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamDataReader.java:36)
	at org.apache.cxf.interceptor.DocLiteralInInterceptor.getPara(DocLiteralInInterceptor.java:303)
	at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:127)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:801)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1590)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1488)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1307)
	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:622)
	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:531)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:464)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:367)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:320)
	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:89)
	at org.apache.cxf.frontend.ClientProxy.invoke(ClientProxy.java:81)
	at $Proxy21.testComplexMapResult(Unknown Source)
	at client.TestClient.testComplexMapResult(TestClient.java:50)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.apache.cxf.aegis.DatabindingException: Could not determine how to read type: {http://iface/}anyType2anyTypeHashMap
	at org.apache.cxf.aegis.type.basic.ObjectType.readObject(ObjectType.java:125)
	at org.apache.cxf.aegis.type.basic.ObjectType.readObject(ObjectType.java:141)
	at org.apache.cxf.aegis.type.collection.MapType.readObject(MapType.java:92)
	at org.apache.cxf.aegis.AegisXMLStreamDataReader.read(AegisXMLStreamDataReader.java:83)
	at org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamDataReader.java:51)
	... 43 more

INFO: client.TestClient.testDirectComplexMapResult(TestClient.java:55): {key1={1=3}}
INFO: client.TestClient.testSortedMapResult(TestClient.java:70): {0=2, 1=3}

and

WARNING: Interceptor for {http://iface/}TestInterface#{http://iface/}testComplexTreeMapResult has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Could not determine how to read type: {http://iface/}anyType2anyTypeTreeMap
	at org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamDataReader.java:58)
	at org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamDataReader.java:36)
	at org.apache.cxf.interceptor.DocLiteralInInterceptor.getPara(DocLiteralInInterceptor.java:303)
	at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:127)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:801)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1590)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1488)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1307)
	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:622)
	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:531)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:464)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:367)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:320)
	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:89)
	at org.apache.cxf.frontend.ClientProxy.invoke(ClientProxy.java:81)
	at $Proxy21.testComplexTreeMapResult(Unknown Source)
	at client.TestClient.testComplexTreeMapResult(TestClient.java:95)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.apache.cxf.aegis.DatabindingException: Could not determine how to read type: {http://iface/}anyType2anyTypeTreeMap
	at org.apache.cxf.aegis.type.basic.ObjectType.readObject(ObjectType.java:125)
	at org.apache.cxf.aegis.type.basic.ObjectType.readObject(ObjectType.java:141)
	at org.apache.cxf.aegis.type.collection.MapType.readObject(MapType.java:92)
	at org.apache.cxf.aegis.AegisXMLStreamDataReader.read(AegisXMLStreamDataReader.java:83)
	at org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamDataReader.java:51)
	... 43 more

                
> SortedMap is not returned when another unrelated method exists in the interface
> -------------------------------------------------------------------------------
>
>                 Key: CXF-4605
>                 URL: https://issues.apache.org/jira/browse/CXF-4605
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.7.0
>         Environment: Debian unstable / tomcat7 / opennjdk7
>            Reporter: Vassilis Virvilis
>            Assignee: Daniel Kulp
>             Fix For: 2.7.1
>
>         Attachments: ws-test-issue-4605.tgz
>
>
>  During testing of bug 4534 I stumbled upon the following behavior. Subsets of tests were passing when run standalone but failing when run in the full test suite.
> So I have narrowed it down to one method that fails when another is uncommented in the interface.
> Interface:
>     // uncomment this for the next method to fail
>     // public Map<String, Map<Integer, Integer>> testDirectComplexMapResult();
>     // fail -- puts data into a hashmap instead of a SortedMap if the above is uncommented
>     public Map<String, SortedMap<Integer, Integer>> testDirectComplexTreeMapResult();
> Implementation:
>     //@Override
>     public Map<String, Map<Integer, Integer>> testDirectComplexMapResult() {
>         final Map<String, Map<Integer, Integer>> result = new HashMap<String, Map<Integer, Integer>>();
>         final TreeMap<Integer, Integer> map1 = new TreeMap<Integer, Integer>();
>         map1.put(1, 3);
>         result.put("key1", map1);
>         return result;
>     }
>     @Override
>     public Map<String, SortedMap<Integer, Integer>> testDirectComplexTreeMapResult() {
>         final Map<String, SortedMap<Integer, Integer>> result = new HashMap<String, SortedMap<Integer, Integer>>();
>         final TreeMap<Integer, Integer> map1 = new TreeMap<Integer, Integer>();
>         map1.put(1, 3);
>         map1.put(0, 2);
>         result.put("key1", map1);
>         return result;
>     }
> Client:
>     @Test
>     public void testDirectComplexTreeMapResult() {
>         final Map map = TestServiceFactory.getService()
>                 .testDirectComplexTreeMapResult();
>         log.info(map);
>         for (final Object vmap : map.values()) {
>             Assert.assertTrue(vmap instanceof SortedMap);
>         }
>     }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira