2 Replies Latest reply on Nov 11, 2005 1:10 PM by Gerhard Wittwer

    Deployment of PAR with DeployServlet

    Gerhard Wittwer Newbie

      Hello

      In my webapp is the possibility to upload a PAR and deploy this PAR with the deploy servlet.
      If the PAR is generatet on Windows and the Server is running on UNIX/MAC I always get an

      20:45:15,185 ERROR [SchemaValidationHelper] Parsing problems
      in the log of the JBoss.

      The processdefinition is created with the name "null" version 1.
      Why does the core save the processdefinition if there are errors in the SAX-Parser?? And why the exceptions are catched and not thrown from the core?? How could I test if the deployment of the PAR was succesful?

      Thank you

      Regards
      Gerhard

        • 1. Re: Deployment of PAR with DeployServlet
          Alejandro Guizar Master

          Encoding problems, perhaps? Try adding this at the beginning of your processdefinition.xml:

          <?xml version="1.0" encoding="windows-1252"?>

          Or whatever encoding your Windows-based text editor is using.
          See issue 321 for further details. Be aware that this solution applies to jBPM 3.x, x > 0

          About error reporting, we are working in that area. Check out issue 322.
          You can deal with deployment errors this way:
          try {
           // create a process archive
           ZipInputStream zipSource = new ZipInputStream(externalSource);
           ProcessArchive archive = new ProcessArchive(zipSource);
           // build a process definition from the archive contents
           ProcessDefinition definition = archive.parseProcessDefinition();
           // check for parse errors
           if (archive.getProblems().isEmpty()) {
           // deploy the process to the database
           ProcessArchiveDeployer.deployProcessDefinition(definition);
           }
           else {
           // deal with parser errors
           }
           zipSource.close();
           }
           catch (Exception e) {
           // deal with system errors
           }