1 Reply Latest reply on Oct 27, 2011 5:50 AM by Elmes100

    RPC Fault faultString="Item with id '' already exists

    shipment_test
      Hi,

      I am trying to create a record in the database using dataservice. When I first tried creating a record it created successfully. But when I tried creating second time I get the folowing error.

      [RPC Fault faultString="Item with id '' already exists. Error on destination 'shipmentLookup'" faultCode="Local.Call.Failed" faultDetail="null"]
      at mx.data::ConcreteDataService/ http://www.adobe.com/2006/flex/mx/internal::dispatchFaultEvent()
      at Function/ http://adobe.com/AS3/2006/builtin::apply()
      at mx.rpc::AsyncDispatcher/private::timerEventHandler()
      at flash.utils::Timer/flash.utils:Timer::_timerDispatch()
      at flash.utils::Timer/flash.utils:Timer::tick()

      The configuration file datamanagent-config.xml is as follows.

      <?xml version="1.0" encoding="UTF-8"?>
      <service id="data-service"
      class="flex.data.DataService"
      messageTypes="flex.data.messages.DataMessage">

      <adapters>
      <adapter-definition id="actionscript" class="flex.data.adapters.ASObjectAdapter" default="true"/>
      <adapter-definition id="java-dao" class="flex.data.adapters.JavaAdapter"/>
      </adapters>

      <default-channels>
      <channel ref="my-rtmp"/>
      </default-channels>

      <destination id="shipmentLookup">
      <adapter ref="java-dao" />
      <properties>
      <source>com.asone.shipment.ShipmentLookup</source>
      <scope>session</scope>
      <metadata>
      <identity property="id"/>
      </metadata>
      <network>
      <session-timeout>20</session-timeout>
      <paging enabled="false" pageSize="10" />
      <throttle-inbound policy="ERROR" max-frequency="500"/>
      <throttle-outbound policy="REPLACE" max-frequency="500"/>
      </network>
      </properties>
      </destination>

      </service>

      Please do the needful to resolve this issue.

      Thanks and regards,
      Fazil.