cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to setup demo for activiti-5.9

amanpreetkaur06
Champ in-the-making
Champ in-the-making
I tried to setup the demo for activiti-5.9
and i facing the following problem while running the ant.
Can anyone help me with this….
is the structure of the database changed coz i already have h2 server with the given db in my system for activiti-5.7 version.

activiti-5.9/setup# ant demo.start
Buildfile: build.xml

demo.install:
     [echo] installing demo…

internal.define.jdbc.driver.libs:

internal.build.webapps:
    [mkdir] Created dir: /home/ruchi/Desktop/Aman/activiti-5.9/setup/build/webapps
     [copy] Copying 568 files to /home/ruchi/Desktop/Aman/activiti-5.9/setup/build/webapps
     [copy] Copied 75 empty directories to 2 empty directories under /home/ruchi/Desktop/Aman/activiti-5.9/setup/build/webapps
     [copy] Copying 35 files to /home/ruchi/Desktop/Aman/activiti-5.9/setup/build/webapps/activiti-explorer.war/WEB-INF/lib
[propertyfile] Updating property file: /home/ruchi/Desktop/Aman/activiti-5.9/setup/build/webapps/activiti-explorer.war/WEB-INF/classes/db.properties
     [copy] Copying 78 files to /home/ruchi/Desktop/Aman/activiti-5.9/setup/build/webapps/activiti-rest.war/WEB-INF/lib
[propertyfile] Updating property file: /home/ruchi/Desktop/Aman/activiti-5.9/setup/build/webapps/activiti-rest.war/WEB-INF/classes/db.properties

internal.db.install.h2:
     [echo] Installing H2 database in ../apps/h2
    [mkdir] Created dir: /home/ruchi/Desktop/Aman/activiti-5.9/apps/h2
     [copy] Copying 7 files to /home/ruchi/Desktop/Aman/activiti-5.9/apps/h2

internal.db.install.h2.unnecessary:

internal.db.install.unsupported:

h2.install:

internal.cfg.create:
    [mkdir] Created dir: /home/ruchi/Desktop/Aman/activiti-5.9/setup/build/activiti-cfg
     [copy] Copying 1 file to /home/ruchi/Desktop/Aman/activiti-5.9/setup/build/activiti-cfg
      [zip] Building zip: /home/ruchi/Desktop/Aman/activiti-5.9/setup/build/activiti-cfg.jar
     [echo] copying configuration to ../workspace/activiti-engine-examples/src/main/config
    [mkdir] Created dir: /home/ruchi/Desktop/Aman/activiti-5.9/workspace/activiti-engine-examples/src/main/config
    [unzip] Expanding: /home/ruchi/Desktop/Aman/activiti-5.9/setup/build/activiti-cfg.jar into /home/ruchi/Desktop/Aman/activiti-5.9/workspace/activiti-engine-examples/src/main/config

internal.classpath.libs:

internal.taskdef.launch:

h2.start:
     [echo] starting H2 database…
   [launch] launching cmd '/home/ruchi/Desktop/Aman/activiti-5.9/apps/h2/h2.start.sh ' in dir '/home/ruchi/Desktop/Aman/activiti-5.9/apps/h2'
   [launch] waiting for launch completion msg 'TCP server running on'…
   [launch]   TCP server running on tcp://172.16.10.44:9092 (others can connect)
     [echo] H2 database started

internal.cfg.create:
     [copy] Copying 1 file to /home/ruchi/Desktop/Aman/activiti-5.9/setup/build/activiti-cfg
     [echo] copying configuration to ../workspace/activiti-engine-examples/src/main/config
    [unzip] Expanding: /home/ruchi/Desktop/Aman/activiti-5.9/setup/build/activiti-cfg.jar into /home/ruchi/Desktop/Aman/activiti-5.9/workspace/activiti-engine-examples/src/main/config

internal.classpath.libs:

internal.db.create:
     [echo] creating db
     [java] 6 Mar, 2012 10:54:10 AM org.activiti.engine.ProcessEngines initProcessEnginFromResource
     [java] INFO: initializing process engine for resource jar:file:/home/ruchi/Desktop/Aman/activiti-5.9/setup/build/activiti-cfg.jar!/activiti.cfg.xml
     [java] log4j:WARN No appenders could be found for logger (org.springframework.beans.factory.xml.XmlBeanDefinitionReader).
     [java] log4j:WARN Please initialize the log4j system properly.
     [java] ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.sun.script.javascript.RhinoScriptEngineFactory not found
     [java] SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
     [java] SLF4J: Defaulting to no-operation (NOP) logger implementation
     [java] SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
     [java] 6 Mar, 2012 10:54:12 AM org.activiti.engine.ProcessEngines initProcessEnginFromResource
     [java] SEVERE: Exception while initializing process engine :Error while building ibatis SqlSessionFactory: XPathFactory#newInstance() failed to create an XPathFactory for the default object model: http://java.sun.com/jaxp/xpath/dom with the XPathFactoryConfigurationException: javax.xml.xpath.XPathFactoryConfigurationException: No XPathFactory implementation found for the object model: http://java.sun.com/jaxp/xpath/dom
     [java] org.activiti.engine.ActivitiException: Error while building ibatis SqlSessionFactory: XPathFactory#newInstance() failed to create an XPathFactory for the default object model: http://java.sun.com/jaxp/xpath/dom with the XPathFactoryConfigurationException: javax.xml.xpath.XPathFactoryConfigurationException: No XPathFactory implementation found for the object model: http://java.sun.com/jaxp/xpath/dom
     [java]    at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.initSqlSessionFactory(ProcessEngineConfigurationImpl.java:542)
     [java]    at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.init(ProcessEngineConfigurationImpl.java:307)
     [java]    at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:282)
     [java]    at org.activiti.engine.ProcessEngines.buildProcessEngine(ProcessEngines.java:177)
     [java]    at org.activiti.engine.ProcessEngines.initProcessEnginFromResource(ProcessEngines.java:150)
     [java]    at org.activiti.engine.ProcessEngines.init(ProcessEngines.java:88)
     [java]    at org.activiti.engine.ProcessEngines.getProcessEngine(ProcessEngines.java:207)
     [java]    at org.activiti.engine.ProcessEngines.getDefaultProcessEngine(ProcessEngines.java:200)
     [java]    at org.activiti.engine.impl.db.DbSchemaUpdate.main(DbSchemaUpdate.java:34)
     [java]    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java]    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
     [java]    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     [java]    at java.lang.reflect.Method.invoke(Method.java:616)
     [java]    at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:202)
     [java]    at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:134)
     [java]    at org.apache.tools.ant.taskdefs.Java.run(Java.java:710)
     [java]    at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:178)
     [java]    at org.apache.tools.ant.taskdefs.Java.execute(Java.java:84)
     [java]    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
     [java]    at org.apache.tools.ant.Task.perform(Task.java:364)
     [java]    at org.apache.tools.ant.Target.execute(Target.java:341)
     [java]    at org.apache.tools.ant.Target.performTasks(Target.java:369)
     [java]    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
     [java]    at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37)
     [java]    at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
     [java]    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
     [java]    at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
     [java]    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
     [java]    at org.apache.tools.ant.Task.perform(Task.java:364)
     [java]    at org.apache.tools.ant.Target.execute(Target.java:341)
     [java]    at org.apache.tools.ant.Target.performTasks(Target.java:369)
     [java]    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
     [java]    at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
     [java]    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
     [java]    at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
     [java]    at org.apache.tools.ant.Main.runBuild(Main.java:668)
     [java]    at org.apache.tools.ant.Main.startAnt(Main.java:187)
     [java]    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
     [java]    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
     [java] Caused by: java.lang.RuntimeException: XPathFactory#newInstance() failed to create an XPathFactory for the default object model: http://java.sun.com/jaxp/xpath/dom with the XPathFactoryConfigurationException: javax.xml.xpath.XPathFactoryConfigurationException: No XPathFactory implementation found for the object model: http://java.sun.com/jaxp/xpath/dom
     [java]    at javax.xml.xpath.XPathFactory.newInstance(XPathFactory.java:98)
     [java]    at org.apache.ibatis.parsing.XPathParser.commonConstructor(XPathParser.java:246)
     [java]    at org.apache.ibatis.parsing.XPathParser.<init>(XPathParser.java:101)
     [java]    at org.apache.ibatis.builder.xml.XMLConfigBuilder.<init>(XMLConfigBuilder.java:40)
     [java]    at org.apache.ibatis.builder.xml.XMLConfigBuilder.<init>(XMLConfigBuilder.java:32)
     [java]    at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.initSqlSessionFactory(ProcessEngineConfigurationImpl.java:533)
     [java]    … 38 more
     [java] java.lang.NullPointerException
     [java]    at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:180)
     [java]    at org.apache.tools.ant.taskdefs.Java.run(Java.java:710)
     [java]    at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:178)
     [java]    at org.apache.tools.ant.taskdefs.Java.execute(Java.java:84)
     [java]    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
     [java]    at org.apache.tools.ant.Task.perform(Task.java:364)
     [java]    at org.apache.tools.ant.Target.execute(Target.java:341)
     [java]    at org.apache.tools.ant.Target.performTasks(Target.java:369)
     [java]    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
     [java]    at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37)
     [java]    at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
     [java]    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
     [java]    at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
     [java]    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
     [java]    at org.apache.tools.ant.Task.perform(Task.java:364)
     [java]    at org.apache.tools.ant.Target.execute(Target.java:341)
     [java]    at org.apache.tools.ant.Target.performTasks(Target.java:369)
     [java]    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
     [java]    at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
     [java]    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
     [java]    at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
     [java]    at org.apache.tools.ant.Main.runBuild(Main.java:668)
     [java]    at org.apache.tools.ant.Main.startAnt(Main.java:187)
     [java]    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
     [java]    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
     [java] Caused by: java.lang.NullPointerException
     [java]    at org.activiti.engine.impl.db.DbSchemaUpdate.main(DbSchemaUpdate.java:35)
     [java]    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java]    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
     [java]    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     [java]    at java.lang.reflect.Method.invoke(Method.java:616)
     [java]    at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:202)
     [java]    at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:134)
     [java]    … 24 more
     [java] — Nested Exception —
     [java] java.lang.NullPointerException
     [java]    at org.activiti.engine.impl.db.DbSchemaUpdate.main(DbSchemaUpdate.java:35)
     [java]    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java]    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
     [java]    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     [java]    at java.lang.reflect.Method.invoke(Method.java:616)
     [java]    at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:202)
     [java]    at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:134)
     [java]    at org.apache.tools.ant.taskdefs.Java.run(Java.java:710)
     [java]    at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:178)
     [java]    at org.apache.tools.ant.taskdefs.Java.execute(Java.java:84)
     [java]    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
     [java]    at org.apache.tools.ant.Task.perform(Task.java:364)
     [java]    at org.apache.tools.ant.Target.execute(Target.java:341)
     [java]    at org.apache.tools.ant.Target.performTasks(Target.java:369)
     [java]    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
     [java]    at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37)
     [java]    at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
     [java]    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
     [java]    at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
     [java]    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
     [java]    at org.apache.tools.ant.Task.perform(Task.java:364)
     [java]    at org.apache.tools.ant.Target.execute(Target.java:341)
     [java]    at org.apache.tools.ant.Target.performTasks(Target.java:369)
     [java]    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
     [java]    at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
     [java]    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
     [java]    at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
     [java]    at org.apache.tools.ant.Main.runBuild(Main.java:668)
     [java]    at org.apache.tools.ant.Main.startAnt(Main.java:187)
     [java]    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
     [java]    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)

internal.cfg.create:
     [copy] Copying 1 file to /home/ruchi/Desktop/Aman/activiti-5.9/setup/build/activiti-cfg
      [zip] Building zip: /home/ruchi/Desktop/Aman/activiti-5.9/setup/build/activiti-cfg.jar
     [echo] copying configuration to ../workspace/activiti-engine-examples/src/main/config
    [unzip] Expanding: /home/ruchi/Desktop/Aman/activiti-5.9/setup/build/activiti-cfg.jar into /home/ruchi/Desktop/Aman/activiti-5.9/workspace/activiti-engine-examples/src/main/config

internal.classpath.libs:

internal.db.demo.data:
     [echo] populating demo data
    [mkdir] Created dir: /home/ruchi/Desktop/Aman/activiti-5.9/setup/build/demo
     [copy] Copying 1 file to /home/ruchi/Desktop/Aman/activiti-5.9/setup/build/demo
      [sql] Executing file: /home/ruchi/Desktop/Aman/activiti-5.9/setup/build/demo/h2.data.sql
      [sql] Failed to execute:  insert into ACT_ID_GROUP values ('admin',       1, 'System administrator', 'security-role')

BUILD FAILED
/home/ruchi/Desktop/Aman/activiti-5.9/setup/build.xml:114: The following error occurred while executing this line:
/home/ruchi/Desktop/Aman/activiti-5.9/setup/build.xml:156: org.h2.jdbc.JdbcSQLException: Table "ACT_ID_GROUP" not found; SQL statement:
insert into ACT_ID_GROUP values ('admin',       1, 'System administrator', 'security-role') [42102-132]
   at org.h2.message.DbException.getJdbcSQLException(DbException.java:316)
   at org.h2.message.DbException.get(DbException.java:167)
   at org.h2.message.DbException.get(DbException.java:144)
   at org.h2.command.Parser.readTableOrView(Parser.java:4347)
   at org.h2.command.Parser.readTableOrView(Parser.java:4327)
   at org.h2.command.Parser.parseInsert(Parser.java:908)
   at org.h2.command.Parser.parsePrepared(Parser.java:365)
   at org.h2.command.Parser.parse(Parser.java:278)
   at org.h2.command.Parser.parse(Parser.java:250)
   at org.h2.command.Parser.prepareCommand(Parser.java:222)
   at org.h2.engine.Session.prepareLocal(Session.java:420)
   at org.h2.server.TcpServerThread.process(TcpServerThread.java:224)
   at org.h2.server.TcpServerThread.run(TcpServerThread.java:135)
   at java.lang.Thread.run(Thread.java:636)


Total time: 3 seconds
4 REPLIES 4

leman
Champ in-the-making
Champ in-the-making
:cry: I meet the same problem!  I  find it caused by failing to create database in h2, but I don't know how to solve it .

leman
Champ in-the-making
Champ in-the-making
I have solved my problems, these are caused by the JDK install directory which should not contain space character.
For example, c:\program files\java\jdk,  you'd better change the directory  like this way, c:\java\jkd.
I hope this will help you!

robin1
Champ in-the-making
Champ in-the-making
I'm having the same problem and having no spaces in my JDK path isn't fixing the problem.

Summary:  Demo for Activiti 5.9 isn't working.  When the browser window opens. no user accounts work for login. 
I suspect the database isn't being populated correctly but manually populating the h2 database through the console doesn't seem to fix the problem.

I also noticed that many of the sample projects in the demo are pointing to incorrect jar files - either earlier versions of the jar files which are no longer included in the demo or pointing to an incorrect folder.

robin1
Champ in-the-making
Champ in-the-making
I got it working.

There were database related errors showing up in the logs but the problem turned out to be the port for Tomcat.  8080 was being used by something else.

For some reason modifying the Tomcat server.xml file directly wasn't enough.  The trick was to do a complete "ant demo.clean", modify the /setup/build.xml file:

    <replace file="${tomcat.home}/conf/server.xml">
      <replacetoken><![CDATA[port="8080"]]></replacetoken>
      <replacevalue><![CDATA[port="8081" URIEncoding="UTF-8"]]></replacevalue>
    </replace>

And then do a clean re-install of the demo "ant demo.start".