Thread: [Simple-support] Cant convert java.util.arrayList?!!?!
Brought to you by:
niallg
|
From: meghiddo <mat...@ho...> - 2009-06-08 22:27:44
|
I was so close to finally having this working. WHen i ran my methods I got
this though:
org.simpleframework.xml.transform.TransformException: Transform of class
[Ljava.util.ArrayList; not supported
and my xml file came out only partly finished:
<measurementProjectCollection>
<measurementProject>
<projectId>wsnPondMeasurements</projectId>
<name>WSN Pond Measurements</name>
It cut off everything after that which was:
<permissions class="java.util.ArrayList" />
<devices class="java.util.ArrayList" />
<channels class="java.util.ArrayList" />
</measurementProject>
<measurementProject>
<projectId>exampleProject1</projectId>
<name>exampleProject1</name>
<permissions class="java.util.ArrayList" />
<devices class="java.util.ArrayList" />
<channels class="java.util.ArrayList" />
</measurementProject>
</measurementProjectCollection>
So apparently it does not want to put the permissions, devices, or channels
tags into xml form.
Please tell me there is a way around this, my project is so close to
working, I just need to get that xml converted to an xml file!
--
View this message in context: http://www.nabble.com/Cant-convert-java.util.arrayList-%21%21-%21-tp23933276p23933276.html
Sent from the Simple XML Serialization mailing list archive at Nabble.com.
|
|
From: meghiddo <mat...@ho...> - 2009-06-14 21:53:57
|
meghiddo wrote: > > I was so close to finally having this working. WHen i ran my methods I > got this though: > > org.simpleframework.xml.transform.TransformException: Transform of class > [Ljava.util.ArrayList; not supported > > and my xml file came out only partly finished: > > <measurementProjectCollection> > <measurementProject> > <projectId>wsnPondMeasurements</projectId> > <name>WSN Pond Measurements</name> > > It cut off everything after that which was: > > <permissions class="java.util.ArrayList" /> > <devices class="java.util.ArrayList" /> > <channels class="java.util.ArrayList" /> > </measurementProject> > <measurementProject> > <projectId>exampleProject1</projectId> > <name>exampleProject1</name> > <permissions class="java.util.ArrayList" /> > <devices class="java.util.ArrayList" /> > <channels class="java.util.ArrayList" /> > </measurementProject> > </measurementProjectCollection> > > So apparently it does not want to put the permissions, devices, or > channels tags into xml form. > > Please tell me there is a way around this, my project is so close to > working, I just need to get that xml converted to an xml file! > nothing at all? It seems like a pretty straightforward question, is it possible to use "ArrayList[] devices;" to in the xml output? -- View this message in context: http://www.nabble.com/Cant-convert-java.util.arrayList-%21%21-%21-tp23933276p24026131.html Sent from the Simple XML Serialization mailing list archive at Nabble.com. |
|
From: <Nia...@ub...> - 2009-06-15 08:42:11
|
Hi, You can not serialize an array of ArrayList objects. Each Collection declaration needs to be annotated with @ElementList. You are probably annotating with @ElementArray or @Element. Niall -----Original Message----- From: meghiddo [mailto:mat...@ho...] Sent: 14 June 2009 22:54 To: sim...@li... Subject: Re: [Simple-support] Cant convert java.util.arrayList?!!?! meghiddo wrote: > > I was so close to finally having this working. WHen i ran my methods > I got this though: > > org.simpleframework.xml.transform.TransformException: Transform of > class [Ljava.util.ArrayList; not supported > > and my xml file came out only partly finished: > > <measurementProjectCollection> > <measurementProject> > <projectId>wsnPondMeasurements</projectId> > <name>WSN Pond Measurements</name> > > It cut off everything after that which was: > > <permissions class="java.util.ArrayList" /> > <devices class="java.util.ArrayList" /> > <channels class="java.util.ArrayList" /> > </measurementProject> > <measurementProject> > <projectId>exampleProject1</projectId> > <name>exampleProject1</name> > <permissions class="java.util.ArrayList" /> > <devices class="java.util.ArrayList" /> > <channels class="java.util.ArrayList" /> > </measurementProject> > </measurementProjectCollection> > > So apparently it does not want to put the permissions, devices, or > channels tags into xml form. > > Please tell me there is a way around this, my project is so close to > working, I just need to get that xml converted to an xml file! > nothing at all? It seems like a pretty straightforward question, is it possible to use "ArrayList[] devices;" to in the xml output? -- View this message in context: http://www.nabble.com/Cant-convert-java.util.arrayList-%21%21-%21-tp2393 3276p24026131.html Sent from the Simple XML Serialization mailing list archive at Nabble.com. ------------------------------------------------------------------------ ------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Simple-support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simple-support Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mails are not encrypted and cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. UBS Limited is a company registered in England & Wales under company number 2035362, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. UBS AG (London Branch) is registered as a branch of a foreign company under number BR004507, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. UBS Clearing and Execution Services Limited is a company registered in England & Wales under company number 03123037, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. UBS reserves the right to retain all messages. Messages are protected and accessed only in legally justified cases. |