Mapping Exception caused by Overloaded NeutronObject#setTenantId() 97/40897/4
authorAnil Vishnoi <vishnoianil@gmail.com>
Mon, 27 Jun 2016 21:18:26 +0000 (14:18 -0700)
committerAnil Vishnoi <vishnoianil@gmail.com>
Wed, 29 Jun 2016 21:58:08 +0000 (14:58 -0700)
Overloaded method for json property is causing Mapping Exception
com.fasterxml.jackson.databind.JsonMappingException:
Conflicting setter definitions for property tenantID:
org.opendaylight.neutron.spi.NeutronObject#setTenantID(1 params)
vs org.opendaylight.neutron.spi.NeutronObject#setTenantID(1 params)

Change-Id: I6278268203e5a3c593b260df02fb4a6143213d26
Signed-off-by: Anil Vishnoi <vishnoianil@gmail.com>
features/production/src/main/features/features.xml
neutron-spi/pom.xml
neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronObject.java

index 352f1b8951a37c84c6f1b22e172f9d96e3a11b0b..102b5b7bec113e17647250d372e93558b5a607b1 100644 (file)
@@ -33,6 +33,7 @@
     <bundle>mvn:org.opendaylight.neutron/neutron-spi/{{VERSION}}</bundle>
     <bundle>mvn:commons-net/commons-net/{{VERSION}}</bundle>
     <bundle>mvn:org.osgi/org.osgi.core/{{VERSION}}</bundle>
+    <bundle>mvn:com.fasterxml.jackson.core/jackson-annotations/{{VERSION}}</bundle>
   </feature>
   <feature name='odl-neutron-transcriber' version='${project.version}' description="OpenDaylight :: Neutron :: Implementation">
     <feature version='${project.version}'>odl-neutron-spi</feature>
index 9123e156eb36980bacde9d4092e929971e5649d8..e0d7e47add80995e10b58926ae3e34e10a77747b 100644 (file)
        <artifactId>org.eclipse.persistence.moxy</artifactId>
        <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-annotations</artifactId>
+    </dependency>
   </dependencies>
   <build>
     <plugins>
index 7ccbe695072f91eac5b6e3e64bee349b740678ce..dd32f8b17a51fd2f7c5b331788330f1a0aa1fcfd 100644 (file)
@@ -16,6 +16,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid;
 
 @XmlRootElement
@@ -46,6 +47,7 @@ public class NeutronObject extends Neutron_ID implements Serializable, INeutronO
     }
 
     @Override
+    @JsonIgnore
     public void setTenantID(Uuid tenantID) {
         this.tenantID = tenantID.getValue().replace("-", "");
     }