Clarity

Expand all | Collapse all

Troubles while xogging project object

  • 1.  Troubles while xogging project object

    Posted Apr 29, 2014 07:40 PM

    Hello folks, hope everyone is fine.

    We are trying to XOG the project oject between two partitioned environments. More specifically, we just need to XOG 1 partition, so we used the filter `partition_code` when we requested the object in order to bring just the data of the selected partition. This is how our read XOG looks like:

    <?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="contentPack" externalSource="NIKU">
          <!-- the contentType is used to determine which filter goes where -->
            <args contentType="job_definition" name="order_by_1" value="code"/>
            <args contentType="menu" name="order_by_1" value="code"/>
            <args contentType="view" name="order_by_1" value="code"/>
            <args contentType="process" name="order_by_1" value="code"/>
            <args contentType="object" name="order_by_1" value="code"/>
       <args name="no_dependencies" value="true"/>
          </Header>
          <ViewQuery>
            <Filter name="object_code" criteria="EQUALS">project</Filter>
            <Filter name="partition_code" criteria="EQUALS">ditv</Filter>
          </ViewQuery>
      </NikuDataBus>
    When trying to XOG-in the output of this request (which is pretty big, something like 211k lines) in the target environment, we get an error that`s not self explanatory. This is the error:
    <XOGOutput xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/status.xsd">
      <Object type="contentPack"/>
      <Status elapsedTime="5.0 minutes 17.894000000000005 seconds" state="FAILURE"/>
      <Statistics failureRecords="1" insertedRecords="-2" totalNumberOfRecords="14" updatedRecords="15"/>
      <Records>
        <Record>
          <KeyInformation>
            <column name="externalSource">NIKU</column>
            <column name="source"/>
            <column name="code">project</column>
          </KeyInformation>
          <ErrorInformation>
            <Severity>FATAL</Severity>
            <Description>XOG-3360: Custom attribute record has not been inserted java.lang.Exception: Failure while evaluating "localizeMsg('')" in expression "{localizeMsg('{message}')}" error: Invalid expression localizeMsg(''): null&#xd;
    at com.niku.xql2.XQLVisitor.process(XQLVisitor.java:1289)&#xd;
    at com.niku.xql2.XQLVisitor.process(XQLVisitor.java:1317)&#xd;
    at com.niku.union.xml.dom.DOMWalker.preProcess(DOMWalker.java:178)&#xd;
    at com.niku.union.xml.dom.DOMWalker.traverseIntern(DOMWalker.java:74)&#xd;
    at com.niku.union.xml.dom.DOMWalker.traverseIntern(DOMWalker.java:92)&#xd;
    at com.niku.union.xml.dom.DOMWalker.traverseIntern(DOMWalker.java:92)&#xd;
    at com.niku.union.xml.dom.DOMWalker.traverse(DOMWalker.java:51)&#xd;
    at com.niku.xql2.handlers.TryHandler.preProcess(TryHandler.java:88)&#xd;
    at com.niku.xql2.XQLVisitor.preProcess(XQLVisitor.java:1377)&#xd;
    at com.niku.union.xml.dom.DOMWalker.preProcess(DOMWalker.java:194)&#xd;
    at com.niku.union.xml.dom.DOMWalker.traverseIntern(DOMWalker.java:74)&#xd;
    at com.niku.union.xml.dom.DOMWalker.traverseIntern(DOMWalker.java:92)&#xd;
    at com.niku.union.xml.dom.DOMWalker.traverseIntern(DOMWalker.java:92)&#xd;
    at com.niku.union.xml.dom.DOMWalker.traverse(DOMWalker.java:51)&#xd;
    at com.niku.xql2.handlers.LoopHandler.processObject(LoopHandler.java:384)&#xd;
    at com.niku.xql2.handlers.LoopHandler.processSet(LoopHandler.java:255)&#xd;
    at com.niku.xql2.handlers.LoopHandler.preProcess(LoopHandler.java:212)&#xd;
    at com.niku.xql2.XQLVisitor.preProcess(XQLVisitor.java:1377)&#xd;
    at com.niku.union.xml.dom.DOMWalker.preProcess(DOMWalker.java:194)&#xd;
    at com.niku.union.xml.dom.DOMWalker.traverseIntern(DOMWalker.java:74)&#xd;
    at com.niku.union.xml.dom.DOMWalker.traverse(DOMWalker.java:51)&#xd;
    at com.niku.xql2.handlers.LoopHandler.processObject(LoopHandler.java:384)&#xd;
    at com.niku.xql2.handlers.LoopHandler.processSet(LoopHandler.java:255)&#xd;
    at com.niku.xql2.handlers.LoopHandler.preProcess(LoopHandler.java:212)&#xd;
    at com.niku.xql2.XQLVisitor.preProcess(XQLVisitor.java:1377)&#xd;
    at com.niku.union.xml.dom.DOMWalker.preProcess(DOMWalker.java:194)&#xd;
    at com.niku.union.xml.dom.DOMWalker.traverseIntern(DOMWalker.java:74)&#xd;
    at com.niku.union.xml.dom.DOMWalker.traverse(DOMWalker.java:51)&#xd;
    at com.niku.xql2.handlers.LoopHandler.processObject(LoopHandler.java:384)&#xd;
    at com.niku.xql2.handlers.LoopHandler.processSet(LoopHandler.java:255)&#xd;
    at com.niku.xql2.handlers.LoopHandler.preProcess(LoopHandler.java:212)&#xd;
    at com.niku.xql2.XQLVisitor.preProcess(XQLVisitor.java:1377)&#xd;
    at com.niku.union.xml.dom.DOMWalker.preProcess(DOMWalker.java:194)&#xd;
    at com.niku.union.xml.dom.DOMWalker.traverseIntern(DOMWalker.java:74)&#xd;
    at com.niku.union.xml.dom.DOMWalker.traverse(DOMWalker.java:51)&#xd;
    at com.niku.xql2.handlers.TryHandler.preProcess(TryHandler.java:50)&#xd;
    at com.niku.xql2.XQLVisitor.preProcess(XQLVisitor.java:1377)&#xd;
    at com.niku.union.xml.dom.DOMWalker.preProcess(DOMWalker.java:194)&#xd;
    at com.niku.union.xml.dom.DOMWalker.traverseIntern(DOMWalker.java:74)&#xd;
    at com.niku.union.xml.dom.DOMWalker.traverseIntern(DOMWalker.java:92)&#xd;
    at com.niku.union.xml.dom.DOMWalker.traverseIntern(DOMWalker.java:92)&#xd;
    at com.niku.union.xml.dom.DOMWalker.traverse(DOMWalker.java:36)&#xd;
    at com.niku.xog.service.XOGXBLHandler.processXBL(XOGXBLHandler.java:260)&#xd;
    at com.niku.xog.service.XOGXBLHandler.process(XOGXBLHandler.java:167)&#xd;
    at com.niku.xog.service.ObjectHandler.processRequest(ObjectHandler.java:197)&#xd;
    at com.niku.xog.service.ObjectHandler.process(ObjectHandler.java:99)&#xd;
    at com.niku.xog.service.XOGDispatch.processMessage(XOGDispatch.java:133)&#xd;
    at com.niku.xog.service.XOGSOAPServlet.processMessage(XOGSOAPServlet.java:599)&#xd;
    at com.niku.xog.service.XOGSOAPServlet.doPost(XOGSOAPServlet.java:359)&#xd;
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)&#xd;
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)&#xd;
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)&#xd;
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)&#xd;
    at com.niku.union.web.filter.CharsetFilter.doFilter(CharsetFilter.java:68)&#xd;
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)&#xd;
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)&#xd;
    at org.apache.catalina.filters.AddDefaultCharsetFilter.doFilter(AddDefaultCharsetFilter.java:88)&#xd;
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)&#xd;
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)&#xd;
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)&#xd;
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)&#xd;
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)&#xd;
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)&#xd;
    at com.niku.union.web.valves.ErrorPageRedirectValve.invoke(ErrorPageRedirectValve.java:70)&#xd;
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)&#xd;
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)&#xd;
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)&#xd;
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)&#xd;
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)&#xd;
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)&#xd;
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)&#xd;
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)&#xd;
    at java.lang.Thread.run(Thread.java:722)&#xd;
    Caused by: java.lang.Exception: Invalid expression localizeMsg(''): null&#xd;
    at com.niku.xql2.XQLVisitor.eval(XQLVisitor.java:1126)&#xd;
    at com.niku.xql2.XQLVisitor.eval(XQLVisitor.java:1052)&#xd;
    at com.niku.xql2.XQLVisitor.process(XQLVisitor.java:1284)&#xd;
    ... 72 more&#xd;
    Caused by: java.lang.NullPointerException</Description>
            <Exception><![CDATA[
    java.lang.NullPointerException
    ]]></Exception>
          </ErrorInformation>
        </Record>
      </Records>
    </XOGOutput>
    One important observation about this XOG is that the create view of the project object is not being migrated. We don't know exactly why, but this would be our next question, as we want to migrate everything. smiley
    I appreciate any help on this one.
    Thanks a lot.
    Vitor.


  • 2.  RE: Troubles while xogging project object

    Posted Apr 30, 2014 02:37 AM

    Just wondering again...

    Can you split the file you are writing to sections lookups, properties and views and XOG in those in that sequence. Even more parts if you have more sections.

    Secondly search the file for

    &#xd

    and if you find it try to figeure an aceptable replacement.

     

    Martti K.



  • 3.  RE: Troubles while xogging project object

    Posted Apr 30, 2014 09:19 AM

    Thanks for your answer Martti. In fact our file had some references to '&#xd' and '&#x'. We have cleaned all this references of the file but the error persist.

    We can split the file in several parts. What would be your suggestion of sequence and how can we do that?

    Thanks a lot.

    Vitor.



  • 4.  RE: Troubles while xogging project object

    Posted Apr 30, 2014 09:57 AM

    Belo are the sections which I got in an old project object read

    To XOG it back in in parts I should start with the one which is the prequisite.

    That is first write just the lookups.

    Then the object section which has the properties and such.

    Views would be the last because the has both the previous as prequisites.

    If you have more sections then you would have to figure out their sequence.

    If removing the character set did not remove the error, XOGing parts gives you smaller files for locating the problem.

     

    Martti K.



  • 5.  RE: Troubles while xogging project object



  • 6.  RE: Troubles while xogging project object

    Posted Apr 30, 2014 11:26 AM

    Looking at your output from the write

      <Statistics failureRecords="1" insertedRecords="-2" totalNumberOfRecords="14" updatedRecords="15"/>
      <Records>
        <Record>
          <KeyInformation>
            <column name="externalSource">NIKU</column>
            <column name="source"/>
            <column name="code">project</column>
          </KeyInformation>
          <ErrorInformation>
            <Severity>FATAL</Severity>
            <Description>XOG-3360: Custom attribute record has not been inserted java.lang.Exception: Failure while evaluating "localizeMsg('')" in expression "{localizeMsg('{message}')}" error: Invalid expression localizeMsg(''): null&#xd;
     
    It says failed records 1 and total number 14.
    Can you indentify what is "record" in the input file?
     
    Custom attribute record has not been inserted
    You should be able to identify your custom attributes in the source system and identify them in the xml file as well. If you can do that try skipping them one by one at a time.
     
    Just wondering again ....
    When you saved the output file from the source system did you save is UTF-8 encoded?
    If not try that.
    Just to see if it something in the encoding that can be picked up easily, open the file in IE to see if the XML syntax is basically OK.
     
    Martti K.
     


  • 7.  RE: Troubles while xogging project object

    Posted Apr 30, 2014 01:08 PM

    Then again if you have custom attributes that have non-ascii lables those would be first thing to check.

     

    Martti K.



  • 8.  RE: Troubles while xogging project object

    Posted Apr 30, 2014 09:39 PM

    Martti, thank you very much for your suggestions.

    We were able to split the file in several other files and test each section to discover exactly where the error was coming from. In the end we realized that the error was in the <audit> tag. We still don't know what was the problem but as soon I have some time I will try to discover what was happening.

    Regards,

    Vitor.



  • 9.  RE: Troubles while xogging project object

    Posted May 02, 2014 09:21 AM

    You can split those pesky XOG files into little ones using the VisualXOG XML Splitter. 

    http://www.addisonstuart.com/visualxog/downloads.html

    It can split at any level in the XML, so you could take a Project XOG and Split it into Task XOGs

    Give it a try!



  • 10.  Re: RE: Troubles while xogging project object

    Posted Nov 22, 2016 09:42 AM

    Hi There,

     

    I downloaded (as of 21.11.2016) VisualXOG, though after having installed it (Win7) and trying to run, I received a message

    that the beta-phase is over and I should check for a recent version; couldn't start the UI, as only the message appeared.

     

    I couldn't find a more recent setup version of VisualXOG to try.

     

    HTH.

     

    Kind regards,

    Sebastian



  • 11.  Re: Troubles while xogging project object

    Posted Dec 22, 2016 07:58 AM

    &#xD;&#xA; are carriage returns and line feed or "\r\n"

    In the Clarity UI this change of line works on Area text fields,

    How can be replaced in xml (in order to keep the change of line)?

     

    I also found problems with  a special type of double quotation mark, probably due copy paste from Ms word or web

     

    As the normal double quotation mark  " (hexcode 22) is used by xml, when in xml content it will be translated to the  XML predefined entities &quot;

    but this special double quotation marks “ ” (hexcode e2 80 9c  and e2 80 9d) will keep format and for any reason XOG doesn't like it.

     

    Anyway at least code &#xD;&#xA; seems to be working fine in the following xml tags:

     

    <nls description=

    (/contentPack/Processes/Process/Steps/Step/Operations/Action/nls/@description)

    (/contentPack/Processes/Process/nls/@description)

     

    <Action  aiDescription="

    (/contentPack/Processes/Process/Steps/Step/Operations/Action/@aiDescription)

     

    <message description="

    (/contentPack/Processes/Process/Steps/Step/Operations/Action/message/@description)

     

     

    Where did you find code  &#xD;&#xA; failing?



  • 12.  Re: Troubles while xogging project object

    Posted Dec 22, 2016 08:15 AM

    Hi DAPG,

     

    you could use the editor Notepad (on Windows: Edit à EOL Conversion) to adjust the line endings.

     

    HTH,

    Sebastian



  • 13.  Re: Troubles while xogging project object

    Posted Nov 22, 2016 08:04 AM

    We had experienced the error when xog-ging in the project object (with custom sub-objects) where attributes have been deactivated in the source system - and were not available in the target system.
    These (inactive) attributes were setup for audit trail and have been used in NSQL-queries (and in viewFieldDescriptor).

    Once we cleaned up the xml-file (removing / commenting out the deactivated attributes references) and adjusted the query the xog-in worked.

    HTH.

     

    Kind regards,

    Sebastian

     

    P.S. inactive attributes could also be activated before xog-ging out for the purpose of export, and deactivated once the export finished (to be deactivated in the target environment again); another option is to delete the attributes (with its data) prior to xogging-out.

    CA PPM version 13.2