Clarity PPM

Expand all | Collapse all

BPM-0704: An error occurred while executing custom script: org.apache.commons.jelly.JellyTagException: null:92:109: <gel:set> Missing or invalid XML at

  • 1.  BPM-0704: An error occurred while executing custom script: org.apache.commons.jelly.JellyTagException: null:92:109: <gel:set> Missing or invalid XML at

    Posted 03-26-2019 06:03 AM

    When I am running a process I get an error saying Invalid XML

     

    The XML when run separately gives out the result. Please find below the XML I used and the Error which I am getting

     

    <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_user.xsd">
                <Header action="write" externalSource="NIKU" objectType="project" version="14.3.0.298"/>
      <!-- Creates the XML that is used to update the project -->
              <Projects>
                <Project name="${pj.rows[i].PROJECT_NAME}" projectID="${pj.rows[i].PROJECT_ID}"  managerResourceID="${pj.rows[i].APP_MANAGER}">
                  <OBSAssocs completed="false">
                    <OBSAssoc id="nov_future_obs" name="3. Future OBS" unitPath="${pj.rows[i].APP_OBS}"/>
       <!--  <OBSAssoc id="${v_dpt_obs_id}" name="${v_dpt_obs_name}" unitPath="${v_dpt_obs_path}"/>  -->
                  </OBSAssocs>
                </Project>
              </Projects>
            </NikuDataBus>

     

     

    ERROR:

     

    BPM-0704: An error occurred while executing custom script: org.apache.commons.jelly.JellyTagException: null:92:109: <gel:set> Missing or invalid XML at com.niku.union.gel.tags.SetTag.doTag(SetTag.java:137) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186) at org.apache.commons.jelly.tags.core.OtherwiseTag.doTag(OtherwiseTag.java:41) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186) at org.apache.commons.jelly.tags.core.ChooseTag.doTag(ChooseTag.java:38) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186) at org.apache.commons.jelly.tags.core.ForEachTag.doTag(ForEachTag.java:150) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186) at org.apache.commons.jelly.tags.core.OtherwiseTag.doTag(OtherwiseTag.java:41) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186) at org.apache.commons.jelly.tags.core.ChooseTag.doTag(ChooseTag.java:38) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186) at com.niku.union.gel.tags.ScriptTag.doTag(ScriptTag.java:20) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247) at com.niku.union.gel.GELScript.run(GELScript.java:67) at com.niku.union.gel.GELController.invoke(GELController.java:74) at com.niku.bpm.services.ExecuteCustomAction.run(ExecuteCustomAction.java:207) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NullPointerException at org.jaxen.dom.DocumentNavigator$1.getFirstNode(DocumentNavigator.java:155) at org.jaxen.dom.DocumentNavigator$NodeIterator.<init>(DocumentNavigator.java:894) at org.jaxen.dom.DocumentNavigator$1.<init>(DocumentNavigator.java:157) at org.jaxen.dom.DocumentNavigator.getChildAxisIterator(DocumentNavigator.java:152) at org.jaxen.util.DescendantAxisIterator.next(DescendantAxisIterator.java:129) at org.jaxen.expr.DefaultStep.evaluate(DefaultStep.java:154) at org.jaxen.expr.DefaultLocationPath.evaluate(DefaultLocationPath.java:140) at org.jaxen.expr.DefaultPathExpr.evaluate(DefaultPathExpr.java:142) at org.jaxen.expr.DefaultXPathExpr.asList(DefaultXPathExpr.java:102) at org.jaxen.BaseXPath.selectNodesForContext(BaseXPath.java:674) at org.jaxen.BaseXPath.selectNodes(BaseXPath.java:213) at org.jaxen.BaseXPath.selectSingleNode(BaseXPath.java:234) at com.niku.union.gel.tags.SetTag.doTag(SetTag.java:47) ... 31 more Root cause java.lang.NullPointerException at org.jaxen.dom.DocumentNavigator$1.getFirstNode(DocumentNavigator.java:155) at org.jaxen.dom.DocumentNavigator$NodeIterator.<init>(DocumentNavigator.java:894) at org.jaxen.dom.DocumentNavigator$1.<init>(DocumentNavigator.java:157) at org.jaxen.dom.DocumentNavigator.getChildAxisIterator(DocumentNavigator.java:152) at org.jaxen.util.DescendantAxisIterator.next(DescendantAxisIterator.java:129) at org.jaxen.expr.DefaultStep.evaluate(DefaultStep.java:154) at org.jaxen.expr.DefaultLocationPath.evaluate(DefaultLocationPath.java:140) at org.jaxen.expr.DefaultPathExpr.eva...

     

     

     

    Please advice what can I do for this!

     

    Regards,

    Vinay



  • 2.  Re: BPM-0704: An error occurred while executing custom script: org.apache.commons.jelly.JellyTagException: null:92:109: <gel:set> Missing or invalid XML at

    Posted 03-26-2019 06:15 AM

    Have you put a log or message tag to catch the actual XML with the variables replaced with values to see that it matches exactly what you run successfully separately?



  • 3.  Re: BPM-0704: An error occurred while executing custom script: org.apache.commons.jelly.JellyTagException: null:92:109: <gel:set> Missing or invalid XML at

    Posted 03-26-2019 06:20 AM

    I have included a log to show input XML when there is any exception.

    Running separately means I have xogged it from command prompt to see if the xml is valid or not and it worked well.

     

    Thank you,

    Vinay



  • 4.  Re: BPM-0704: An error occurred while executing custom script: org.apache.commons.jelly.JellyTagException: null:92:109: <gel:set> Missing or invalid XML at

    Posted 03-26-2019 06:24 AM

    What I am asking is that if your log even if there is no exception shows that the xml created when the parameters are replaced with values is exactly the same you XOG in from command prompt? 



  • 5.  Re: BPM-0704: An error occurred while executing custom script: org.apache.commons.jelly.JellyTagException: null:92:109: <gel:set> Missing or invalid XML at

    Posted 03-26-2019 06:29 AM

    I haven't added any log to capture that values. Could you please help me out where  can add it?



  • 6.  Re: BPM-0704: An error occurred while executing custom script: org.apache.commons.jelly.JellyTagException: null:92:109: <gel:set> Missing or invalid XML at

    Posted 03-26-2019 12:03 PM

    I always refer to Christine.Takeuchi 's post

    https://communities.ca.com/message/101798519?commentID=101798519#comment-101798519 

    at first a variable object_xml is declared

     

    <!-- ============================================================================== -->
    <!-- Build the XML file using Parse tag and incorporating those variables' values . ..-->
    <!-- ============================================================================== -->
    <gel:parse var="object_xml">
    <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_application.xsd">

    and so on

     

    When the building of the xml is complete that is written

    </Applications>
    </NikuDataBus>
    </gel:parse>

    <!-- display the generated XML from the application query -->
    <gel:log>
    <gel:log>Step 1 - XML Generated is below -</gel:log>
    <gel:expr select="$object_xml"/>
    </gel:log>

     

    Then you can view it in the messages of the process.

     

    Take the xml file created and see if you can run it with command line client.

    I should expect that you get the same error and that the xml file is not exactly the same.