You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by "Bhaskar Maddala (JIRA)" <ji...@apache.org> on 2007/12/14 11:04:43 UTC

[jira] Created: (WSCOMMONS-286) getChildrenWithQName.next throws ClassCastException, OMChildrenQNameIterator implements Iterator but does not satisfy published interface behavior

getChildrenWithQName.next throws ClassCastException, OMChildrenQNameIterator implements Iterator but does not satisfy published interface behavior
--------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: WSCOMMONS-286
                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-286
             Project: WS-Commons
          Issue Type: Bug
          Components: AXIOM
         Environment: OS : Any
Axiom Version 1.2.5
Java Runtime version : 1.5
            Reporter: Bhaskar Maddala


Given the following xml fragment

        <ns1:BOSettings xmlns:ns1="http://a.b.c/pro">
                <ns1:ObjectType>X</ns1:ObjectType>
        </ns1:BOSettings>

Iterator objectTypeIt = bosettings.getChildrenWithName(helper.createQNameForField("ObjectType"));

invoking 

OMElement element = objectTypeIt.next();

 throws a ClassCastException

the OMChildrenQNameIterator return the first child which in this case is of type OMText

the issue can be fixed by first calling hasNext and then next, the hasNext method has a side effect which allows the next to proceed correctly.

This behavior does not obey the published Iterator documentation, the following is expected Iterator behavior

Iterator<Integer> it = Arrays.asList(new Integer[] { Integer.valueOf(1), Integer.valueOf(2),});

do
{
   it.next();
} while(it.hasNext());

will work correctly and is the expected behavior.

Whereas calling it.next on an Iterator instance of type OMChildrenQNameIterator will result in a ClassCastException

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


[jira] Issue Comment Edited: (WSCOMMONS-286) getChildrenWithQName.next throws ClassCastException, OMChildrenQNameIterator implements Iterator but does not satisfy published interface behavior

Posted by "Bhaskar Maddala (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSCOMMONS-286?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12551807 ] 

maddalab edited comment on WSCOMMONS-286 at 12/14/07 6:14 AM:
---------------------------------------------------------------------

Attachment _286.diff implements a unit test that shows the bug as well as the fix in OMChildrenQNameIterator

      was (Author: maddalab):
    Implements a unit test that shows the bug as well as the fix in OMChildrenQNameIterator
  
> getChildrenWithQName.next throws ClassCastException, OMChildrenQNameIterator implements Iterator but does not satisfy published interface behavior
> --------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-286
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-286
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: AXIOM
>         Environment: OS : Any
> Axiom Version 1.2.5
> Java Runtime version : 1.5
>            Reporter: Bhaskar Maddala
>         Attachments: _286.diff
>
>
> Given the following xml fragment
>         <ns1:BOSettings xmlns:ns1="http://a.b.c/pro">
>                 <ns1:ObjectType>X</ns1:ObjectType>
>         </ns1:BOSettings>
> Iterator objectTypeIt = bosettings.getChildrenWithName(helper.createQNameForField("ObjectType"));
> invoking 
> OMElement element = objectTypeIt.next();
>  throws a ClassCastException
> the OMChildrenQNameIterator return the first child which in this case is of type OMText
> the issue can be fixed by first calling hasNext and then next, the hasNext method has a side effect which allows the next to proceed correctly.
> This behavior does not obey the published Iterator documentation, the following is expected Iterator behavior
> Iterator<Integer> it = Arrays.asList(new Integer[] { Integer.valueOf(1), Integer.valueOf(2),});
> do
> {
>    it.next();
> } while(it.hasNext());
> will work correctly and is the expected behavior.
> Whereas calling it.next on an Iterator instance of type OMChildrenQNameIterator will result in a ClassCastException

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


[jira] Updated: (WSCOMMONS-286) getChildrenWithQName.next throws ClassCastException, OMChildrenQNameIterator implements Iterator but does not satisfy published interface behavior

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

Rich Scheuerle updated WSCOMMONS-286:
-------------------------------------

    Priority: Blocker  (was: Major)
    Assignee: Rich Scheuerle

This should be considered for 1.2.6.  There have been recent changes in this area of code, and perhaps this issue is now fixed.

I will assign it to myself for evaluation.

> getChildrenWithQName.next throws ClassCastException, OMChildrenQNameIterator implements Iterator but does not satisfy published interface behavior
> --------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-286
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-286
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: AXIOM
>         Environment: OS : Any
> Axiom Version 1.2.5
> Java Runtime version : 1.5
>            Reporter: Bhaskar Maddala
>            Assignee: Rich Scheuerle
>            Priority: Blocker
>         Attachments: _286.diff
>
>
> Given the following xml fragment
>         <ns1:BOSettings xmlns:ns1="http://a.b.c/pro">
>                 <ns1:ObjectType>X</ns1:ObjectType>
>         </ns1:BOSettings>
> Iterator objectTypeIt = bosettings.getChildrenWithName(helper.createQNameForField("ObjectType"));
> invoking 
> OMElement element = objectTypeIt.next();
>  throws a ClassCastException
> the OMChildrenQNameIterator return the first child which in this case is of type OMText
> the issue can be fixed by first calling hasNext and then next, the hasNext method has a side effect which allows the next to proceed correctly.
> This behavior does not obey the published Iterator documentation, the following is expected Iterator behavior
> Iterator<Integer> it = Arrays.asList(new Integer[] { Integer.valueOf(1), Integer.valueOf(2),});
> do
> {
>    it.next();
> } while(it.hasNext());
> will work correctly and is the expected behavior.
> Whereas calling it.next on an Iterator instance of type OMChildrenQNameIterator will result in a ClassCastException

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


[jira] Work started: (WSCOMMONS-286) getChildrenWithQName.next throws ClassCastException, OMChildrenQNameIterator implements Iterator but does not satisfy published interface behavior

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

Work on WSCOMMONS-286 started by Rich Scheuerle.

> getChildrenWithQName.next throws ClassCastException, OMChildrenQNameIterator implements Iterator but does not satisfy published interface behavior
> --------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-286
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-286
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: AXIOM
>         Environment: OS : Any
> Axiom Version 1.2.5
> Java Runtime version : 1.5
>            Reporter: Bhaskar Maddala
>            Assignee: Rich Scheuerle
>            Priority: Blocker
>         Attachments: _286.diff
>
>
> Given the following xml fragment
>         <ns1:BOSettings xmlns:ns1="http://a.b.c/pro">
>                 <ns1:ObjectType>X</ns1:ObjectType>
>         </ns1:BOSettings>
> Iterator objectTypeIt = bosettings.getChildrenWithName(helper.createQNameForField("ObjectType"));
> invoking 
> OMElement element = objectTypeIt.next();
>  throws a ClassCastException
> the OMChildrenQNameIterator return the first child which in this case is of type OMText
> the issue can be fixed by first calling hasNext and then next, the hasNext method has a side effect which allows the next to proceed correctly.
> This behavior does not obey the published Iterator documentation, the following is expected Iterator behavior
> Iterator<Integer> it = Arrays.asList(new Integer[] { Integer.valueOf(1), Integer.valueOf(2),});
> do
> {
>    it.next();
> } while(it.hasNext());
> will work correctly and is the expected behavior.
> Whereas calling it.next on an Iterator instance of type OMChildrenQNameIterator will result in a ClassCastException

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


[jira] Resolved: (WSCOMMONS-286) getChildrenWithQName.next throws ClassCastException, OMChildrenQNameIterator implements Iterator but does not satisfy published interface behavior

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

Rich Scheuerle resolved WSCOMMONS-286.
--------------------------------------

    Resolution: Fixed

Revision = 634675

> getChildrenWithQName.next throws ClassCastException, OMChildrenQNameIterator implements Iterator but does not satisfy published interface behavior
> --------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-286
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-286
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: AXIOM
>         Environment: OS : Any
> Axiom Version 1.2.5
> Java Runtime version : 1.5
>            Reporter: Bhaskar Maddala
>            Assignee: Rich Scheuerle
>            Priority: Blocker
>         Attachments: _286.diff
>
>
> Given the following xml fragment
>         <ns1:BOSettings xmlns:ns1="http://a.b.c/pro">
>                 <ns1:ObjectType>X</ns1:ObjectType>
>         </ns1:BOSettings>
> Iterator objectTypeIt = bosettings.getChildrenWithName(helper.createQNameForField("ObjectType"));
> invoking 
> OMElement element = objectTypeIt.next();
>  throws a ClassCastException
> the OMChildrenQNameIterator return the first child which in this case is of type OMText
> the issue can be fixed by first calling hasNext and then next, the hasNext method has a side effect which allows the next to proceed correctly.
> This behavior does not obey the published Iterator documentation, the following is expected Iterator behavior
> Iterator<Integer> it = Arrays.asList(new Integer[] { Integer.valueOf(1), Integer.valueOf(2),});
> do
> {
>    it.next();
> } while(it.hasNext());
> will work correctly and is the expected behavior.
> Whereas calling it.next on an Iterator instance of type OMChildrenQNameIterator will result in a ClassCastException

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


[jira] Commented: (WSCOMMONS-286) getChildrenWithQName.next throws ClassCastException, OMChildrenQNameIterator implements Iterator but does not satisfy published interface behavior

Posted by "Clement Chan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WSCOMMONS-286?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12576015#action_12576015 ] 

Clement Chan commented on WSCOMMONS-286:
----------------------------------------

Dear Jira,
I would like to post an error I kept facing when I run TCPMON from D:\TCPMON\tcpmon-1.0-bin\build\tcpmon.bat

I'm quite new on this mail listing, how do get help for the below?? I just want to run TCPMon to query some web services.

D:\TCPMON\tcpmon-1.0-bin\build>rem Run the java exe with tcpmon jar

D:\TCPMON\tcpmon-1.0-bin\build>java -cp ./tcpmon-1.0.jar org.apache.ws.commons.t
cpmon.TCPMon
java.lang.NoClassDefFoundError: javax/xml/transform/Source
        at org.apache.ws.commons.tcpmon.AdminPane.<init>(AdminPane.java:418)
        at org.apache.ws.commons.tcpmon.TCPMon.<init>(TCPMon.java:78)
        at org.apache.ws.commons.tcpmon.TCPMon.<init>(TCPMon.java:119)
        at org.apache.ws.commons.tcpmon.TCPMon.main(TCPMon.java:172)
 


Rgds,
Clement Chan
(chanlman@yahoo.com)



> getChildrenWithQName.next throws ClassCastException, OMChildrenQNameIterator implements Iterator but does not satisfy published interface behavior
> --------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-286
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-286
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: AXIOM
>         Environment: OS : Any
> Axiom Version 1.2.5
> Java Runtime version : 1.5
>            Reporter: Bhaskar Maddala
>            Assignee: Rich Scheuerle
>            Priority: Blocker
>         Attachments: _286.diff
>
>
> Given the following xml fragment
>         <ns1:BOSettings xmlns:ns1="http://a.b.c/pro">
>                 <ns1:ObjectType>X</ns1:ObjectType>
>         </ns1:BOSettings>
> Iterator objectTypeIt = bosettings.getChildrenWithName(helper.createQNameForField("ObjectType"));
> invoking 
> OMElement element = objectTypeIt.next();
>  throws a ClassCastException
> the OMChildrenQNameIterator return the first child which in this case is of type OMText
> the issue can be fixed by first calling hasNext and then next, the hasNext method has a side effect which allows the next to proceed correctly.
> This behavior does not obey the published Iterator documentation, the following is expected Iterator behavior
> Iterator<Integer> it = Arrays.asList(new Integer[] { Integer.valueOf(1), Integer.valueOf(2),});
> do
> {
>    it.next();
> } while(it.hasNext());
> will work correctly and is the expected behavior.
> Whereas calling it.next on an Iterator instance of type OMChildrenQNameIterator will result in a ClassCastException

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


[jira] Updated: (WSCOMMONS-286) getChildrenWithQName.next throws ClassCastException, OMChildrenQNameIterator implements Iterator but does not satisfy published interface behavior

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

Bhaskar Maddala updated WSCOMMONS-286:
--------------------------------------

    Attachment: _286.diff

Implements a unit test that shows the bug as well as the fix in OMChildrenQNameIterator

> getChildrenWithQName.next throws ClassCastException, OMChildrenQNameIterator implements Iterator but does not satisfy published interface behavior
> --------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-286
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-286
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: AXIOM
>         Environment: OS : Any
> Axiom Version 1.2.5
> Java Runtime version : 1.5
>            Reporter: Bhaskar Maddala
>         Attachments: _286.diff
>
>
> Given the following xml fragment
>         <ns1:BOSettings xmlns:ns1="http://a.b.c/pro">
>                 <ns1:ObjectType>X</ns1:ObjectType>
>         </ns1:BOSettings>
> Iterator objectTypeIt = bosettings.getChildrenWithName(helper.createQNameForField("ObjectType"));
> invoking 
> OMElement element = objectTypeIt.next();
>  throws a ClassCastException
> the OMChildrenQNameIterator return the first child which in this case is of type OMText
> the issue can be fixed by first calling hasNext and then next, the hasNext method has a side effect which allows the next to proceed correctly.
> This behavior does not obey the published Iterator documentation, the following is expected Iterator behavior
> Iterator<Integer> it = Arrays.asList(new Integer[] { Integer.valueOf(1), Integer.valueOf(2),});
> do
> {
>    it.next();
> } while(it.hasNext());
> will work correctly and is the expected behavior.
> Whereas calling it.next on an Iterator instance of type OMChildrenQNameIterator will result in a ClassCastException

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org