AnsweredAssumed Answered

Get Documents stored in Database by XOG v13.3

Question asked by CRomero81 on Jun 5, 2014
Latest reply on Jun 9, 2014 by CRomero81

Hi,

I'm not able to make this to work in Clarity v13.3. It's working fine in v12.1.

We have our files stored in the database. Our two databases are identical, so the same file and version have the same IDs in both DB. I can open the same documents in both old and new Clarity from the Knowledge Store.

When I try a XOG to retrieve a document from our old clarity, I can put it wherever I want in my filesystem changing the 'documentLocation' argument in the header of the XOG xml. It creates a folder tree with the document inside.

When I try the same request against our new v13.3 Clarity, all I get is a XOG error saying that it can't save the file to the file store. The SQL trace shows that it finds the document and the BLOB with the content in the database, it just fails saving it to disk later, and I don't see any other error in the logs, so I don't know what's the problem.

Anybody else had this issue? Any help?

Thanks a lot



This is the XOG I try:
<NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_read.xsd">
     <Header version="7.5" action="read" objectType="document" externalSource="NIKU">
         <args name="documentLocation" value="d:\Files"/>
     </Header>
     <DocumentQuery>
         <Filter name="documentPath" criteria="EQUALS">/Root/DMS/KS</Filter>
         <Filter name="documentName" criteria="EQUALS">PRUEBA.TXT</Filter>
     </DocumentQuery>
</NikuDataBus>

This is what I should get:
<?xml version="1.0" encoding="UTF-8"?>
<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.2.1260"/>
     <Documents>
         <Parent documentLocation="d:\Files" documentPath="/Root/DMS/KS">
             <Document allowNonParticipants="0"
                 fileCreatedDate="2014-05-14T00:00:00"
                 hasAllParticipants="1" language="en" name="PRUEBA.TXT"
                 numCheckoutDays="1" status="0" versioningEnabled="1">
                 <Version id="5464552" owner="E019842" status="0" versionNumber="1"/>
             </Document>
         </Parent>
     </Documents>
     <XOGOutput>
         <Object type="document"/>
         <Status state="SUCCESS"/>
         <Statistics failureRecords="0" insertedRecords="0"
             totalNumberOfRecords="1" updatedRecords="0"/>
         <Records/>
     </XOGOutput>
</NikuDataBus>

This is what I get:
<NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_document.xsd">
     <Header action="write" externalSource="NIKU" objectType="document" version="13.3.0.286"/>
     <Documents/>
     <XOGOutput>
         <Object type="document"/>
         <Status state="FAILURE"/>
         <Statistics failureRecords="0" insertedRecords="0"    totalNumberOfRecords="0" updatedRecords="0"/>
         <Records>
             <Record>
                 <KeyInformation/>
                 <ErrorInformation>
                     <Severity>FATAL</Severity>
                     <Description>XOG-4001: Failed to export documents.</Description>
                     <Exception>
                         <![CDATA[com.niku.dms.util.DMSException: Unable to save file to file store.
                         at com.niku.dms.util.FileUtil.storeFileContentsInLocation(FileUtil.java:250)
                         at com.niku.dms.service.DocumentXOGService.exportSingleDocument(DocumentXOGService.java:121)
                         at com.niku.dms.xql2.handlers.ExportSingleDocumentHandler.postProcess(ExportSingleDocumentHandler.java:41)
                         at com.niku.xql2.XQLVisitor.postProcess(XQLVisitor.java:1411)
                         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.traverse(DOMWalker.java:51)
                         at com.niku.xql2.handlers.LoopHandler.processObject(LoopHandler.java:384)
                         at com.niku.xql2.handlers.LoopHandler.processSet(LoopHandler.java:255)
                         at com.niku.xql2.handlers.LoopHandler.preProcess(LoopHandler.java:212)
                         at com.niku.xql2.XQLVisitor.preProcess(XQLVisitor.java:1377)
                         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.TryHandler.preProcess(TryHandler.java:50)
                         at com.niku.xql2.XQLVisitor.preProcess(XQLVisitor.java:1377)
                         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:384)
                         at com.niku.xql2.handlers.LoopHandler.processSet(LoopHandler.java:255)
                         at com.niku.xql2.handlers.LoopHandler.preProcess(LoopHandler.java:212)
                         at com.niku.xql2.XQLVisitor.preProcess(XQLVisitor.java:1377)
                         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.traverseIntern(DOMWalker.java:92)
                         at com.niku.union.xml.dom.DOMWalker.traverse(DOMWalker.java:36)
                         at com.niku.xog.service.XOGXBLHandler.processXBL(XOGXBLHandler.java:260)
                         at com.niku.xog.service.XOGXBLHandler.process(XOGXBLHandler.java:167)
                         at com.niku.xog.service.ObjectHandler.processRequest(ObjectHandler.java:197)
                         at com.niku.xog.service.ObjectHandler.process(ObjectHandler.java:99)
                         at com.niku.xog.service.XOGDispatch.processMessage(XOGDispatch.java:133)
                         at com.niku.xog.service.XOGSOAPServlet.processMessage(XOGSOAPServlet.java:599)
                         at com.niku.xog.service.XOGSOAPServlet.doPost(XOGSOAPServlet.java:359)
                         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.iberdrola.gaudi.monitor.filter.PerfMonitorFilter.doFilter(PerfMonitorFilter.java:149)
                         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
                         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:310)
                         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)]]>
                     </Exception>
                 </ErrorInformation>
             </Record>
         </Records>
     </XOGOutput>
</NikuDataBus>

Outcomes