1 Reply Latest reply on Aug 19, 2012 10:00 PM by prasaxen

    Use custom component to retrieve form data: Error while starting component

    prasaxen Level 1

      Hi,

       

      I am creating a custom component which would take task Id and sring as an input. And then using Task Manager I am extracting form Instance and then document for a task id.

       

       

      Then after modifying com.adobe.idp.Document content , I am completing that particular task also.

       

       

      I am able to complete all these tasks if i normally invoke this code using SOAP protocol without making it as a Custom component.

       

       

      But when i made a custom component and tried installing, it was successfull, but on Start it gives error:- START command failed on component "comment"

       

       

      In server logs i am seeing this error:-

       

      "Exception data: java.lang.NoClassDefFoundError: com.adobe.idp.taskmanager.dsc.client.task.TaskManager

       

      Class name com.adobe.idp.taskmanager.dsc.client.task.TaskManager from package com.adobe.idp.taskmanager.dsc.client.task not found."

       

      I am using following statements in <import-packages> tag

       

          <import-packages>

              <package version="1.0">com.adobe.idp.taskmanager.form</package>

              <package version="1.0">com.adobe.idp.taskmanager.form.impl</package>

              <package version="1.0">com.adobe.idp.taskmanager.form.impl.xfa</package>

              <package version="1.0">com.adobe.idp.taskmanager.form.impl.generic</package>

              <package version="1.0">com.adobe.idp.taskmanager.form.impl.binarycontent</package>

              <package version="1.0">com.adobe.idp.taskmanager.dsc.client.endpoint</package>

              <package version="1.0">com.adobe.idp.taskmanager.dsc.client</package>

              <package version="1.0">com.adobe.idp.taskmanager.dsc.client.task</package>

              <package version="1.0">com.adobe.idp.Document</package>

              <package>java.io.InputStream</package>

              <package version="1.0">com.adobe.idp.taskmanager.dsc.client.events</package>

              <package version="1.0">com.adobe.idp.taskmanager.dsc.util</package>

              <package version="1.0">com.adobe.idp.taskmanager.dsc.taskevents</package>

              <package version="1.0">javax.xml.stream</package>

              <package>com.adobe.livecycle.usermanager.client</package>

              <package>com.adobe.comment.service</package>

          </import-packages>

       

      Also i tried with <dynamic-import-packages> but no luck.

       

      Any help would be much appreciated.

       

      Thanks,

      Prashast

        • 1. Re: Use custom component to retrieve form data: Error while starting component
          prasaxen Level 1

          I am using this particular code to extract form instance and then editing it using Task Manager API

           

                   ServiceClientFactory myFactory=getFactory(); //this is a separate method.

                  TaskManager taskManager = TaskManagerClientFactory.getTaskManager(myFactory);

                  FormInstance formInstance=taskManager.getFormInstanceForTask(taskId,0,true);

           

           

                  Document formData=new Document(formInstance.getXFAData());

                  formData.setContentType("text/xml");

           

           

                  XmlUtil xml=new XmlUtil(formData.getInputStream());

           

           

                  String comments=xml.getNodeTextContent("Name","EmpName");

                  comments=comments+" "+newComments;

           

           

                  xml.setNodeTextContent("Name","EmpName",comments);

                  Document newFormData=new Document(xml.toString().getBytes());

                  newFormData.setContentType("application/vnd.adobe.xdp+xml");

           

           

                  FormInstance newFormInstance=taskManager.getEmptyForm();

                  newFormInstance.setFormInstanceId(0);

                  newFormInstance.setDocument(newFormData);

           

           

                  taskManager.save(taskId,newFormInstance);

                  CompleteTaskResult result=taskManager.completeTask(taskId,"Approve");