cancel
Showing results for 
Search instead for 
Did you mean: 

Problem installation-Execution activiti-5.0alpha4 with Mysql

dr_pompeii
Champ in-the-making
Champ in-the-making
Dear Members

I am trying to install and execute activiti-5.0.alpha4 with mysql

Software used:

  • Windows XP SP3

  • Server version: 5.1.49-community MySQL Community Server (GPL)

  • mysql driver: mysql-connector-java-5.1.13-bin.jar

  • JDK 6 update 21

  • Tomcat 6.0.29
After to configure to work with mysql and my tomcat the follow files
  • build.properties

  • build.mysql.properties
and copied the mysql-connector-java-5.1.13-bin.jar driver to activiti-5.0.alpha4\[size=140]lib[/size] folder

Well I execute the ant command and I got the follow problem
D:\WhiteRoom\activiti\activiti-5.0.alpha4\setup>ant
Buildfile: D:\WhiteRoom\activiti\activiti-5.0.alpha4\setup\build.xml
     [echo] Activiti home = ..
     [echo] Activiti version = 5.0.alpha4

h2.install:
    [mkdir] Created dir: D:\WhiteRoom\activiti\activiti-5.0.alpha4\apps\h2
     [copy] Copying 5 files to D:\WhiteRoom\activiti\activiti-5.0.alpha4\apps\h2


internal.classpath.libs:

internal.taskdef.launch:

h2.start:
   [launch] launching cmd 'D:\WhiteRoom\activiti\activiti-5.0.alpha4\apps\h2\h2.start.bat '
            in dir 'D:\WhiteRoom\activiti\activiti-5.0.alpha4\apps\h2'
   [launch] waiting for launch completion msg 'TCP server running on'…
   [launch]   TCP server running on tcp://192.168.1.34:9092 (others can connect)


db.create:
      [sql] Executing resource: org/activiti/db/create/activiti.mysql.create.sql

      [sql] 29 of 29 SQL statements executed successfully

tomcat.install:
     [echo] Activiti home = ..
     [echo] Activiti version = 5.0.alpha4

internal.download.tomcat:
    [unzip] Expanding: D:\WareHouse\apache\tomcat\6.0.29\apache-tomcat-6.0.29.zip
            into D:\WhiteRoom\activiti\activiti-5.0.alpha4\apps
     [echo] Activiti home = ..
     [echo] Activiti version = 5.0.alpha4

tomcat.copy.users:
     [echo] Activiti home = ..
     [echo] Activiti version = 5.0.alpha4

tomcat.enable.debug:

cfg.create:
    [mkdir] Created dir: D:\WhiteRoom\activiti\activiti-5.0.alpha4\setup\build\activiti-cfg
     [copy] Copying 1 file to D:\WhiteRoom\activiti\activiti-5.0.alpha4\setup\build\activiti-cfg
      [jar] Building jar: D:\WhiteRoom\activiti\activiti-5.0.alpha4\setup\build\activiti-cfg.jar

deploy.activiti.engine.into.tomcat:
     [copy] Warning: activiti-cfg.jar modified in the future.
     [copy] Copying 6 files to D:\WhiteRoom\activiti\activiti-5.0.alpha4\apps\apache-tomcat-6.0.29\lib
   [delete] Deleting: D:\WhiteRoom\activiti\activiti-5.0.alpha4\apps\apache-tomcat-6.0.29\lib\el-api.jar

db.demo.data:
      [sql] Executing resource: D:\WhiteRoom\activiti\activiti-5.0.alpha4\setup\files\demo\mysql.data.sql
      [sql] 23 of 23 SQL statements executed successfully
      [zip] Building zip: D:\WhiteRoom\activiti\activiti-5.0.alpha4\setup\build\activiti-examples.bar
[deploy-bar] Initializing process engine default
[deploy-bar] 21/08/2010 02:44:15 PM org.activiti.ProcessEngines initProcessEnginFromResource
[deploy-bar] INFO: initializing process engine for resource
jar:file:/D:/WhiteRoom/activiti/activiti-5.0.alpha4/setup/build/activiti-cfg.jar!/activiti.properties
[deploy-bar] 21/08/2010 02:44:15 PM org.activiti.ProcessEngines initProcessEnginFromResource
[deploy-bar] INFO: Exception while initializing process engine :
             Error setting driver on UnpooledDataSource. Cause:
             java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

BUILD FAILED
D:\WhiteRoom\activiti\activiti-5.0.alpha4\setup\build.xml:195: org.activiti.ActivitiException:
Could not find a process engine with name 'default'
        at org.activiti.impl.ant.DeployBarTask.execute(DeployBarTask.java:73)

        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:390)
        at org.apache.tools.ant.Target.performTasks(Target.java:411)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1366)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
        at org.apache.tools.ant.Main.runBuild(Main.java:801)
        at org.apache.tools.ant.Main.startAnt(Main.java:218)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Total time: 10 seconds
D:\WhiteRoom\activiti\activiti-5.0.alpha4\setup>
I dont know what is wrong or missing, but according to the build.xml configuration file
the follow target only do reference to ${activiti.home}/lib or activiti-5.0.alpha4\lib where the driver yes is located
<target name="internal.classpath.libs">
    <path id="classpath.libs">
        <fileset dir="${activiti.home}/lib">
             <include name="*.jar" />
        </fileset>
     </path>
</target>
and the line 195 mentioned in the error stacktrace is this

<taskdef name="deploy-bar" classname="org.activiti.impl.ant.DeployBarTask">
        <classpath>
           <pathelement path="files/demo"/>
           <fileset dir="build">
          <include name="activiti-cfg.jar"/>
           </fileset>
        <fileset dir="${activiti.home}/lib">
          <include name="activiti-engine-${activiti.version}.jar"/>
          <include name="mybatis-*.jar"/>
          <include name="h2-*.jar"/>
          <include name="freemarker-*.jar" />
          <include name="juel*.jar" />
        </fileset>
        </classpath>
     </taskdef>
     <deploy-bar file="${activiti.home}/setup/build/activiti-examples.bar" />
  </target>
Not very useful in try to dectect the error related with the MySql's driver

I need the help of Activiti's developers

Thanks in advanced
8 REPLIES 8

eranriesenfeld
Champ in-the-making
Champ in-the-making
Hi Manuel, hi to the rest of the board,

the exception is thrown while executing the deploy-bar task, I would guess you have to add the mysql-connector-*.jar to your fileset.

After adding the .jar your deploy-bar task it should look this:

<taskdef name="deploy-bar" classname="org.activiti.impl.ant.DeployBarTask">
    <classpath>
     <pathelement path="files/demo"/>
     <fileset dir="build">
          <include name="activiti-cfg.jar"/>
     </fileset>
        <fileset dir="${activiti.home}/lib">
          <include name="activiti-engine-${activiti.version}.jar"/>
          <include name="mybatis-*.jar"/>
          <include name="h2-*.jar"/>
      <include name="mysql-*.jar"/>
          <include name="freemarker-*.jar" />
          <include name="juel*.jar" />
        </fileset>
    </classpath>
   </taskdef>
   <deploy-bar file="${activiti.home}/setup/build/activiti-examples.bar" />
  </target>

As you use mysql you can comment the h2 related tasks and delete the <include name="h2-*.jar"/> from your taskdef. If you comment the h2 tasks dont forget to remove them from your build dependencies.

hope that helps

regards,

Eran

dr_pompeii
Champ in-the-making
Champ in-the-making
Hello Eran

Thanks a lot for the reply!
the exception is thrown while executing the deploy-bar task, I would guess you have to add the mysql-connector-*.jar to your fileset.
Yes I added <include name="mysql-*.jar"/> in such taskdef and all goes well, thanks a lot!!, and to be honest I thought the solution that you told me, but I didn't because I thought that such build.xml was totally already tested to work with both DB

As you use mysql you can comment the h2 related tasks and delete the <include name="h2-*.jar"/> from your taskdef.
Is not necessary for a successful startup, I don't test yet the sample code

If you comment the h2 tasks dont forget to remove them from your build dependencies.
Again Is not necessary for a successful startup, I don't test yet the sample code

BTW, do you know a complete tutorial for installation?,the activiti's documentation is not very expanded ,I am thinking to write one in my blog, exists some tricks that I discovered through the steps of installation, I want to share with other members

About the <include name="mysql-*.jar"/> Therefore is it a bug?

My Best Regards

tombaeyens
Champ in-the-making
Champ in-the-making

dr_pompeii
Champ in-the-making
Champ in-the-making
Hello Tom

OK, I found two bugs, thanks for create the JIRA.

I going to create a tutorial in my Blog about installation instructions, because exists
others tricks, it must be useful for the community

Best Regards

cmuelder
Champ in-the-making
Champ in-the-making
Hi dr_pompeii,

the problem should be fixed in the beta1-release. See JIRA for further info!

Regards,
Christian

dr_pompeii
Champ in-the-making
Champ in-the-making
Hello Christian

Yes, I have read the two JIRA's links

right now I am executing and doing an analysis about the examples source code 😃

Best Regards!

bonjonbovi
Champ in-the-making
Champ in-the-making
I get following error with H2 Database; dont think it is db related.

db.demo.data:
      [sql] Executing resource: /Users/anthos/Downloads/activiti-5.0.beta2/setup/build/demo/h2.data.sql
      [sql] 26 of 26 SQL statements executed successfully
[deploy-bar] Initializing process engine default

BUILD FAILED
/Users/anthos/Downloads/activiti-5.0.beta2/setup/build.xml:357: org.activiti.engine.ActivitiException: Could not find a process engine with name 'default'

jbarrez
Star Contributor
Star Contributor
There should be something else going wrong before that if you get that exception.

Can you paste the whole ant log ?