You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Brent Daniel (JIRA)" <de...@tuscany.apache.org> on 2009/02/24 23:56:01 UTC

[jira] Created: (TUSCANY-2871) ClassCastException using atom-abdera binding

ClassCastException using atom-abdera binding
--------------------------------------------

                 Key: TUSCANY-2871
                 URL: https://issues.apache.org/jira/browse/TUSCANY-2871
             Project: Tuscany
          Issue Type: Bug
          Components: Java SCA ATOM Binding Extension
    Affects Versions: Java-SCA-1.4
            Reporter: Brent Daniel


If you use the atom-abdera binding with a reference that points to an RSS feed rather than an atom feed, you get a ClassCastException rather than a reasonable error. This occurs in the Tuscany feed-aggregator sample, but the exception is being swallowed in the java implementation.

>From FeedAggregator.composite in the feed-aggregator sample (the uri points to an RSS 2.0 feed): 
<reference name="atomFeed1">
   	 		<tuscany:binding.atom uri="http://www.oreillynet.com/pub/feed/35"/>
  </reference>

The following code in AtomBindingInvoker (346-348) results in the ClassCastException:
     Document<Feed> doc = abderaParser.parse(new InputStreamReader(getMethod.getResponseBodyAsStream()));
                    parsing = true;
                    Feed feed = doc.getRoot();

doc.getRoot() returns an instance of org.apache.abdera.parser.stax.FOMExtensibleElement rather than Feed. 


AggregatorImpl in the feed-aggregator sample is swallowing the exception here (85-89):
 if (atomFeed1 != null) {
            try {
                entries.addAll(atomFeed1.getFeed().getEntries());
            } catch (Exception e) {}
        }




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


[jira] Resolved: (TUSCANY-2871) ClassCastException using atom-abdera binding

Posted by "Dan Becker (JIRA)" <de...@tuscany.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Becker resolved TUSCANY-2871.
---------------------------------

       Resolution: Fixed
    Fix Version/s: Java-SCA-Next

Two fixes. 1) O'Reilly's feed changed from Atom to RSS. Updated with new Atom feed. 2) The exception has been updated to state "The feed at URI XYZ cannot be parsed as an Atom feed." It is still up to the client to display this issue. Thanks Brent.
Resolved in 1.x at revision: 750972  


> ClassCastException using atom-abdera binding
> --------------------------------------------
>
>                 Key: TUSCANY-2871
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2871
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA ATOM Binding Extension
>    Affects Versions: Java-SCA-1.4
>            Reporter: Brent Daniel
>            Assignee: Dan Becker
>             Fix For: Java-SCA-Next
>
>
> If you use the atom-abdera binding with a reference that points to an RSS feed rather than an atom feed, you get a ClassCastException rather than a reasonable error. This occurs in the Tuscany feed-aggregator sample, but the exception is being swallowed in the java implementation.
> From FeedAggregator.composite in the feed-aggregator sample (the uri points to an RSS 2.0 feed): 
> <reference name="atomFeed1">
>    	 		<tuscany:binding.atom uri="http://www.oreillynet.com/pub/feed/35"/>
>   </reference>
> The following code in AtomBindingInvoker (346-348) results in the ClassCastException:
>      Document<Feed> doc = abderaParser.parse(new InputStreamReader(getMethod.getResponseBodyAsStream()));
>                     parsing = true;
>                     Feed feed = doc.getRoot();
> doc.getRoot() returns an instance of org.apache.abdera.parser.stax.FOMExtensibleElement rather than Feed. 
> AggregatorImpl in the feed-aggregator sample is swallowing the exception here (85-89):
>  if (atomFeed1 != null) {
>             try {
>                 entries.addAll(atomFeed1.getFeed().getEntries());
>             } catch (Exception e) {}
>         }

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


[jira] Assigned: (TUSCANY-2871) ClassCastException using atom-abdera binding

Posted by "Dan Becker (JIRA)" <de...@tuscany.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Becker reassigned TUSCANY-2871:
-----------------------------------

    Assignee: Dan Becker

> ClassCastException using atom-abdera binding
> --------------------------------------------
>
>                 Key: TUSCANY-2871
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2871
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA ATOM Binding Extension
>    Affects Versions: Java-SCA-1.4
>            Reporter: Brent Daniel
>            Assignee: Dan Becker
>
> If you use the atom-abdera binding with a reference that points to an RSS feed rather than an atom feed, you get a ClassCastException rather than a reasonable error. This occurs in the Tuscany feed-aggregator sample, but the exception is being swallowed in the java implementation.
> From FeedAggregator.composite in the feed-aggregator sample (the uri points to an RSS 2.0 feed): 
> <reference name="atomFeed1">
>    	 		<tuscany:binding.atom uri="http://www.oreillynet.com/pub/feed/35"/>
>   </reference>
> The following code in AtomBindingInvoker (346-348) results in the ClassCastException:
>      Document<Feed> doc = abderaParser.parse(new InputStreamReader(getMethod.getResponseBodyAsStream()));
>                     parsing = true;
>                     Feed feed = doc.getRoot();
> doc.getRoot() returns an instance of org.apache.abdera.parser.stax.FOMExtensibleElement rather than Feed. 
> AggregatorImpl in the feed-aggregator sample is swallowing the exception here (85-89):
>  if (atomFeed1 != null) {
>             try {
>                 entries.addAll(atomFeed1.getFeed().getEntries());
>             } catch (Exception e) {}
>         }

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


[jira] Resolved: (TUSCANY-2871) ClassCastException using atom-abdera binding

Posted by "Luciano Resende (JIRA)" <de...@tuscany.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Luciano Resende resolved TUSCANY-2871.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: Java-SCA-1.5

Fixed, we are now providing a better exception when a feed uri has a non-supported format.

> ClassCastException using atom-abdera binding
> --------------------------------------------
>
>                 Key: TUSCANY-2871
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2871
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA ATOM Binding Extension
>    Affects Versions: Java-SCA-1.4
>            Reporter: Brent Daniel
>            Assignee: Luciano Resende
>             Fix For: Java-SCA-1.5, Java-SCA-Next
>
>
> If you use the atom-abdera binding with a reference that points to an RSS feed rather than an atom feed, you get a ClassCastException rather than a reasonable error. This occurs in the Tuscany feed-aggregator sample, but the exception is being swallowed in the java implementation.
> From FeedAggregator.composite in the feed-aggregator sample (the uri points to an RSS 2.0 feed): 
> <reference name="atomFeed1">
>    	 		<tuscany:binding.atom uri="http://www.oreillynet.com/pub/feed/35"/>
>   </reference>
> The following code in AtomBindingInvoker (346-348) results in the ClassCastException:
>      Document<Feed> doc = abderaParser.parse(new InputStreamReader(getMethod.getResponseBodyAsStream()));
>                     parsing = true;
>                     Feed feed = doc.getRoot();
> doc.getRoot() returns an instance of org.apache.abdera.parser.stax.FOMExtensibleElement rather than Feed. 
> AggregatorImpl in the feed-aggregator sample is swallowing the exception here (85-89):
>  if (atomFeed1 != null) {
>             try {
>                 entries.addAll(atomFeed1.getFeed().getEntries());
>             } catch (Exception e) {}
>         }

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


[jira] Reopened: (TUSCANY-2871) ClassCastException using atom-abdera binding

Posted by "Luciano Resende (JIRA)" <de...@tuscany.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Luciano Resende reopened TUSCANY-2871:
--------------------------------------

      Assignee:     (was: Dan Becker)

I'm seeing the same issues in other test cases because it's pointing to an rss feed.
We should try to fix this in the binding code, rather then just changing the feed to be an atom feed. 

> ClassCastException using atom-abdera binding
> --------------------------------------------
>
>                 Key: TUSCANY-2871
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2871
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA ATOM Binding Extension
>    Affects Versions: Java-SCA-1.4
>            Reporter: Brent Daniel
>             Fix For: Java-SCA-Next
>
>
> If you use the atom-abdera binding with a reference that points to an RSS feed rather than an atom feed, you get a ClassCastException rather than a reasonable error. This occurs in the Tuscany feed-aggregator sample, but the exception is being swallowed in the java implementation.
> From FeedAggregator.composite in the feed-aggregator sample (the uri points to an RSS 2.0 feed): 
> <reference name="atomFeed1">
>    	 		<tuscany:binding.atom uri="http://www.oreillynet.com/pub/feed/35"/>
>   </reference>
> The following code in AtomBindingInvoker (346-348) results in the ClassCastException:
>      Document<Feed> doc = abderaParser.parse(new InputStreamReader(getMethod.getResponseBodyAsStream()));
>                     parsing = true;
>                     Feed feed = doc.getRoot();
> doc.getRoot() returns an instance of org.apache.abdera.parser.stax.FOMExtensibleElement rather than Feed. 
> AggregatorImpl in the feed-aggregator sample is swallowing the exception here (85-89):
>  if (atomFeed1 != null) {
>             try {
>                 entries.addAll(atomFeed1.getFeed().getEntries());
>             } catch (Exception e) {}
>         }

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


[jira] Assigned: (TUSCANY-2871) ClassCastException using atom-abdera binding

Posted by "Luciano Resende (JIRA)" <de...@tuscany.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Luciano Resende reassigned TUSCANY-2871:
----------------------------------------

    Assignee: Luciano Resende

> ClassCastException using atom-abdera binding
> --------------------------------------------
>
>                 Key: TUSCANY-2871
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2871
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA ATOM Binding Extension
>    Affects Versions: Java-SCA-1.4
>            Reporter: Brent Daniel
>            Assignee: Luciano Resende
>             Fix For: Java-SCA-Next
>
>
> If you use the atom-abdera binding with a reference that points to an RSS feed rather than an atom feed, you get a ClassCastException rather than a reasonable error. This occurs in the Tuscany feed-aggregator sample, but the exception is being swallowed in the java implementation.
> From FeedAggregator.composite in the feed-aggregator sample (the uri points to an RSS 2.0 feed): 
> <reference name="atomFeed1">
>    	 		<tuscany:binding.atom uri="http://www.oreillynet.com/pub/feed/35"/>
>   </reference>
> The following code in AtomBindingInvoker (346-348) results in the ClassCastException:
>      Document<Feed> doc = abderaParser.parse(new InputStreamReader(getMethod.getResponseBodyAsStream()));
>                     parsing = true;
>                     Feed feed = doc.getRoot();
> doc.getRoot() returns an instance of org.apache.abdera.parser.stax.FOMExtensibleElement rather than Feed. 
> AggregatorImpl in the feed-aggregator sample is swallowing the exception here (85-89):
>  if (atomFeed1 != null) {
>             try {
>                 entries.addAll(atomFeed1.getFeed().getEntries());
>             } catch (Exception e) {}
>         }

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