Clarity

  • 1.  XOG POST failed ParseError

    Posted Jan 16, 2014 03:11 AM

    Hi, 

    after upgrade from 13.2 -> 13.3 one ouf our Clarity instances failed to respon to XOG Requests - when xogging from remote machine, following is displayed:

    Login Succeeded
    
    Request Document: test.xml
    
    Writing output to out.xml
    
    Failed to retrieve response document
    
    com.niku.xog.XOGException: java.lang.RuntimeException: HTTP Error: Status-Code:
    
    500: Internal Server Error
    
            at com.niku.xog.client.XOGClient.processRequest(XOGClient.java:1096)
    
            at com.niku.xog.client.XOGClient.processRequest(XOGClient.java:1007)
    
            at com.niku.xog.client.XOGClient.processRequest(XOGClient.java:679)
    
            at com.niku.xog.client.XOGClient.processRequest(XOGClient.java:589)
    
            at com.niku.xog.client.XOGClient.processRequests(XOGClient.java:1444)
    
            at com.niku.xog.client.XOGClient.invokeCommand(XOGClient.java:1237)
    
            at com.niku.xog.client.XOGClient.main(XOGClient.java:142)
    
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    
    java:57)
    
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    
    sorImpl.java:43)
    
            at java.lang.reflect.Method.invoke(Method.java:601)
    
            at com.werken.forehead.Forehead.run(Forehead.java:551)
    
            at com.werken.forehead.Forehead.main(Forehead.java:581)
    
    Caused by: java.lang.RuntimeException: HTTP Error: Status-Code: 500: Internal Se
    
    rver Error
    
            at com.niku.union.xml.SimpleSOAPMessage.processRequest(SimpleSOAPMessage
    
    .java:316)
    
            at com.niku.union.xml.SimpleSOAPMessage.send(SimpleSOAPMessage.java:88)
    
            at com.niku.union.xml.SimpleSOAPMessage.send(SimpleSOAPMessage.java:79)
    
            at com.niku.union.xml.SimpleSOAPMessage.send(SimpleSOAPMessage.java:56)
    
            at com.niku.xog.client.XOGClient.processRequest(XOGClient.java:1092)
    
            ... 12 more
    
    Logout Succeeded

     

    - app-ca : 

    ERROR 2014-01-16 08:41:59,148 [http-bio-19080-exec-148] niku.xog (clarity:none:none:none) XOG POST failed^M

    java.util.NoSuchElementException: ParseError at [row,col]:[9,9]

    Message: The processing instruction target matching "[xX][mM][lL]" is not allowed.

            at com.sun.xml.internal.stream.XMLEventReaderImpl.next(XMLEventReaderImpl.java:252)

            at com.niku.union.utility.StreamUtils.getXOGHeaderMetaData(StreamUtils.java:438)

            at com.niku.xog.service.XOGSOAPServlet.doPost(XOGSOAPServlet.java:154)

            at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)

            at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)

            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)

            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

            at com.niku.union.web.filter.CharsetFilter.doFilter(CharsetFilter.java:68)

            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

            at org.apache.catalina.filters.AddDefaultCharsetFilter.doFilter(AddDefaultCharsetFilter.java:88)

            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)

            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)

            at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)

            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)

            at com.niku.union.web.valves.ErrorPageRedirectValve.invoke(ErrorPageRedirectValve.java:70)

            at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)

            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)

            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)

            at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)

            at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)

            at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)

            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

            at java.lang.Thread.run(Thread.java:724)

     
    -xml_input: 
    
    <?xml version="1.0" encoding="UTF-8"?>
    
    <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_read.xsd">
    
      <Header version="8.0" action="read" objectType="idea" externalSource="NIKU">
    
        <args name="documentLocation" value="D:\niku/xog/test/documentXogLocation"/>
    
        <args name="include_resources" value="true"/>
    
        <args name="include_tasks" value="true"/>
    
        <args name="include_allocations" value="true"/>
    
      </Header>
    
      <Query>
    
        <!-- <Filter name="objectID" criteria="EQUALS">admin</Filter> -->
    
      </Query>
    
    </NikuDataBus>
     
    - XML file is taken from xog/xml folder and should not contain any wild chars in the beginning of file including BOM.
     
    Regards, 
    Michal


  • 2.  RE: XOG POST failed ParseError

    Posted Jan 16, 2014 08:11 AM

    Have you updated XOG Client on the remote machine?



  • 3.  RE: XOG POST failed ParseError
    Best Answer

    Posted Jan 17, 2014 05:46 PM

    The workaround is to remove the first line from the XML file that contains the XML processing instruction (i.e. the <?xml ... ?> line).  This defect isn't published yet as a knowledge article on the website, when it is, it would contain the following:

     

    CLRT-73713 XOG Write returns error if it contains an XML processing instruction at the start (<?xml ... ?>)

    Description:
    XML files typically begin with a processing instruction that identifies the file as XML. The example XOG files provided with the XOG client also include them. They look like this:

    <?xml version="1.0" encoding="UTF-8"?>

    To send the files to Clarity to be processed requires embedding the contents of this file into a SOAP request, which is also XML. As such, the processing instruction should be removed since the SOAP request has the one it needs already at the beginning and additional ones are not needed/desired in the file.

    The following error occurs in the client:

    Failed to retrieve response document
    com.niku.xog.XOGException: java.lang.RuntimeException: HTTP Error: Status-Code: 500: Internal Server Error
    at com.niku.xog.client.XOGClient.processRequest(XOGClient.java:1096)
    at com.niku.xog.client.XOGClient.processRequest(XOGClient.java:1007)
    at com.niku.xog.client.XOGClient.processRequest(XOGClient.java:679)
    at com.niku.xog.client.XOGClient.processRequest(XOGClient.java:589)
    at com.niku.xog.client.XOGClient.processRequests(XOGClient.java:1435)
    at com.niku.xog.client.XOGClient.processCmd(XOGClient.java:1358)
    at com.niku.xog.client.XOGClient.startShell(XOGClient.java:1287)
    at com.niku.xog.client.XOGClient.invokeCommand(XOGClient.java:1248)
    at com.niku.xog.client.XOGClient.main(XOGClient.java:142)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at com.werken.forehead.Forehead.run(Forehead.java:551)
    at com.werken.forehead.Forehead.main(Forehead.java:581)
    Caused by: java.lang.RuntimeException: HTTP Error: Status-Code: 500: Internal Server Error
    at com.niku.union.xml.SimpleSOAPMessage.processRequest(SimpleSOAPMessage.java:316)
    at com.niku.union.xml.SimpleSOAPMessage.send(SimpleSOAPMessage.java:88)
    at com.niku.union.xml.SimpleSOAPMessage.send(SimpleSOAPMessage.java:79)
    at com.niku.union.xml.SimpleSOAPMessage.send(SimpleSOAPMessage.java:56)
    at com.niku.xog.client.XOGClient.processRequest(XOGClient.java:1092)
    ... 14 more

    It also produces the following error in the app-ca.log files:

    ERROR 2013-12-10 09:26:43,758 [http-bio-14001-exec-423] niku.xog (clarity:none:none:none) XOG POST failed
    java.util.NoSuchElementException: ParseError at [row,col]:[9,9]
    Message: The processing instruction target matching "[xX][mM][lL]" is not allowed.
     

     

    Steps to Reproduce:
    1. Run XOG from the command prompt: bin\xog.bat
    2. Login to your Clarity 13.3 server: login admin/admin@yourserver
    3. Save the following XML to a file and then call it in the xog client: call yourfilename.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_user.xsd">
    <Header version="6010" action="write" objectType="user" externalSource="ORACLE-FINANCIAL"/>
    <Users>
    <User userLanguage="English" userStatus="InActive" userName="xoguser10" userType="Internal" externalId="2323">
    <PersonalInformation lastName="xoglastname10" firstName="xogfirstname10" emailAddress="xog10@niku.com"/>
    <Resource resourceId="xoguser10"/>
    <Company companyId="xogtestcompany"/>
    <General addedBy="admin" addedDate="2001-09-05"/>
    <OBSAssocs/>
    </User>
    </Users>
    </NikuDataBus>
    Expected Result: The write should complete with a successful insert or update of a Clarity user
    Actual Result: Error 500 is produced
    Workaround: Remove the processing instruction (first line beginning with <? ...?>) from the XOG file.