Clarity

  • 1.  Error while xogging custom object

    Posted Aug 08, 2017 02:33 AM

    Hello All,

     

    We have created a new Object. While xogging it into another environment, it is throwing below error. The object is creating fine but no views are imported.

     

    <Description>XOG-3350: Custom view record has not been inserted java.lang.Exception: Invalid expression insertMasterView: com.niku.union.persistence.PersistenceException:
    SQL error code: 1400
    Error message: [CA Clarity][Oracle JDBC Driver][Oracle]ORA-01400: cannot insert NULL into ("NIKU"."ODF_VIEWS"."CODE")

    Executed:
    INSERT INTO ODF_VIEWS
    (id, code, view_type, view_subtype, principal_type, principal_id,
    data_service, data_service_type, object_code, caption, sequence,
    obs_table_name_key, is_system, partition_code, is_customized,
    link_code,
    is_secure,
    created_date, created_by, last_updated_date, last_updated_by
    )
    VALUES
    (?, ?, ?, ?, ?, ?,
    ?, ?, ?, ?, ?,
    ?, ?, ?, ?,
    ?,
    ?,
    ?, ?, ?, ?
    )
    Derived from statement:
    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
    &lt;statement location="view/property.xml" id="odf.insertPropertyView" sortColumnPath="/data/header/sortInfo/@sortColumn" sortDirectionPath="/data/header/sortInfo/@sortDirection" slicePath="/data/header/pagination/sliceInfo/@slice" sliceSizePath="/data/header/pagination/sliceInfo/@sliceSize" inputSource="none" xmlns="http://schemas.niku.com/2002/pmd"&gt;
    &lt;errorMapping applicationCode="odf.valueToLarge"&gt;
    &lt;dbError dbCode="1401" dbVendor="oracle"/&gt;
    &lt;dbError dbCode="8152" dbVendor="mssql"/&gt;
    &lt;/errorMapping&gt;
    &lt;sql dbVendor="all"&gt;
    &lt;text&gt;
    INSERT INTO ODF_VIEWS
    (id, code, view_type, view_subtype, principal_type, principal_id,
    data_service, data_service_type, object_code, caption, sequence,
    obs_table_name_key, is_system, partition_code, is_customized,
    link_code,
    is_secure,
    created_date, created_by, last_updated_date, last_updated_by
    )
    VALUES
    (?, ?, ?, ?, ?, ?,
    ?, ?, ?, ?, ?,
    ?, ?, ?, ?,
    ?,
    ?,
    ?, ?, ?, ?
    )
    &lt;/text&gt;
    &lt;param name="ID" direction="IN" expressionListDelimiter="," tableName="ODF_VIEWS" sequenceType="nextValue"/&gt;
    &lt;param name="viewName" type="string" direction="IN" expressionListDelimiter=","/&gt;
    &lt;param name="type" type="string" direction="IN" expressionListDelimiter=","/&gt;
    &lt;param name="view_subtype" type="string" direction="IN" expressionListDelimiter=","/&gt;
    &lt;param name="p_type" type="string" direction="IN" expressionListDelimiter=","/&gt;
    &lt;param name="p_id" type="int" direction="IN" expressionListDelimiter=","/&gt;
    &lt;param name="dataService" type="string" direction="IN" expressionListDelimiter=","/&gt;
    &lt;param name="dataServiceType" type="int" direction="IN" expressionListDelimiter=","/&gt;
    &lt;param name="objectName" type="string" direction="IN" expressionListDelimiter=","/&gt;
    &lt;param name="caption" type="string" direction="IN" expressionListDelimiter=","/&gt;
    &lt;param name="sequence" type="int" direction="IN" expressionListDelimiter=","/&gt;
    &lt;param name="obsTableNameKey" type="string" direction="IN" expressionListDelimiter=","/&gt;
    &lt;param name="is_system" type="int" direction="IN" defaultValue="0" expressionListDelimiter=","/&gt;
    &lt;param name="partitionCode" type="string" direction="IN" defaultValue="NIKU.ROOT" expressionListDelimiter=","/&gt;
    &lt;param name="is_customized" type="int" direction="IN" defaultValue="0" expressionListDelimiter=","/&gt;
    &lt;param name="linkCode" type="string" direction="IN" expressionListDelimiter=","/&gt;
    &lt;param name="is_secure" type="int" direction="IN" defaultValue="0" expressionListDelimiter=","/&gt;
    &lt;param replace="timestamp" direction="IN" expressionListDelimiter=","/&gt;
    &lt;param replace="userId" direction="IN" expressionListDelimiter=","/&gt;
    &lt;param replace="timestamp" direction="IN" expressionListDelimiter=","/&gt;
    &lt;param replace="userId" direction="IN" expressionListDelimiter=","/&gt;
    &lt;/sql&gt;
    &lt;outputMapping rowElementName="view"/&gt;
    &lt;/statement&gt;

    Referenced by:
    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
    &lt;statementRef id="odf.insertPropertyView" inputSource="map" sortColumnPath="/data/header/sortInfo/@sortColumn" sortDirectionPath="/data/header/sortInfo/@sortDirection" slicePath="/data/header/pagination/sliceInfo/@slice" sliceSizePath="/data/header/pagination/sliceInfo/@sliceSize" xmlns="http://schemas.niku.com/2002/pmd"/&gt;

    Using input:
    {is_system=0, viewName=, partitionCode=NIKU.ROOT, view_subtype=master, p_type=ADMINISTRATOR, objectName=z_user_chg_requests, caption=xogExport, is_customized=1, type=property} sequences[ODF_VIEWS: 5160001]

    at com.niku.xql2.XQLVisitor.eval(XQLVisitor.java:1134)
    at com.niku.xql2.XQLVisitor.eval(XQLVisitor.java:1060)
    at com.niku.xql2.handlers.MatchHandler.preProcess(MatchHandler.java:59)
    at com.niku.xql2.XQLVisitor.preProcess(XQLVisitor.java:1385)
    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:388)
    at com.niku.xql2.handlers.LoopHandler.processSet(LoopHandler.java:259)
    at com.niku.xql2.handlers.LoopHandler.preProcess(LoopHandler.java:216)
    at com.niku.xql2.XQLVisitor.preProcess(XQLVisitor.java:1385)
    at com.niku.union.xml.dom.DOMWalker.preProcess(DOMWalker.java:194)
    at com.niku.union.xml.dom.DOMWalker.traverseIntern(DOMWalker.java:74)



  • 2.  Re: Error while xogging custom object

    Posted Aug 08, 2017 06:04 AM

    Hi PragyaSingh

    In this scenario, some of the entries look like missing from the XOG. If someone would do it manually, he/she would have used all the entries in the xml.

     

    However there can be different scenarios where source and target environments have different subpages and we would not be interested in xogging-in all the entries from source. So, I understand we should xog-out this section from target, edit it by adding the new entries and xog-IN to target.



  • 3.  Re: Error while xogging custom object

    Posted Aug 08, 2017 06:41 AM

    You can try XOG-ing out the views (with a contentPack read / ViewQuery XOG ) - can specify the object (object_code) or individual views (code) I think.



  • 4.  Re: Error while xogging custom object

    Posted Aug 09, 2017 04:24 AM

    Which version of clarity are you using?

     

    Have you tried this using content package? There is an option to package the object/views and we can import into destination envionment.

     

    Thanks,

    Adersh Ram



  • 5.  Re: Error while xogging custom object

    Posted Feb 14, 2018 07:01 AM

    Hi All, 

     

    Does someone know the solution for this? I have the pretty same error when trying to XOG out Project Views (Subpages): cannot insert NULL into ("NIKU"."ODF_VIEWS"."CODE"). When tried to use Content Packages and import to new environment, it's the same. It seems for me that the some attribute is missing in update but I have no clue how to find it. As this is just XOG Read/Write, it should work....

    We are on Clarity 15.3.

     

    Thanks, 

    Matej