AnsweredAssumed Answered

GEL XOG Session Errors

Question asked by ferask1 on Oct 5, 2012
Latest reply on Oct 8, 2012 by ferask1
Hi All,

I have a handful of GEL scripts that have been working for quite a bit of time. Just recently, they all started failing with the following error:

BPM-0704: An error occurred while executing custom script: org.apache.commons.jelly.JellyTagException: null:119:46: <gel:expr> java.lang.NullPointerException at org.apache.commons.jelly.impl.TagScript.handleException(TagScript.java:671) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:259) 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.LogTag.doTag(LogTag.java:40) 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.WhenTag.doTag(WhenTag.java:46) 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.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:48) at com.niku.union.gel.GELController.invoke(GELController.java:20) at com.niku.bpm.services.ExecuteCustomAction.run(ExecuteCustomAction.java:181) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.NullPointerException at com.niku.union.gel.tags.ExprTag.doTag(ExprTag.java:56) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247) ... 34 more Root cause java.lang.NullPointerException at com.niku.union.gel.tags.ExprTag.doTag(ExprTag.java:56) 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.LogTag.doTag(LogTag.java:40) 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

Each of them follows this specific pattern:

1) Log in to XOG

<gel:parse file="../config/properties.xml" var="properties"/>
<gel:set asString="true" select="$properties//webServerInstance[@id='app']/@entryUrl" var="hostname"/>
<gel:parameter default="user" var="username"/>
<gel:parameter default="password" secure="true" var="password"/>
<gel:persist scope="INSTANCE" value="${hostname}" var="hostname"/>
<gel:persist scope="INSTANCE" value="${username}" var="username"/>
<gel:persist scope="INSTANCE" value="${password}" var="password"/>
<gel:setDataSource dbId="niku"/>
<gel:log level="INFO">--Host Name: ${hostname} --User Name: ${username} </gel:log>
<!-- Log into XOG and get a session ID -->
<core:catch var="xogerr">
<soap:invoke endpoint="${hostname}/niku/xog" var="auth">
<soap:message>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xog="http://www.niku.com/xog">
<soapenv:Header/>
<soapenv:Body>
<xog:Login>
<xog:Username>${username}</xog:Username>
<xog:Password>${password}</xog:Password>
</xog:Login>
</soapenv:Body>
</soapenv:Envelope>
</soap:message>
</soap:invoke>
</core:catch>

2) Parse and create XOG file

3) Run XOG (This is where it fails, it fails after the XOG invoke, the runresult var is usually null. When I take out the expr, select, I get a timeout error)

<!-- Run the XOG -->
<core:catch var="xogerr">
<soap:invoke endpoint="${hostname}/niku/xog" var="runresult">
<soap:message>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xog="http://www.niku.com/xog">
<soapenv:Header>
<xog:Auth>
<xog:SessionID>${sessionID}</xog:SessionID>
</xog:Auth>
</soapenv:Header>
<soapenv:Body>
<gel:include select="$score_xog"/>
</soapenv:Body>
</soapenv:Envelope>
</soap:message>
</soap:invoke>
</core:catch>
<gel:log level="INFO">
<gel:expr select="$runresult"/>
</gel:log>


Another weird symptom that I have found but not yet captured down the root cause, is that projects that I create are unable to be changed. This means that after I create a project, when I try to change any attribute, Clarity times out and the attribute is not changed. This could definitely be related to the timeout issue (not being able to update), but we would I not be able to update newly created projects?

Outcomes