1 Reply Latest reply on Nov 22, 2005 11:52 PM by aguizar

    WARNING: Unable to validate using schema.  Make sure Xerces

    pedrosacosta

      In my simple code, i've this warning when i try to run it.

      WARNING: Unable to validate using schema. Make sure Xerces is first in your class path.

      I've in my lib directory the following libraries:

      commons-logging.jar
      dom4j.jar
      hibernate3.jar
      j2ee.jar
      jbossall-client.jar
      jbpm-3.0.jar
      junit-3.8.1.jar
      org.apache.xerces_2.7.0.jar
      xercesImpl.jar

      All this libs are referenciated in my project.


      My code is below:

      <?xml version="1.0" encoding="UTF-8"?>
      
      <process-definition
       xmlns="http://jbpm.org/3/jpdl"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://jbpm.org/3/jpdl http://jbpm.org/xsd/jpdl-3.0.xsd"
       name="processdefinition">
       <start-state name="start">
       <transition name="tr1" to="state"></transition>
       </start-state>
       <end-state name="end"></end-state>
       <state name="state">
       <transition name="tr1" to="end"></transition>
       </state>
      </process-definition>
      
      


      import org.jbpm.graph.def.ProcessDefinition;
      import org.jbpm.graph.exe.ProcessInstance;
      import org.jbpm.graph.exe.Token;
      import org.jbpm.taskmgmt.exe.TaskInstance;
      
      import junit.framework.TestCase;
      
      public class Tester extends TestCase {
       public void testSimpleProcess() throws Exception {
      
       // Extract a process definition from the processdefinition.xml file.
       ProcessDefinition definition = ProcessDefinition.parseXmlResource("processdefinition.par/processdefinition.xml");
      
       ProcessInstance processInstance = new ProcessInstance(definition);
      
       Token token = processInstance.getRootToken();
      // TaskInstance task = null;
      
       token.signal();
       token.signal();
      
       }
      
      }
      
      



      Thanks

        • 1. Re: WARNING: Unable to validate using schema.  Make sure Xer
          aguizar

          Quick fix: upgrade to JDK 1.5. It includes Xerces instead of Crimson as the default JAXP implementation.

          (Not so) slow fix: If I run your test under JDK 1.4 with the following classpath, it completes without any warning:

          commons-logging.jar
          dom4j.jar
          hibernate3.jar
          jbpm-3.0.jar
          junit-3.8.1.jar
          xercesImpl.jar

          If I remove xercesImpl.jar, I get the warning.

          I'm not sure what's in org.apache.xerces_2.7.0.jar. The Xerces 2.7.0 binary distribution does not include that file. It might be the source of the problem. Try removing it and see what happens.