5 Replies Latest reply: Jan 24, 2013 6:10 PM by te*441957*as RSS

    partial updates not working

    te*441957*as
      Hi there,

      I have followed the partila updates guide provided by oracle to implement MDEX partial update at this URL:

      http://docs.oracle.com/cd/E38682_01/MDEX.640/pdf/PartialUpdatesGuide.pdf

      After doing all the configuration, set up, when I ran the partial update, it is throwing following error:
      ---------------------------------------------------------------------------------------------------------------------------------
      INFO: Checking definition from AppConfig.xml against existing EAC provisioning.
      INFO: Definition has not changed.
      SEVERE: Partial updates not implemented.
      Occurred while executing line 3 of valid BeanShell script:
      [[

      1|
      2|
      3| throw new Exception("Partial updates not implemented.");
      4|
      5| /*
      6| log.info("Starting partial update script.");

      ]]

      [01.23.13 13:55:43] SEVERE: Caught an exception while invoking method 'run' on object 'PartialUpdate'. Releasing locks.

      Caused by java.lang.reflect.InvocationTargetException
      sun.reflect.NativeMethodAccessorImpl invoke0 - null
      Caused by com.endeca.soleng.eac.toolkit.exception.AppControlException
      com.endeca.soleng.eac.toolkit.script.Script runBeanShellScript - Error executing valid BeanShell script.
      Caused by java.lang.Exception
      sun.reflect.NativeConstructorAccessorImpl newInstance0 - Partial updates not implemented.
      ---------------------------------------------------------------------------------------------------------------------------------------------------

      Log also has the same error but no more information. I am not sure what am I missing and how can I resolve this issue? My baseline is running fine.

      Thanks for the help in advacne.

      Edited by: te**** on Jan 23, 2013 12:24 PM
        • 1. Re: partial updates not working
          Branchbird - Pat
          Hi,

          You should be able to open up the DataIngest.xml file in /path/to/your/app/config/script to find the PartialUpdate script (written in BeanShell).

          You should see (on line 3 of the script, approximately line 160 in the file) that the error is being thrown intentionally via this line:

          throw new Exception("Partial updates not implemented.");

          In addition, the remainder of the script is commented out. If you comment out the exception "throw" and uncomment the remainder of the script, you should be on your way.

          FYI, I think the idea behind this is that "partial updates aren't free" and you need to put a pipeline together, give some thought to your data, etc. However, this is an easy step to miss.

          HTH,

          Patrick Rafferty
          http://branchbird.com
          • 2. Re: partial updates not working
            Hareesh_Kavumkulath
            It seems partial update script is throwing the exception before starting PartialForge.run()

            1. Go to /apps/application_name/config/script/ folder
            2. Open DataIngest.xml
            3. Search for partial update script.
            4. Check the statement,

            throw new Exception("Partial updates not implemented."); is before PartialForge.run()

            If yes, comment it.

            Regards,
            Hareesh Kavumkulath
            • 3. Re: partial updates not working
              te*441957*as
              atleast commeting out took me one step forward. now the error I get make much more sense. here is the error I am getting now.

              -----------------------------------------------------
              FORGE     {config}: UPDATE_RECORD: unrecognized argument: 'PROP_NAME'. Type: VOID Name: UPDATE_RECORD:      
              1) NODE: 'ACTION' - the type of update this record specifies      Supported actions are ADD, DELETE, REPLACE, UPDATE, ADD_OR_REPLACE,      and DELETE_OR_IGNORE.      
              2) NODE: 'PROP_ACTION' - if 'ACTION' (above) is UPDATE, then this specifies      the type of update to perform on ALL values of the named property.      Supported actions are ADD, DELETE, and REPLACE.      Must be followed by a PROP_NAME node.      
              3) NODE: 'DIM_ACTION' - if 'ACTION' (above) is UPDATE, then this specifies      the type of update to perform on ALL values of the identified dimension.      Supported actions are ADD, DELETE, and REPLACE.      Must be followed by a DIMENSION_ID node.      
              4) NODE: 'DVAL_ACTION' - if 'ACTION' (above) is UPDATE, then this specifies      the type of update to perform on the identified DVal.      The only supported action is DELETE.      Must be followed by a DVAL_ID node. Returns:      None Side Effects:      Tags the record with the actions specified. Errors:      If ACTION is not one of ADD, DELETE, REPLACE, UPDATE, ADD_OR_REPLACE, DELETE_OR_IGNORE.      If ACTION is not UPDATE and a sub-action is specified.      If ACTION is UPDATE and a sub-action is not specified.      If more than one sub-ACTION is specified for a given Prop, Dim or DVal.      
              ---------------------------------------------------------

              I have property name id as record_spec and I want to update property named stock if id matches. I tried following the example from oracle's partial development guide to write the expressions for update manipulator. if id does not matches, I want to add that as new record.

              here is my data file:
              ------------------------
              action||U
              id||10001
              stock||20
              REC
              action||A
              id||20001
              stock||300
              SKU||2085
              DESCRIPTION||sony wx-150 18MP Camera
              REC
              ------------------------

              here is my expression of update manipulator:

              --------------------------------------------------------------
              <EXPRESSION LABEL="" NAME="IF" TYPE="VOID" URL="">

              <EXPRESSION LABEL="" NAME="MATH" TYPE="INTEGER" URL="">
              <EXPRNODE NAME="TYPE" VALUE="STRING"/>
              <EXPRNODE NAME="OPERATOR" VALUE="EQUAL"/>
              <EXPRESSION LABEL="" NAME="IDENTITY" TYPE="PROPERTY" URL="">
              <EXPRNODE NAME="PROP_NAME" VALUE="action"/>
              </EXPRESSION>
              <EXPRESSION LABEL="" NAME="CONST" TYPE="STRING" URL="">
              <EXPRNODE NAME="VALUE" VALUE="D"/>
              </EXPRESSION>
              </EXPRESSION>

              <EXPRESSION LABEL="" NAME="UPDATE_RECORD" TYPE="VOID" URL="">
              <EXPRNODE NAME="ACTION" VALUE="DELETE_OR_IGNORE"/>
              </EXPRESSION>

              <EXPRNODE NAME="ELSE_IF" VALUE=""/>

              <EXPRESSION LABEL="" NAME="MATH" TYPE="INTEGER" URL="">
              <EXPRNODE NAME="TYPE" VALUE="STRING"/>
              <EXPRNODE NAME="OPERATOR" VALUE="EQUAL"/>
              <EXPRESSION LABEL="" NAME="IDENTITY" TYPE="PROPERTY" URL="">
              <EXPRNODE NAME="PROP_NAME" VALUE="action"/>
              </EXPRESSION>
              <EXPRESSION LABEL="" NAME="CONST" TYPE="STRING" URL="">
              <EXPRNODE NAME="VALUE" VALUE="U"/>
              </EXPRESSION>
              </EXPRESSION>

              <EXPRESSION LABEL="" NAME="UPDATE_RECORD" TYPE="VOID" URL="">
              <EXPRNODE NAME="ACTION" VALUE="UPDATE"/>
              <EXPRNODE NAME="PROP_NAME" VALUE="stock"/>
              <EXPRNODE NAME="PROP_ACTION" VALUE="REPLACE"/>
              </EXPRESSION>

              <EXPRNODE NAME="ELSE" VALUE=""/>

              <EXPRESSION LABEL="" NAME="UPDATE_RECORD" TYPE="VOID" URL="">
              <EXPRNODE NAME="ACTION" VALUE="ADD_OR_REPLACE"/>
              </EXPRESSION>

              </EXPRESSION>
              --------------------------------------------------------------

              there isn't much help on writing expressions for updatemanipulator. There is no syntax error. Not sure how to fix the above errors.

              Thanks for your support so far. Will you help me identify the issue here and fix the expression or data file whichever is wrong.

              Thanks again .
              • 4. Re: partial updates not working
                Branchbird - Pat
                I think order matters here...I believe your manipulator XML should be this:

                <EXPRESSION LABEL="" NAME="UPDATE_RECORD" TYPE="VOID" URL="">
                <EXPRNODE NAME="ACTION" VALUE="UPDATE"/>
                <EXPRNODE NAME="PROP_ACTION" VALUE="REPLACE"/>
                <EXPRNODE NAME="PROP_NAME" VALUE="stock"/>
                </EXPRESSION>

                where PROP_ACTION comes before PROP_NAME.
                • 5. Re: partial updates not working
                  te*441957*as
                  You are awsome. thanks a lot. it did go through the process and completed successfully.

                  I ran it to update only one record. It did update the record correctly for that one property. But it also removed all the other properties, dimension for that record. Is that the default behaviour or should I have to have put in correct value in my data file for all properties and dimension even when they are not going to be changed?

                  or I just need to have the mapping to be there in my partial update pipeline record adapter?


                  Thanks again.