0 Replies Latest reply on Dec 5, 2005 3:49 AM by Daniel Woo

    [build.deploy.xml] jbpmschema can not load MySQL driver

    Daniel Woo Newbie

      Hi,
      I am a greenhand in jBPM, I just downloaded jBPM and tried to use mySQL as backend database server. I create a folder like ${jbpmhome}/lib/mysql and copied mySQL JDBC driver to there. Then edited hibernate.cfg.xml etc to switch to mySQL instead of hsqldb. Then I tried to execute ant -buildfile buld.deploy.xml create.db, but I got a ClassNotFound exception for missing com.mysql.jdbc.Driver.
      the jbpmschema ant task uses classpath.ant as classpath reference:

       <taskdef file="src/java.jbpm/org/jbpm/ant/jbpm.ant.tasks.properties" format="properties">
       <classpath refid="classpath.ant" />
       </taskdef>
      

      And this is the classpath.ant declaration:
       <path id="classpath.ant">
       <pathelement path="build/classes.identity" />
       <pathelement path="build/classes.jbpm" />
       <pathelement path="build/classes.webapp" />
       <pathelement path="src/config.files" />
       <fileset dir="lib" includes="**/*.jar" />
       </path>
      

      I am sure that the variable 'classpath.ant' in ant script contains the path to mySQL JDBC driver, I added
      <property name="classpath.ant.debug" refid="classpath.ant"/>
      <echo message="classpath.ant=${classpath.ant.debug}"/>
      

      in the scripts, and it printed clearly that JDBC driver has already been in the classpath
      [echo] classpath.ant=D:\Projects\jBPM\dev\jbpm-3.0.2\build\classes.identity;D:\Projects\jBPM\dev\jbpm-3.0.2\build\classes.jbpm;D:\Projects\jBPM\dev\jbpm-3.0.2\build\classes.webapp;D:\Projects\jBPM\dev\jbpm-3.0.2\src\config.files;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\ant\ant-1.6.2-stripped.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\clover\clover.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\commons\commons-beanutils-1.6.1.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\commons\commons-codec-1.3.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\commons\commons-digester-1.5.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\dom4j\dom4j-1.6.1.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\hibernate\c3p0-0.8.5.2.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\hibernate\ehcache-1.1.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\hibernate\jaxen-1.1-beta-4.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\hibernate\jdbc2_0-stdext.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\hibernate\jta.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\jaxen\jaxen.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\jboss\antlr-2.7.5H3.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\jboss\asm-attrs.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\jboss\asm.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\jboss\bsh-1.3.0.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\jboss\cglib-2.1_2jboss.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\jboss\commons-collections.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\jboss\commons-logging.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\jboss\dom4j.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\jboss\hibernate3.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\jboss\hsqldb.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\jboss\javax.servlet.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\jboss\javax.servlet.jsp.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\jboss\jboss-common.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\jboss\jboss-j2ee.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\jboss\jboss-jmx.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\jboss\jboss-system.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\jboss\jboss.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\jboss\log4j.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\jboss\xercesImpl.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\jboss\xml-apis.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\jsf\jstl-1.1.0.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\jsf\myfaces-api.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\jsf\myfaces-impl.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\jsf\standard-1.1.2.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\jsf\tomahawk.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\junit\junit-3.8.1.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\mysql\mysql-connector-java-3.1.10-bin.jar;D:\Projects\jBPM\dev\jbpm-3.0.2\lib\struts\struts-1.2.7.jar
      



      I am confused, why it always said that ClassNotFound??? Anyone could help me? Thanks ahead.

      Daniel