```
<staging>
    <stage>
        <name>aaaa</name>
        <taskName>aa</taskName>
        <taskName>qwqwse</taskName>
        <taskName>qwe</taskName>
        <iconName>asdad</iconName>
        <iconName>dasd</iconName>
    </stage>

    <stage>
        <name>dasda</name>
        <taskName>asdak</taskName>
        <taskName>dasdk1</taskName>
        <taskName>dasdask2</taskName>
        <iconName>dasdn</iconName>
        <iconName>dasdcon</iconName>
    </stage>
</staging>

```

And this is my java class :

```
@XStreamAlias("stage")
public class Stage {

private String name;
private List<String> taskName;
private List<String> iconName;
}

```

I am using XStream 1.4.2 to convert that XML data to Java object.

I have seen couple of SO posts but still it does not solve my problem.

Its throwing following exception:

```
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$DuplicateFieldException: Duplicate field taskName
---- Debugging information ----
field               : taskName
class               : com.thbs.soaconnect.model.configuration.Stage
required-type       : com.thbs.soaconnect.model.configuration.Stage
converter-type      :      com.thoughtworks.xstream.converters.reflection.ReflectionConverter
path                : /soaConnect/staging/stage/taskName[2]
line number         : 28
class[1]            : java.util.ArrayList
converter-type[1]   :   com.thoughtworks.xstream.converters.collections.CollectionConverter
class[2]            : com.thbs.soaconnect.model.configuration.Configuration
version             : null

```

I tried the following way as suggested by many before :

```
xstream.addImplicitCollection(Stage.class,"taskName", String.class);
xstream.addImplicitCollection(Stage.class,"iconName", String.class);

```

Though it does not throws any exception, but it can not read the value, each element has.

Can you please help me.