Re: [Simple-support] ValueRequiredException
Brought to you by:
niallg
|
From: Niall G. <gal...@ya...> - 2011-04-29 23:48:53
|
loadedSources does not exist in the XML, make the associated annotation required=false.
--- On Fri, 29/4/11, Arjan Duijs <arj...@gm...> wrote:
From: Arjan Duijs <arj...@gm...>
Subject: [Simple-support] ValueRequiredException
To: sim...@li...
Received: Friday, 29 April, 2011, 9:02 AM
Hi,
I am getting the following exception:
04-29 15:50:15.548: VERBOSE/MyActivity(831): XML Parsing Exception = org.simpleframework.xml.core.ValueRequiredException: Unable to satisfy @org.simpleframework.xml.ElementList(data=false, empty=true, entry=, inline=false, name=, required=true, type=void) on field 'loadedSources' public java.util.List com.arjan.pctools.model.Options.loadedSources for class com.arjan.pctools.model.Options at line 13
I dont really get the exception, since i do nothing different then an elementlist earlier in the Options.class.
any idea on what this (can) mean?
file options.class:
import org.simpleframework.xml.Element;
import org.simpleframework.xml.ElementList;
import com.arjan.pctools.model.Gamemode;
import com.arjan.pctools.model.LoadedSources;
@Element(name="options")
public class Options {
@ElementList
public List<Gamemode> gamemode;
@Element(required=false)
public int revisedWeaponMode;
@Element(required=false)
public int spellSorting;
@Element(required=false)
public int textOffhandIndication;
@Element(required=false)
public int armorAsDamageReduction;
@ElementList
public List<LoadedSources> loadedSources;
}
Class LoadedSources:
package com.arjan.pctools.model;
import java.util.List;
import org.simpleframework.xml.Element;
import org.simpleframework.xml.ElementList;
@Element(name="loadedSources")
public class LoadedSources {
@ElementList
public List<Name> name;
@Element(name="name")
public class Name {
@ElementList
public String name;
}
}
and the XML that is loaded:
<?xml version="1.0" encoding="UTF-8"?>
<character>
<etools-version>1.5.666</etools-version>
<name>Vangkor</name>
<player>Eric Noah</player>
<gender>Male</gender>
<hair>Black, balding</hair>
<eyes>Dark brown</eyes>
<race>Half-Orc</race>
<experience>67145</experience>
<options>
<gamemode>
<name>D&&D v3.0e</name>
<index>0</index>
<style>0</style>
<dbase>Database_v30e.mdb</dbase>
</gamemode>
<revised-weapon-mode>0</revised-weapon-mode>
<spell-sorting>-1</spell-sorting>
<text-offhand-indication>0</text-offhand-indication>
<armor-as-damage-reduction>0</armor-as-damage-reduction>
<loaded-sources>
<name>Players Handbook 3e</name>
<name>Dungeon Masters Guide 3e</name>
<name>Monster Manual 3e</name>
</loaded-sources>
</options>
</character>
thanks
Arjan
-----Inline Attachment Follows-----
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
-----Inline Attachment Follows-----
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
|