AnsweredAssumed Answered

Create Folders via XOG

Question asked by fpena on Aug 20, 2012
Latest reply on Aug 24, 2012 by Chris_Hackett
Hi All,
i am migrating documents from one environment to another, and xog is failing when there are folders.

when i run this (which is generated from the source file)
<NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_document.xsd">
<Header action="write" externalSource="NIKU" objectType="document" version="12.1.1.1208"/>
<Documents>
<Parent documentLocation="F:/clarity/documents"
parentObjectId="1010" parentObjectType="KS">
<General addedBy="admin" addedDate="2002-03-12"/>
<Folder allowNonParticipants="0" hasAllParticipants="0" name="KS">

</Folder>
</Parent>
</Documents>

</NikuDataBus>

it fails with this error

<?xml version="1.0" encoding="UTF-8"?>
<XOGOutput xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/status.xsd">
<Object type="document"/>
<Status state="FAILURE"/>
<Statistics failureRecords="1" insertedRecords="0"
totalNumberOfRecords="1" updatedRecords="0"/>
<Records>
<Record>
<KeyInformation/>
<ErrorInformation>
<Severity>FATAL</Severity>
<Description>XOG-4002: Failed to import documents.</Description>
<Exception><![CDATA[
java.lang.NullPointerException

at com.niku.dms.service.DMSService.addFolderPermissions(DMSService.java:4489)

at com.niku.dms.service.DMSService.createFolderWithoutPermCheck(DMSService.java:722)

at com.niku.dms.service.DocumentXOGService.importFolder(DocumentXOGService.java:209)

at com.niku.dms.xql2.functions.ImportFolderFunction.eval(ImportFolderFunction.java:46)

at com.niku.xql2.eval.XQLFunctionNode.eval(XQLFunctionNode.java:27)

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.traverseIntern(DOMWalker.java:92)

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.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.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>


this happens on all environments that i have tried (12.03,12.1.1,13.0)
any suggestions would be apreciated.

Outcomes