6 Replies Latest reply on Sep 25, 2013 7:29 PM by User10742723-Oracle

    Error calling Primavera - Import web service

    732001
      Hi,
      We are developing a .Net Application which communicates to the Primavera using Import web service. Client is succesful, but web service is not updating the Project, WBS and activity details and logging the below error details. Export service is working properly. Please help us to resolve the issue.

      Deatails
      Primavera 6.2
      DB: Oracle
      Apache CXF: 2.1.2
      Application server: JBoss 4.05

      Service : ImportService

      Error:
      at java.lang.Thread.run(Thread.java:595)
      10:26:50,128 ERROR [STDERR] Oct 14, 2009 10:26:50 AM org.apache.cxf.phase.PhaseI
      nterceptorChain doIntercept
      INFO: Interceptor has thrown exception, unwinding now
      org.apache.cxf.interceptor.Fault: Could not write attachments.

      Please let me know, need to more details.
      Thanks
        • 1. Re: Error calling Primavera - Import web service
          732001
          Complete log details for Reference.

          ================
          imp at org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCX
          FServlet.java:152)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
          icationFilterChain.java:252)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
          ilterChain.java:173)
          at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
          lter.java:96)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
          icationFilterChain.java:202)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
          ilterChain.java:173)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
          alve.java:213)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
          alve.java:178)
          at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
          yAssociationValve.java:175)
          at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
          e.java:74)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
          ava:126)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
          ava:105)
          at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConne
          ctionValve.java:156)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
          ve.java:107)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
          a:148)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
          :869)
          at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
          rocessConnection(Http11BaseProtocol.java:664)
          at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
          int.java:527)
          at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWor
          kerThread.java:112)
          at java.lang.Thread.run(Thread.java:595)
          Original Exception:
          java.io.FileNotFoundException: C:\Documents and Settings\User.v\ImportExport\I
          mport\ws_importer_1255501610112.xml (The system cannot find the file specified)
          at java.io.FileInputStream.open(Native Method)
          at java.io.FileInputStream.<init>(FileInputStream.java:106)
          at java.io.FileInputStream.<init>(FileInputStream.java:66)
          at com.primavera.integration.client.xml.xmlimporter.e.b.<init>(StAXCurso
          rReader.java)
          at com.primavera.integration.client.xml.xmlimporter.e.b.<init>(StAXCurso
          rReader.java)
          at com.primavera.integration.client.xml.xmlimporter.e.d.a(ImportReaderFa
          ctory.java)
          at com.primavera.integration.client.xml.xmlimporter.e.d.a(ImportReaderFa
          ctory.java)
          at com.primavera.integration.client.xml.xmlimporter.XMLImporter.updateEx
          istingProject(XMLImporter.java)
          at com.primavera.ws.jaxws.b.if(JAXWSFacade.java)
          at com.primavera.ws.importexport.WSImporterDelegate.updateExistingProjec
          t(WSImporterDelegate.java)
          at com.primavera.ws.importexport.WSImporter.updateExistingProject(WSImpo
          rter.java:44)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
          java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
          sorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:585)
          at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(Abst
          ractInvoker.java:136)
          at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker
          .java:82)
          at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.jav
          a:97)
          at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker
          .java:68)
          at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInv
          okerInterceptor.java:56)
          at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecu
          tor.java:37)
          at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(Se
          rviceInvokerInterceptor.java:92)
          at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
          orChain.java:220)
          at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti
          ationObserver.java:78)
          at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDes
          tination.java:92)
          at org.apache.cxf.transport.servlet.ServletController.invokeDestination(
          ServletController.java:283)
          at org.apache.cxf.transport.servlet.ServletController.invoke(ServletCont
          roller.java:166)
          at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCX
          FServlet.java:174)
          at org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCX
          FServlet.java:152)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
          icationFilterChain.java:252)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
          ilterChain.java:173)
          at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
          lter.java:96)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
          icationFilterChain.java:202)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
          ilterChain.java:173)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
          alve.java:213)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
          alve.java:178)
          at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
          yAssociationValve.java:175)
          at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
          e.java:74)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
          ava:126)
          at org.apache.catalina.valves.ErrorReportValve.
          10:26:50,112 ERROR [STDERR] invoke(ErrorReportValve.java:105)
          at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConne
          ctionValve.java:156)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
          ve.java:107)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
          a:148)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
          :869)
          at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
          rocessConnection(Http11BaseProtocol.java:664)
          at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
          int.java:527)
          at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWor
          kerThread.java:112)
          at java.lang.Thread.run(Thread.java:595)
          10:26:50,128 ERROR [STDERR] Oct 14, 2009 10:26:50 AM org.apache.cxf.phase.PhaseI
          nterceptorChain doIntercept
          INFO: Interceptor has thrown exception, unwinding now
          org.apache.cxf.interceptor.Fault: Could not write attachments.
          at org.apache.cxf.interceptor.AttachmentOutInterceptor$AttachmentOutEndi
          ngInterceptor.handleMessage(AttachmentOutInterceptor.java:81)
          at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
          orChain.java:220)
          at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(Out
          goingChainInterceptor.java:74)
          at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
          orChain.java:220)
          at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti
          ationObserver.java:78)
          at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDes
          tination.java:92)
          at org.apache.cxf.transport.servlet.ServletController.invokeDestination(
          ServletController.java:283)
          at org.apache.cxf.transport.servlet.ServletController.invoke(ServletCont
          roller.java:166)
          at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCX
          FServlet.java:174)
          at org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCX
          FServlet.java:152)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
          icationFilterChain.java:252)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
          ilterChain.java:173)
          at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
          lter.java:96)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
          icationFilterChain.java:202)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
          ilterChain.java:173)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
          alve.java:213)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
          alve.java:178)
          at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
          yAssociationValve.java:175)
          at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
          e.java:74)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
          ava:126)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
          ava:105)
          at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConne
          ctionValve.java:156)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
          ve.java:107)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
          a:148)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
          :869)
          at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
          rocessConnection(Http11BaseProtocol.java:664)
          at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
          int.java:527)
          at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWor
          kerThread.java:112)
          at java.lang.Thread.run(Thread.java:595)
          Caused by: java.io.FileNotFoundException: ws_importer_1255501610112.zip (The sys
          tem cannot find the file specified)
          at java.io.FileInputStream.open(Native Method)
          at java.io.FileInputStream.<init>(FileInputStream.java:106)
          at javax.activation.FileDataSource.getInputStream(FileDataSource.java:97
          )
          at javax.activation.DataHandler.writeTo(DataHandler.java:304)
          at org.apache.cxf.attachment.AttachmentSerializer.writeAttachments(Attac
          hmentSerializer.java:146)
          at org.apache.cxf.interceptor.AttachmentOutInterceptor$AttachmentOutEndi
          ngInterceptor.handleMessage(AttachmentOutInterceptor.java:79)
          ... 30 more
          10:26:50,128 ERROR [STDERR] Oct 14, 2009 10:26:50 AM org.apache.cxf.phase.PhaseI
          nterceptorChain doIntercept
          INFO: Interceptor has thrown exception, unwinding now
          org.apache.cxf.interceptor.Fault: Error writing to XMLStreamWriter.
          at org.apache.cxf.binding.soap.interceptor.Soap11FaultOutInterceptor.han
          dleMessage(Soap11FaultOutInterceptor.java:140)
          at org.apache.cxf.binding.soap.interceptor.Soap11FaultOutInterceptor.han
          dleMessage(Soap11FaultOutInterceptor.java:43)
          at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
          orChain.java:220)
          at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMess
          age(AbstractFaultChainInitiatorObserver.java:96)
          at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
          orChain.java:260)
          at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(Out
          goingChainInterceptor.java:74)
          at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
          orChain.java:220)
          at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti
          ationObserver.java:78)
          at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDes
          tination.java:92)
          at org.apache.cxf.transport.servlet.ServletController.invokeDestination(
          ServletController.java:283)
          at org.apache.cxf.transport.servlet.ServletController.invoke(ServletCont
          roller.java:166)
          at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCX
          FServlet.java:174)
          at org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCX
          FServlet.java:152)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
          icationFilterChain.java:252)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
          ilterChain.java:173)
          at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
          lter.java:96)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
          icationFilterChain.java:202)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
          ilterChain.java:173)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
          alve.java:213)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
          alve.java:178)
          at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
          yAssociationValve.java:175)
          at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
          e.java:74)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
          ava:126)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
          ava:105)
          at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConne
          ctionValve.java:156)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
          ve.java:107)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
          a:148)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
          :869)
          at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
          rocessConnection(Http11BaseProtocol.java:664)
          at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
          int.java:527)
          at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWor
          kerThread.java:112)
          at java.lang.Thread.run(Thread.java:595)
          Caused by: javax.xml.stream.XMLStreamException: Trying to output second root, <s
          oap:Fault>
          at com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.ja
          va:1473)
          at com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.ja
          va:1480)
          at com.ctc.wstx.sw.BaseStreamWriter.reportNwfStructure(BaseStreamWriter.
          java:1508)
          at com.ctc.wstx.sw.BaseNsStreamWriter.checkStartElement(BaseNsStreamWrit
          er.java:444)
          at com.ctc.wstx.sw.SimpleNsStreamWriter.writeStartOrEmpty(SimpleNsStream
          Writer.java:260)
          at com.ctc.wstx.sw.BaseNsStreamWriter.writeStartElement(BaseNsStreamWrit
          er.java:319)
          at org.apache.cxf.binding.soap.interceptor.Soap11FaultOutInterceptor.han
          dleMessage(Soap11FaultOutInterceptor.java:71)
          ... 33 more
          10:27:20,143 ERROR [STDERR] Oct 14, 2009 10:27:20 AM com.primavera.ws.sessionman
          agement.b a
          INFO: Session 9E70AECB1E93D35A0E62398F1A243C7B destroyed due to timeout.
          ortParam.FileTypeSpecified = true;
          • 2. Re: Error calling Primavera - Import web service
            587686
            Hi,
            Please look at where your XML import file is --

            java.io.FileNotFoundException: C:\Documents and Settings\User.v\ImportExport\I
            mport\ws_importer_1255501610112.xml (The system cannot find the file specified)

            You might want to write it to a directory that your application can access..

            That should do the trick!

            Thanks

            Sury
            • 3. Re: Error calling Primavera - Import web service
              user524451
              I have the problem like you had.

              Have you found a solution?

              Could you share your experience?

              My case is next:

              I'm developing .Net application for integration with Primavera 8.2.

              Deatails
              DB: Ms SQL Server 2005
              Application server: Weblogic

              Issue:
              I can't update project in Primavera P6 v 8.2 using Import web service.

              Sequence of events:

              1. Login to Primavera web service was successful.
              2. Export Primavera's project using ExportService was successful.
              3. Sending request UpdateExistingProject to ImportService.

              I got the response message with next parameters:
              Success: false
              ErrorMesage:
              C:\ImportExport\Import\ws_importer_1361971473502.xml (The system cannot find the file specified).
              LogFile:
              <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>Could not write attachments.</faultstring></soap:Fault></soap:Body></soap:Envelope>

              Note: That file (C:\ImportExport\Import\ws_importer_....xml) was creating with size 0 kb every time when I sent the request to web service.

              When I'm importing the same data using Primavera web client or Primavera desktop client It's ok.

              Thanks

              Artem
              • 4. Re: Error calling Primavera - Import web service
                user524451
                Hi.

                I suspect I faced with the same problem.
                Could you give me piece of advice or share your experience?

                Here is my case:

                I'm developing .Net application for integration with Primavera 8.2.

                Deatails
                DB: Ms SQL Server 2005
                Application server: Weblogic

                Issue:
                I can't update project in Primavera P6 v 8.2 using Import web service.

                Sequence of events:

                1. Login to Primavera web service was successful.
                2. Export Primavera's project using ExportService was successful.
                3. Sending request UpdateExistingProject to ImportService.

                I got the response message with next parameters:
                Success: false
                ErrorMesage:
                C:\ImportExport\Import\ws_importer_1361971473502.xml (The system cannot find the file specified).
                LogFile:
                <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>Could not write attachments.</faultstring></soap:Fault></soap:Body></soap:Envelope>

                Note: That file (C:\ImportExport\Import\ws_importer_....xml) was creating with size 0 kb every time when I sent the request to web service.

                When I'm importing the same data using Primavera web client or Primavera desktop client It's ok.


                Thanks

                Artem.
                • 5. Re: Error calling Primavera - Import web service
                  user8541177

                  HI ,

                   

                  Even i am facing the same problem. Did any one found the solution?

                   

                  Even I am trying to import using Primavera import service.

                   

                  Thanks,

                  Sunil

                  • 6. Re: Error calling Primavera - Import web service
                    User10742723-Oracle

                    I'd like you all to take a look at the following article:

                     

                      "Could Not Write Attachments" When Importing a Project with P6 Web Services (Doc ID 1583494.1)

                     

                    The error most often occurs when Message Transmission Optimization Mechanism (MTOM) is not being used when importing a file using P6 Web Services. Both Import and Export services require MTOM. If not using MTOM the XML import file is not formatted correctly in the request message and Web Services cannot create the temporary import file on the server resulting in a java.io.FileNotFoundException exception. When exporting no error is thrown but no file is created.

                     

                    The solution is to activate MTOM support either programatically or through the use of configuration.