3 Replies Latest reply on Aug 23, 2006 1:41 PM by mark_in_fl

    createItem Error

    mark_in_fl
      Hello,
      I am using a data service configured as follows:

      <destination id="hr_itemsvc">

      <adapter ref="java-dao" />

      <properties>
      <source>com.trl.flexds.assemblers.TimeItemAssembler</source>
      <scope>application</scope>

      <metadata>
      <identity property="itemId" type="java.lang.Long"/>
      </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>

      The assembler is declared as: public class TimeSheetAssembler extends AbstractAssembler
      and implements the method: public void createItem(Object oTarg)
      When I make the ActionScript call: dsTimeItem.createItem(oItem); (dsTimeItem defined by: dsTimeItem = new DataService("hr_itemsvc");),
      I get the error: "Could not locate sync-method for destination hr_itemsvc"
      According to the documentation, I do not have to define a "sync-method" when I implement an assembler. Why am I getting this error?

      Thanks for any assistance,
      Mark
        • 1. Re: createItem Error
          sanclementetech Level 1
          Because of this new DataService("hr_itemsvc");

          You may want to create a temporary object first then call your createItem.
          • 2. Re: createItem Error
            seth_hodgson Level 1
            Hi Mark,

            Can you provide the full error/fault information? I don't see that specific error string.

            When you extend the AbstractAssembler you're right, you don't need to define your sync-method in the config file as the Assembler interface defines the required methods. As long as your assembler implements Assembler or extends AbstractAssembler you shouldn't be hitting the code path that checks for a sync method.

            Thanks,
            Seth
            • 3. Re: createItem Error
              mark_in_fl Level 1
              The exact error message is:
              Error: Unable to locate a sync method for destination hr_itemsvc.

              The error has since gone away. My workaround was to create multiple destinations for the same assembler class. I am using one destination without fill and sync methods defined; the other destination has several fill methods and one sync method defined, for use in a different part of the application. I have found it necessary to use the fill methods, even though the assembler extends abstract assembler, because I have not been successful in extracting the parameters from the fillParameters list that is passed by default to the fill method.

              I now have a new and more frustrating problem, which I am posting to a new thread: "UnsupportedOperationException"

              Mark