Clarity: XOG Write Update for Resources with Apostrophe character fails

Document ID : KB000050194
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

XML Open Gateway (XOG) update issue.

We recently upgraded to Clarity 12.1.1 and when we attempt to perform a XOG write action to update existing resources, the XOG action fails and generates an error for resources that have a single quotation mark or apostrophe character in the First Name or Last Name field. This previously worked in Clarity 8.0, 8.1 and 12.0.5. The XOG write action to create a new resource is working as expected; it is only when attempting to update existing resources for which it fails.

Steps to Reproduce:

  1. Perform a XOG write action to create a new resource

    First Name = Resource'1 (be sure to use apostrophe character)
    Last Name = User'1 (be sure to use apostrophe character)
    Resource ID = resource1 (no apostrophe character)

  2. Perform a XOG read action to obtain an xml output file with all the details for this resource

    Note: xml output file shows the First Name, Last Name and Display Name fields with apostrophes

  3. Modify the xml output file so that something will be updated for this resource, for example change the Track Mode or other attribute

  4. Perform the XOG write action to update the existing resource

Expected Result: XOG write action to update the existing resource should be successful
Actual Result: XOG write action to update the existing resource fails because the apostrophe is not recognized as a special character

<?xml version="1.0" encoding="UTF-8"?>
<XOGOutput xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/status.xsd">
    <Object type="resource"/>
    <Status state="FAILURE"/>
    <Statistics failureRecords="1" insertedRecords="0"
        totalNumberOfRecords="1" updatedRecords="0"/>
    <Records>
        <Record>
            <KeyInformation>
                <column name="resourceId">resource1</column>
                <column name="lastName">User'O</column>
                <column name="externalSource">NIKU</column>
                <column name="externalId"/>
            </KeyInformation>
            <ErrorInformation>
                <Severity>FATAL</Severity>
                <Description>This record has not been inserted</Description>
                <Exception><![CDATA[
com.niku.xql2.eval.ParseException: Encountered "O" at line 1, column 60.
Was expecting one of:
    ")" ...
    "?" ...
    "+" ...
    "-" ...
    "*" ...
    "/" ...
    "=" ...
    "!=" ...
    "<>" ...
    ">" ...
    ">=" ...
    "<" ...
    "<=" ...
    "or" ...
    "and" ...
    "not" ...
    "is" ...
    "like" ...
    
 at com.niku.xql2.eval.XQLEvaluator.generateParseException(XQLEvaluator.java:1045)
 at com.niku.xql2.eval.XQLEvaluator.jj_consume_token(XQLEvaluator.java:929)
 at com.niku.xql2.eval.XQLEvaluator.XQLTerm(XQLEvaluator.java:323)
 at com.niku.xql2.eval.XQLEvaluator.XQLUnaryExpr(XQLEvaluator.java:311)
 at com.niku.xql2.eval.XQLEvaluator.XQLProductExpr(XQLEvaluator.java:258)
 at com.niku.xql2.eval.XQLEvaluator.XQLSumExpr(XQLEvaluator.java:225)
 at com.niku.xql2.eval.XQLEvaluator.XQLCompareExpr(XQLEvaluator.java:148)
 at com.niku.xql2.eval.XQLEvaluator.XQLNotExpr(XQLEvaluator.java:140)
 at com.niku.xql2.eval.XQLEvaluator.XQLAndExpr(XQLEvaluator.java:111)
 at com.niku.xql2.eval.XQLEvaluator.XQLOrExpr(XQLEvaluator.java:102)
 at com.niku.xql2.eval.XQLEvaluator.XQLExpr(XQLEvaluator.java:71)
 at com.niku.xql2.eval.XQLEvaluator.XQLTerm(XQLEvaluator.java:322)
 at com.niku.xql2.eval.XQLEvaluator.XQLUnaryExpr(XQLEvaluator.java:311)
 at com.niku.xql2.eval.XQLEvaluator.XQLProductExpr(XQLEvaluator.java:258)
 at com.niku.xql2.eval.XQLEvaluator.XQLSumExpr(XQLEvaluator.java:225)
 at com.niku.xql2.eval.XQLEvaluator.XQLCompareExpr(XQLEvaluator.java:148)
 at com.niku.xql2.eval.XQLEvaluator.XQLNotExpr(XQLEvaluator.java:140)
 at com.niku.xql2.eval.XQLEvaluator.XQLAndExpr(XQLEvaluator.java:123)
 at com.niku.xql2.eval.XQLEvaluator.XQLOrExpr(XQLEvaluator.java:90)
 at com.niku.xql2.eval.XQLEvaluator.XQLExpr(XQLEvaluator.java:71)
 at com.niku.xql2.eval.XQLEvaluator.eval(XQLEvaluator.java:55)
 at com.niku.xql2.eval.XQLEvaluator.compile(XQLEvaluator.java:32)
 at com.niku.xql2.eval.XQLEvaluator.parse(XQLEvaluator.java:40)
 at com.niku.xql2.XQLVisitor.eval(XQLVisitor.java:1043)
 at com.niku.xql2.XQLVisitor.eval(XQLVisitor.java:1017)
 at com.niku.xql2.XQLVisitor.process(XQLVisitor.java:1249)
 at com.niku.xql2.XQLVisitor.process(XQLVisitor.java:1300)
 at com.niku.union.xml.dom.DOMWalker.preProcess(DOMWalker.java:191)
 at com.niku.union.xml.dom.DOMWalker.traverseIntern(DOMWalker.java:74)
 at com.niku.union.xml.dom.DOMWalker.traverse(DOMWalker.java:51)
 at com.niku.xql2.handlers.LoopHandler.processObject(LoopHandler.java:161)
 at com.niku.xql2.handlers.LoopHandler.preProcess(LoopHandler.java:91)
 at com.niku.xql2.XQLVisitor.preProcess(XQLVisitor.java:1342)
 at com.niku.union.xml.dom.DOMWalker.preProcess(DOMWalker.java:194)
 at com.niku.union.xml.dom.DOMWalker.traverseIntern(DOMWalker.java:74)
 at com.niku.union.xml.dom.DOMWalker.traverse(DOMWalker.java:51)
 at com.niku.xql2.handlers.TryHandler.preProcess(TryHandler.java:50)
 at com.niku.xql2.XQLVisitor.preProcess(XQLVisitor.java:1342)
 at com.niku.union.xml.dom.DOMWalker.preProcess(DOMWalker.java:194)
 at com.niku.union.xml.dom.DOMWalker.traverseIntern(DOMWalker.java:74)
 at com.niku.union.xml.dom.DOMWalker.traverse(DOMWalker.java:51)
 at com.niku.xql2.handlers.LoopHandler.processObject(LoopHandler.java:161)
 at com.niku.xql2.handlers.LoopHandler.preProcess(LoopHandler.java:91)
 at com.niku.xql2.XQLVisitor.preProcess(XQLVisitor.java:1342)
 at com.niku.union.xml.dom.DOMWalker.preProcess(DOMWalker.java:194)
 at com.niku.union.xml.dom.DOMWalker.traverseIntern(DOMWalker.java:74)
 at com.niku.union.xml.dom.DOMWalker.traverse(DOMWalker.java:51)
 at com.niku.xql2.handlers.LoopHandler.processObject(LoopHandler.java:161)
 at com.niku.xql2.handlers.LoopHandler.preProcess(LoopHandler.java:91)
 at com.niku.xql2.XQLVisitor.preProcess(XQLVisitor.java:1342)
 at com.niku.union.xml.dom.DOMWalker.preProcess(DOMWalker.java:194)
 at com.niku.union.xml.dom.DOMWalker.traverseIntern(DOMWalker.java:74)
 at com.niku.union.xml.dom.DOMWalker.traverse(DOMWalker.java:51)
 at com.niku.xql2.handlers.LoopHandler.processObject(LoopHandler.java:161)
 at com.niku.xql2.handlers.LoopHandler.preProcess(LoopHandler.java:91)
 at com.niku.xql2.XQLVisitor.preProcess(XQLVisitor.java:1342)
 at com.niku.union.xml.dom.DOMWalker.preProcess(DOMWalker.java:194)
 at com.niku.union.xml.dom.DOMWalker.traverseIntern(DOMWalker.java:74)
 at com.niku.union.xml.dom.DOMWalker.traverseIntern(DOMWalker.java:92)
 at com.niku.union.xml.dom.DOMWalker.traverseIntern(DOMWalker.java:92)
 at com.niku.union.xml.dom.DOMWalker.traverse(DOMWalker.java:36)
 at com.niku.xog.service.XOGXBLHandler.processXBL(XOGXBLHandler.java:245)
 at com.niku.xog.service.XOGXBLHandler.process(XOGXBLHandler.java:151)
 at com.niku.xog.service.ObjectHandler.processRequest(ObjectHandler.java:167)
 at com.niku.xog.handler.XOGProcessHandler.postProcess(XOGProcessHandler.java:44)
 at com.niku.xql2.XQLVisitor.postProcess(XQLVisitor.java:1355)
 at com.niku.union.xml.dom.DOMWalker.postProcess(DOMWalker.java:210)
 at com.niku.union.xml.dom.DOMWalker.traverseIntern(DOMWalker.java:94)
 at com.niku.union.xml.dom.DOMWalker.traverseIntern(DOMWalker.java:92)
 at com.niku.union.xml.dom.DOMWalker.traverseIntern(DOMWalker.java:92)
 at com.niku.union.xml.dom.DOMWalker.traverse(DOMWalker.java:36)
 at com.niku.xql2.XQLProcessor.process(XQLProcessor.java:239)
 at com.niku.xql2.XQLProcessor.process(XQLProcessor.java:280)
 at com.niku.xql2.binding.ServiceControlBindingXql.processFile(ServiceControlBindingXql.java:412)
 at com.niku.xql2.binding.ServiceControlBindingXql.getDocument(ServiceControlBindingXql.java:277)
 at com.niku.xql2.binding.ServiceControlBindingXql.processRequest(ServiceControlBindingXql.java:161)
 at com.niku.union.service.ServiceControlImpl.processRequest(ServiceControlImpl.java:760)
 at com.niku.union.service.ServiceControlImpl.processRequest(ServiceControlImpl.java:214)
 at com.niku.union.web.WebServiceAdapter.processRequest(WebServiceAdapter.java:196)
 at com.niku.union.web.PortletController.processServiceRequest(PortletController.java:1371)
 at com.niku.union.web.PortletController.processAuthorizedPortlet(PortletController.java:891)
 at com.niku.union.web.PortletController.processPageActionRequest(PortletController.java:385)
 at com.niku.union.web.PortletController.processRequest(PortletController.java:160)
 at com.niku.union.web.WebActionController.processAction(WebActionController.java:1090)
 at com.niku.union.web.WebActionController.processRequest(WebActionController.java:170)
 at com.niku.union.web.WebControlServlet.service(WebControlServlet.java:322)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at com.niku.union.web.filter.GZIPResponseFilter.doFilter(GZIPResponseFilter.java:121)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at com.niku.union.web.filter.CharsetFilter.doFilter(CharsetFilter.java:29)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
 at java.lang.Thread.run(Thread.java:619)
]]></Exception>
            </ErrorInformation>
        </Record>
    </Records>
</XOGOutput>

Solution:

Workaround:
There is no workaround for XOG write update action. If there is only a few resources that meet this criteria and an update is needed, use the Clarity application UI.

Status/Resolution:
Resolved in Clarity 12.1.2
Resolved in Clarity 12.1.1 Generic Patch. Reference TEC553491

Keywords: CLARITYKB, CLRT-62579, clarity12resolved, clarity1212resolved.