History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: JETTISON-26
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Dejan Bosanac
Reporter: Paul Lindner
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Jettison

Class cast exception while converting Atom Feed

Created: 30/Oct/07 02:11 PM   Updated: 01/Mar/08 12:13 PM
Component/s: None
Affects Version/s: 1.0-RC2
Fix Version/s: 1.0

Time Tracking:
Not Specified

File Attachments: 1. XML File 1000.xml (7 kb)

Environment: SuSE 10 - Java 1.6 u3


 Description  « Hide
Please see the XML from this URL
http://api.hi5.com/rest/feed/journal/1000

Enunciate publishes this as a JSON endopoint here:

http://api.hi5.com/json/feed/journal/1000

That url throws an error:
>
> java.lang.ClassCastException: org.codehaus.jettison.json.JSONArray
> cannot be cast to org.codehaus.jettison.json.JSONObject
>
org.codehaus.jettison.mapped.MappedXMLStreamWriter.writeAttribute(MappedXMLStreamWriter.java:93)
>
org.codehaus.jettison.mapped.MappedXMLStreamWriter.writeAttribute(MappedXMLStreamWriter.java:130)
>
org.codehaus.jettison.mapped.MappedXMLStreamWriter.writeAttribute(MappedXMLStreamWriter.java:134)

The badgerfish implementation doesn't have this problem. The value one does.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Dejan Bosanac - 14/Feb/08 09:04 AM
Can you try your code with the latests snapshot and see if it works ... http://snapshots.repository.codehaus.org/org/codehaus/jettison/jettison/1.0-RC3-SNAPSHOT/

If the problem still exists, can you produce valid test case or at least provide us with the info what do you use to create a feed (Rome?)


Paul Lindner - 14/Feb/08 06:22 PM
Still occurs with latest snapshot...

I'll attach some sample XML that dies...


Paul Lindner - 14/Feb/08 06:24 PM
Here's an xml file that causes the error.

Dejan Bosanac - 21/Feb/08 04:52 AM
The problem was related to writing attributes to array members. It's fixed now. I've tested it (additionally) by transforming the xml you provided to json with XStream copier. We'll make a release soon (today?) so I haven't made any snapshots.

Vincent Vanderheeren - 22/Feb/08 04:35 AM
What is the status of the new release? Thanx.

Dejan Bosanac - 22/Feb/08 05:00 AM
Hi Vincent, I think it will be released today. Dan has some minor issue yesterday, so stay tuned

Vincent Vanderheeren - 29/Feb/08 01:36 AM
Hey Dejan, thanks for your quick response. However it would make it somewhat easier if I know when you will release a new version. It is just that I need to tell a customer when I will make a new release myself. Thanx .

Dejan Bosanac - 01/Mar/08 12:13 PM
Hi,

you can find a 1.0 final release at the following URL http://repository.codehaus.org/org/codehaus/jettison/jettison/1.0/