4 Replies Latest reply on Aug 14, 2012 8:32 AM by Ken Luke

    Error - Table 'jbpm5.task' doesn't exist after trying to set mysql db

    Shamal Karunarathne Newbie

      Hi,

      I followed the instructions in [http://docs.jboss.org/jbpm/v5.3/userguide/ch.installer.html#d0e469] to use mysql as the database. but then I get this error when starting jboss. could you help me to fix this please?

       

      {code}

      19:25:46,592 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/jbpm-human-task-war]] (MSC service thread 1-1) StandardWrapper.Throwable: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query

                at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:614) [hibernate-entitymanager-3.4.0.GA.jar:]

                at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:76) [hibernate-entitymanager-3.4.0.GA.jar:]

                at org.jbpm.task.service.persistence.TaskPersistenceManager.getUnescalatedDeadlinesList(TaskPersistenceManager.java:174) [jbpm-human-task-core-5.3.0.Final.jar:]

                at org.jbpm.task.service.persistence.TaskPersistenceManager.getUnescalatedDeadlines(TaskPersistenceManager.java:146) [jbpm-human-task-core-5.3.0.Final.jar:]

                at org.jbpm.task.service.TaskServiceSession.scheduleUnescalatedDeadlines(TaskServiceSession.java:231) [jbpm-human-task-core-5.3.0.Final.jar:]

                at org.jbpm.task.service.TaskService.initialize(TaskService.java:116) [jbpm-human-task-core-5.3.0.Final.jar:]

                at org.jbpm.task.service.TaskService.initialize(TaskService.java:101) [jbpm-human-task-core-5.3.0.Final.jar:]

                at org.jbpm.task.service.TaskService.<init>(TaskService.java:79) [jbpm-human-task-core-5.3.0.Final.jar:]

                at org.jbpm.task.servlet.HumanTaskServiceServlet.init(HumanTaskServiceServlet.java:127) [classes:]

                at javax.servlet.GenericServlet.init(GenericServlet.java:242) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

                at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1102) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3631) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at org.apache.catalina.core.StandardContext.start(StandardContext.java:3844) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)

                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_33]

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_33]

                at java.lang.Thread.run(Thread.java:680) [:1.6.0_33]

      Caused by: org.hibernate.exception.SQLGrammarException: could not execute query

                at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:90) [hibernate-core-3.3.2.GA.jar:]

                at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) [hibernate-core-3.3.2.GA.jar:]

                at org.hibernate.loader.Loader.doList(Loader.java:2235) [hibernate-core-3.3.2.GA.jar:]

                at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2129) [hibernate-core-3.3.2.GA.jar:]

                at org.hibernate.loader.Loader.list(Loader.java:2124) [hibernate-core-3.3.2.GA.jar:]

                at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401) [hibernate-core-3.3.2.GA.jar:]

                at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363) [hibernate-core-3.3.2.GA.jar:]

                at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196) [hibernate-core-3.3.2.GA.jar:]

                at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1149) [hibernate-core-3.3.2.GA.jar:]

                at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102) [hibernate-core-3.3.2.GA.jar:]

                at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:67) [hibernate-entitymanager-3.4.0.GA.jar:]

                ... 18 more

      Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'jbpm5.task' doesn't exist

                at sun.reflect.GeneratedConstructorAccessor17.newInstance(Unknown Source) [:1.6.0_33]

                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) [:1.6.0_33]

                at java.lang.reflect.Constructor.newInstance(Constructor.java:513) [:1.6.0_33]

                at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)

                at com.mysql.jdbc.Util.getInstance(Util.java:386)

                at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)

                at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3609)

                at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3541)

                at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2002)

                at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2163)

                at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2624)

                at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2127)

                at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2293)

                at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:462)

                at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208) [hibernate-core-3.3.2.GA.jar:]

                at org.hibernate.loader.Loader.getResultSet(Loader.java:1812) [hibernate-core-3.3.2.GA.jar:]

                at org.hibernate.loader.Loader.doQuery(Loader.java:697) [hibernate-core-3.3.2.GA.jar:]

                at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259) [hibernate-core-3.3.2.GA.jar:]

                at org.hibernate.loader.Loader.doList(Loader.java:2232) [hibernate-core-3.3.2.GA.jar:]

                ... 26 more

       

       

      19:25:46,650 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/jbpm-human-task-war]] (MSC service thread 1-1) Servlet /jbpm-human-task-war threw load() exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'jbpm5.task' doesn't exist

                at sun.reflect.GeneratedConstructorAccessor17.newInstance(Unknown Source) [:1.6.0_33]

                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) [:1.6.0_33]

                at java.lang.reflect.Constructor.newInstance(Constructor.java:513) [:1.6.0_33]

                at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)

                at com.mysql.jdbc.Util.getInstance(Util.java:386)

                at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)

                at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3609)

                at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3541)

                at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2002)

                at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2163)

                at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2624)

                at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2127)

                at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2293)

                at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:462)

                at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208) [hibernate-core-3.3.2.GA.jar:]

                at org.hibernate.loader.Loader.getResultSet(Loader.java:1812) [hibernate-core-3.3.2.GA.jar:]

                at org.hibernate.loader.Loader.doQuery(Loader.java:697) [hibernate-core-3.3.2.GA.jar:]

                at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259) [hibernate-core-3.3.2.GA.jar:]

                at org.hibernate.loader.Loader.doList(Loader.java:2232) [hibernate-core-3.3.2.GA.jar:]

                at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2129) [hibernate-core-3.3.2.GA.jar:]

                at org.hibernate.loader.Loader.list(Loader.java:2124) [hibernate-core-3.3.2.GA.jar:]

                at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401) [hibernate-core-3.3.2.GA.jar:]

                at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363) [hibernate-core-3.3.2.GA.jar:]

                at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196) [hibernate-core-3.3.2.GA.jar:]

                at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1149) [hibernate-core-3.3.2.GA.jar:]

                at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102) [hibernate-core-3.3.2.GA.jar:]

                at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:67) [hibernate-entitymanager-3.4.0.GA.jar:]

                at org.jbpm.task.service.persistence.TaskPersistenceManager.getUnescalatedDeadlinesList(TaskPersistenceManager.java:174) [jbpm-human-task-core-5.3.0.Final.jar:]

                at org.jbpm.task.service.persistence.TaskPersistenceManager.getUnescalatedDeadlines(TaskPersistenceManager.java:146) [jbpm-human-task-core-5.3.0.Final.jar:]

                at org.jbpm.task.service.TaskServiceSession.scheduleUnescalatedDeadlines(TaskServiceSession.java:231) [jbpm-human-task-core-5.3.0.Final.jar:]

                at org.jbpm.task.service.TaskService.initialize(TaskService.java:116) [jbpm-human-task-core-5.3.0.Final.jar:]

                at org.jbpm.task.service.TaskService.initialize(TaskService.java:101) [jbpm-human-task-core-5.3.0.Final.jar:]

                at org.jbpm.task.service.TaskService.<init>(TaskService.java:79) [jbpm-human-task-core-5.3.0.Final.jar:]

                at org.jbpm.task.servlet.HumanTaskServiceServlet.init(HumanTaskServiceServlet.java:127) [classes:]

                at javax.servlet.GenericServlet.init(GenericServlet.java:242) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

                at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1102) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3631) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at org.apache.catalina.core.StandardContext.start(StandardContext.java:3844) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)

                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_33]

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_33]

                at java.lang.Thread.run(Thread.java:680) [:1.6.0_33]

       

       

      19:25:46,744 INFO  [org.jboss.web] (MSC service thread 1-1) registering web context: /jbpm-human-task-war{code}

       

        • 2. Re: Error - Table 'jbpm5.task' doesn't exist after trying to set mysql db
          Shamal Karunarathne Newbie

          As mentioned in the guide, I changed 3 files.

           

          Here's my db/persistence.xml

           

          {code}

          Shamals-MacBook-Air:jbpm-installer shamalk$ cat db/persistence.xml

           

           

          <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

           

           

          <persistence version="1.0"

           

           

                       xsi:schemaLocation="http://java.sun.com/xml/ns/persistence

           

           

                                           http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd

           

           

                                           http://java.sun.com/xml/ns/persistence/orm

           

           

                                           http://java.sun.com/xml/ns/persistence/orm_1_0.xsd"

           

           

                       xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"

           

           

                       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

           

           

                       xmlns="http://java.sun.com/xml/ns/persistence">

           

           

           

           

           

           

            <persistence-unit name="org.jbpm.persistence.jpa" transaction-type="JTA">

           

           

              <provider>org.hibernate.ejb.HibernatePersistence</provider>

           

           

              <jta-data-source>java:jboss/datasources/jbpmDS</jta-data-source>      

           

           

              <mapping-file>META-INF/JBPMorm.xml</mapping-file>

           

           

              <mapping-file>META-INF/ProcessInstanceInfo.hbm.xml</mapping-file>

           

           

           

           

           

           

              <class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>

           

           

              <class>org.drools.persistence.info.SessionInfo</class>

           

           

              <class>org.drools.persistence.info.WorkItemInfo</class>

           

           

           

           

           

           

              <class>org.jbpm.process.audit.ProcessInstanceLog</class>

           

           

              <class>org.jbpm.process.audit.NodeInstanceLog</class>

           

           

              <class>org.jbpm.process.audit.VariableInstanceLog</class>

           

           

           

           

           

           

              <properties>

           

           

                <!-- <property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/> -->

           

           

                <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>

           

           

                <property name="hibernate.max_fetch_depth" value="3"/>

           

           

                <!-- hbm2ddl.auto MUST BE update! The console will otherwise overwrite the schema with each new thread -->

           

           

                <property name="hibernate.hbm2ddl.auto" value="update" />

           

           

                <property name="hibernate.show_sql" value="false" />

           

           

           

           

           

           

                <!-- for AS7 -->

           

           

                <property name="hibernate.transaction.manager_lookup_class" value="org.jbpm.integration.console.JBPMTransactionManager" />

           

           

                <!-- for AS5 -->

           

           

                <!-- <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup" /> -->

           

           

              </properties>       

           

           

            </persistence-unit>

           

           

           

           

           

          </persistence>

           

           

           

          {code}

           

           

          Here's my task-service/resources/META-INF/persistence.xml

          {code}

          Shamals-MacBook-Air:jbpm-installer shamalk$ cat task-service/resources/META-INF/persistence.xml

          <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

          <persistence version="1.0"

                       xsi:schemaLocation="http://java.sun.com/xml/ns/persistence

                                           http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd

                                           http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd"

                       xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"

                       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                       xmlns="http://java.sun.com/xml/ns/persistence">

            <persistence-unit name="org.jbpm.task">

              <provider>org.hibernate.ejb.HibernatePersistence</provider>

              <mapping-file>META-INF/Taskorm.xml</mapping-file>

              <class>org.jbpm.task.Attachment</class>

              <class>org.jbpm.task.Content</class>

              <class>org.jbpm.task.BooleanExpression</class>

              <class>org.jbpm.task.Comment</class>

              <class>org.jbpm.task.Deadline</class>

              <class>org.jbpm.task.Comment</class>

              <class>org.jbpm.task.Deadline</class>

              <class>org.jbpm.task.Delegation</class>

              <class>org.jbpm.task.Escalation</class>

              <class>org.jbpm.task.Group</class>

              <class>org.jbpm.task.I18NText</class>

              <class>org.jbpm.task.Notification</class>

              <class>org.jbpm.task.EmailNotification</class>

              <class>org.jbpm.task.EmailNotificationHeader</class>

              <class>org.jbpm.task.PeopleAssignments</class>

              <class>org.jbpm.task.Reassignment</class>

              <class>org.jbpm.task.Status</class>

              <class>org.jbpm.task.Task</class>

              <class>org.jbpm.task.TaskData</class>

              <class>org.jbpm.task.SubTasksStrategy</class>

              <class>org.jbpm.task.OnParentAbortAllSubTasksEndStrategy</class>

              <class>org.jbpm.task.OnAllSubTasksEndParentEndStrategy</class>

              <class>org.jbpm.task.User</class>

              <properties>

                <!--<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>

                <property name="hibernate.connection.driver_class" value="org.h2.Driver"/>

                <property name="hibernate.connection.url" value="jdbc:h2:tcp://localhost/runtime/task" />

                <property name="hibernate.connection.username" value="sa"/>

                <property name="hibernate.connection.password" value=""/> -->

                <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>

                <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/>

                <property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/task" />

                <property name="hibernate.connection.username" value="task"/>

                <property name="hibernate.connection.password" value="task"/>

                <property name="hibernate.connection.autocommit" value="false" />

                <property name="hibernate.max_fetch_depth" value="3"/>

                <property name="hibernate.hbm2ddl.auto" value="create" />

                <property name="hibernate.show_sql" value="false" />

              </properties>

            </persistence-unit>

          </persistence>

          Shamals-MacBook-Air:jbpm-installer shamalk$ {code}

           

          And here's my standalone.xml

           

          {code}

          Shamals-MacBook-Air:jbpm-installer shamalk$ cat standalone.xml

           

           

          <!--

           

           

            ~ JBoss, Home of Professional Open Source.

           

           

            ~ Copyright 2011, Red Hat, Inc., and individual contributors

           

           

            ~ as indicated by the @author tags. See the copyright.txt file in the

           

           

            ~ distribution for a full listing of individual contributors.

           

           

            ~

           

           

            ~ This is free software; you can redistribute it and/or modify it

           

           

            ~ under the terms of the GNU Lesser General Public License as

           

           

            ~ published by the Free Software Foundation; either version 2.1 of

           

           

            ~ the License, or (at your option) any later version.

           

           

            ~

           

           

            ~ This software is distributed in the hope that it will be useful,

           

           

            ~ but WITHOUT ANY WARRANTY; without even the implied warranty of

           

           

            ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU

           

           

            ~ Lesser General Public License for more details.

           

           

            ~

           

           

            ~ You should have received a copy of the GNU Lesser General Public

           

           

            ~ License along with this software; if not, write to the Free

           

           

            ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA

           

           

            ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.

           

           

            -->

           

           

           

           

           

           

          <server xmlns="urn:jboss:domain:1.0">

           

           

           

           

           

           

              <extensions>

           

           

                  <extension module="org.jboss.as.clustering.infinispan"/>

           

           

                  <extension module="org.jboss.as.connector"/>

           

           

                  <extension module="org.jboss.as.deployment-scanner"/>

           

           

                  <extension module="org.jboss.as.ee"/>

           

           

                  <extension module="org.jboss.as.ejb3"/>

           

           

                  <extension module="org.jboss.as.jaxrs"/>

           

           

                  <extension module="org.jboss.as.jmx"/>

           

           

                  <!--extension module="org.jboss.as.jpa"/-->

           

           

                  <extension module="org.jboss.as.logging"/>

           

           

                  <extension module="org.jboss.as.naming"/>

           

           

                  <extension module="org.jboss.as.osgi"/>

           

           

                  <extension module="org.jboss.as.pojo"/>

           

           

                  <extension module="org.jboss.as.remoting"/>

           

           

                  <extension module="org.jboss.as.sar"/>

           

           

                  <extension module="org.jboss.as.security"/>

           

           

                  <extension module="org.jboss.as.threads"/>

           

           

                  <extension module="org.jboss.as.transactions"/>

           

           

                  <extension module="org.jboss.as.web" />

           

           

                  <extension module="org.jboss.as.weld" />

           

           

              </extensions>

           

           

           

           

           

           

              <management>

           

           

                        <security-realms>

           

           

                                  <security-realm name="PropertiesMgmtSecurityRealm">

           

           

                                            <authentication>

           

           

                                                      <properties path="mgmt-users.properties" relative-to="jboss.server.config.dir" />

           

           

                                            </authentication>

           

           

                                  </security-realm>

           

           

                        </security-realms>

           

           

                  <management-interfaces>

           

           

                     <native-interface interface="management" port="9999" />

           

           

                     <http-interface interface="management" port="9990"/>

           

           

                  </management-interfaces>

           

           

              </management>

           

           

           

           

           

           

              <profile>

           

           

                  <subsystem xmlns="urn:jboss:domain:logging:1.1">

           

           

                      <console-handler name="CONSOLE">

           

           

                          <level name="INFO"/>

           

           

                          <formatter>

           

           

                              <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>

           

           

                          </formatter>

           

           

                      </console-handler>

           

           

           

           

           

           

                      <periodic-rotating-file-handler name="FILE">

           

           

                          <level name="INFO"/>

           

           

                          <formatter>

           

           

                              <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>

           

           

                          </formatter>

           

           

                          <file relative-to="jboss.server.log.dir" path="server.log"/>

           

           

                          <suffix value=".yyyy-MM-dd"/>

           

           

                      </periodic-rotating-file-handler>

           

           

           

           

           

           

                      <logger category="org.jboss.modules">

           

           

                          <level name="INFO"/>

           

           

                      </logger>

           

           

                      <logger category="org.jboss.vfs.util">

           

           

                          <level name="INFO"/>

           

           

                      </logger>

           

           

                      <logger category="org.jboss.weld">

           

           

                          <level name="INFO"/>

           

           

                      </logger>

           

           

           

           

           

                      <logger category="com.arjuna">

           

           

                          <level name="WARN"/>

           

           

                      </logger>

           

           

                      <logger category="org.apache.tomcat.util.modeler">

           

           

                          <level name="WARN"/>

           

           

                      </logger>

           

           

                      <logger category="sun.rmi">

           

           

                          <level name="WARN"/>

           

           

                      </logger>

           

           

           

           

           

           

                      <root-logger>

           

           

                          <level name="INFO"/>

           

           

                          <handlers>

           

           

                              <handler name="CONSOLE"/>

           

           

                              <handler name="FILE"/>

           

           

                          </handlers>

           

           

                      </root-logger>

           

           

                  </subsystem>

           

           

                  <subsystem xmlns="urn:jboss:domain:datasources:1.0">

           

           

                      <datasources>

           

           

                          <datasource jndi-name="java:jboss/datasources/jbpmDS" pool-name="H2DS" enabled="true" jta="true" use-java-context="true" use-ccm="true">

           

           

                              <!-- <connection-url>jdbc:h2:tcp://localhost/runtime/jbpm</connection-url> -->

           

           

                              <connection-url>jdbc:mysql://localhost:3306/jbpm5</connection-url>

           

           

                              <driver>mysql</driver>

           

           

                              <pool>

           

           

                                  <min-pool-size>1</min-pool-size>

           

           

                                  <max-pool-size>4</max-pool-size>

           

           

                                  <prefill>false</prefill>

           

           

                                  <use-strict-min>false</use-strict-min>

           

           

                                  <flush-strategy>FailingConnectionOnly</flush-strategy>

           

           

                              </pool>

           

           

                              <security>

           

           

                                 <user-name>jbpm5</user-name>

           

           

                                 <password>jbpm5</password>

           

           

                              </security>

           

           

                              <validation>

           

           

                                 <check-valid-connection-sql>SELECT 1</check-valid-connection-sql>

           

           

                                 <validate-on-match>false</validate-on-match>

           

           

                                 <background-validation>false</background-validation>

           

           

                              </validation>

           

           

                          </datasource>

           

           

                          <drivers>

           

           

                              <!-- <driver name="h2" module="com.h2database.h2"> -->

           

           

                              <driver name="mysql" module="com.mysql">

           

           

                                  <!-- <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class> -->

           

           

                                  <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>

           

           

                              </driver>

           

           

                          </drivers>

           

           

                      </datasources>

           

           

                  </subsystem>

           

           

                  <subsystem xmlns="urn:jboss:domain:deployment-scanner:1.0">

           

           

                      <deployment-scanner scan-interval="5000" deployment-timeout="600" relative-to="jboss.server.base.dir" path="deployments" />

           

           

                  </subsystem>

           

           

                  <subsystem xmlns="urn:jboss:domain:ee:1.0" />

           

           

                  <subsystem xmlns="urn:jboss:domain:ejb3:1.1" lite="true">

           

           

                      <!-- EJB3 pools -->

           

           

                      <pools>

           

           

                          <bean-instance-pools>

           

           

                              <strict-max-pool name="slsb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5"

           

           

                                               instance-acquisition-timeout-unit="MINUTES"/>

           

           

                          </bean-instance-pools>

           

           

                      </pools>

           

           

           

           

           

           

                      <!-- Session bean configurations -->

           

           

                      <session-bean>

           

           

                          <stateless>

           

           

                              <bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>

           

           

                          </stateless>

           

           

                      </session-bean>

           

           

           

           

           

           

                  </subsystem>

           

           

                  <subsystem xmlns="urn:jboss:domain:infinispan:1.0" default-cache-container="hibernate">

           

           

                      <cache-container name="hibernate" default-cache="local-query">

           

           

                          <local-cache name="entity">

           

           

                              <eviction strategy="LRU" max-entries="10000"/>

           

           

                              <expiration max-idle="100000"/>

           

           

                          </local-cache>

           

           

                          <local-cache name="local-query">

           

           

                              <eviction strategy="LRU" max-entries="10000"/>

           

           

                              <expiration max-idle="100000"/>

           

           

                          </local-cache>

           

           

                          <local-cache name="timestamps">

           

           

                              <eviction strategy="NONE"/>

           

           

                          </local-cache>

           

           

                      </cache-container>

           

           

                  </subsystem>

           

           

                  <subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/>

           

           

                  <subsystem xmlns="urn:jboss:domain:jca:1.0">

           

           

                      <archive-validation enabled="false" />

           

           

                      <bean-validation enabled="false" />

           

           

                      <default-workmanager>

           

           

                          <short-running-threads blocking="true">

           

           

                                  <core-threads count="10" per-cpu="20"/>

           

           

                                  <queue-length count="10" per-cpu="20"/>

           

           

                                  <max-threads count="10" per-cpu="20"/>

           

           

                                  <keepalive-time time="10" unit="seconds"/>

           

           

                          </short-running-threads>

           

           

                          <long-running-threads blocking="true">

           

           

                                  <core-threads count="10" per-cpu="20"/>

           

           

                                  <queue-length count="10" per-cpu="20"/>

           

           

                                  <max-threads count="10" per-cpu="20"/>

           

           

                                  <keepalive-time time="10" unit="seconds"/>

           

           

                          </long-running-threads>

           

           

                      </default-workmanager>

           

           

                  </subsystem>

           

           

                  <subsystem xmlns="urn:jboss:domain:jmx:1.0">

           

           

                      <jmx-connector registry-binding="jmx-connector-registry" server-binding="jmx-connector-server" />

           

           

                  </subsystem>

           

           

                  <!--subsystem xmlns="urn:jboss:domain:jpa:1.0">

           

           

                      <jpa default-datasource=""/>

           

           

                  </subsystem-->

           

           

                  <subsystem xmlns="urn:jboss:domain:naming:1.0" />

           

           

                  <subsystem xmlns="urn:jboss:domain:pojo:1.0" />

           

           

                  <subsystem xmlns="urn:jboss:domain:osgi:1.0" activation="lazy">

           

           

                      <configuration pid="org.apache.felix.webconsole.internal.servlet.OsgiManager">

           

           

                          <property name="manager.root">jboss-osgi</property>

           

           

                      </configuration>

           

           

                      <properties>

           

           

                          <!--

           

           

                              A comma seperated list of module identifiers. Each system module

           

           

                              is added as a dependency to the OSGi framework module. The packages

           

           

                              from these system modules can be made visible as framework system packages.

           

           

                              http://www.osgi.org/javadoc/r4v42/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES_EXTRA

           

           

                          -->

           

           

                          <property name="org.jboss.osgi.system.modules">

           

           

                          org.apache.commons.logging,

           

           

                          org.apache.log4j,

           

           

                          org.jboss.as.osgi,

           

           

                          org.slf4j,

           

           

                          </property>

           

           

                          <!--

           

           

                              Framework environment property identifying extra packages which the system bundle

           

           

                              must export from the current execution environment

           

           

                          -->

           

           

                          <property name="org.osgi.framework.system.packages.extra">

           

           

                          org.apache.commons.logging;version=1.1.1,

           

           

                          org.apache.log4j;version=1.2,

           

           

                          org.jboss.as.osgi.service;version=7.0,

           

           

                          org.jboss.osgi.deployment.interceptor;version=1.0,

           

           

                          org.jboss.osgi.spi.capability;version=1.0,

           

           

                          org.jboss.osgi.spi.util;version=1.0,

           

           

                          org.jboss.osgi.testing;version=1.0,

           

           

                          org.jboss.osgi.vfs;version=1.0,

           

           

                          org.slf4j;version=1.5.10,

           

           

                          </property>

           

           

                          <!-- Specifies the beginning start level of the framework -->

           

           

                          <property name="org.osgi.framework.startlevel.beginning">1</property>

           

           

                      </properties>

           

           

                      <modules>

           

           

                          <!-- modules registered with the OSGi layer on startup -->

           

           

                          <module identifier="javaee.api"/>

           

           

                          <module identifier="org.jboss.logging"/>

           

           

                          <!-- bundles installed on startup -->

           

           

                          <module identifier="org.apache.aries.util"/>

           

           

                          <module identifier="org.jboss.osgi.webconsole"/>

           

           

                          <module identifier="org.osgi.compendium"/>

           

           

                          <!-- bundles started in startlevel 1 -->

           

           

                          <module identifier="org.apache.felix.log" startlevel="1"/>

           

           

                          <module identifier="org.jboss.osgi.logging" startlevel="1"/>

           

           

                          <module identifier="org.apache.felix.configadmin" startlevel="1"/>

           

           

                          <module identifier="org.jboss.as.osgi.configadmin" startlevel="1"/>

           

           

                          <!-- bundles started in startlevel 2 -->

           

           

                          <module identifier="org.apache.aries.jmx" startlevel="2"/>

           

           

                          <module identifier="org.apache.felix.eventadmin" startlevel="2"/>

           

           

                          <module identifier="org.apache.felix.metatype" startlevel="2"/>

           

           

                          <module identifier="org.apache.felix.scr" startlevel="2"/>

           

           

                          <module identifier="org.apache.felix.webconsole" startlevel="2"/>

           

           

                          <module identifier="org.jboss.osgi.jmx" startlevel="2"/>

           

           

                          <module identifier="org.jboss.osgi.http" startlevel="2"/>

           

           

                          <!-- bundles started in startlevel 3 -->

           

           

                          <module identifier="org.jboss.osgi.blueprint" startlevel="3"/>

           

           

                          <module identifier="org.jboss.osgi.webapp" startlevel="3"/>

           

           

                          <module identifier="org.jboss.osgi.xerces" startlevel="3"/>

           

           

                      </modules>

           

           

                  </subsystem>

           

           

                  <subsystem xmlns="urn:jboss:domain:remoting:1.0"/>

           

           

                  <subsystem xmlns="urn:jboss:domain:resource-adapters:1.0" />

           

           

                  <subsystem xmlns="urn:jboss:domain:sar:1.0"/>

           

           

                  <subsystem xmlns="urn:jboss:domain:security:1.0">

           

           

                      <security-domains>

           

           

                          <security-domain name="other" cache-type="default">

           

           

                              <authentication>

           

           

                                  <login-module code="Disabled" flag="required"/>

           

           

                              </authentication>

           

           

                          </security-domain>

           

           

                          <security-domain name="drools-guvnor" cache-type="default">

           

           

                              <authentication>

           

           

                                  <login-module code="UsersRoles" flag="required">

           

           

                                      <module-option name="usersProperties" value="${jboss.server.config.dir}/users.properties"/>

           

           

                                      <module-option name="rolesProperties" value="${jboss.server.config.dir}/roles.properties"/>

           

           

                                  </login-module>

           

           

                              </authentication>

           

           

                          </security-domain>

           

           

                          <security-domain name="jbpm-console" cache-type="default">

           

           

                              <authentication>

           

           

                                  <login-module code="UsersRoles" flag="required">

           

           

                                      <module-option name="usersProperties" value="${jboss.server.config.dir}/users.properties"/>

           

           

                                      <module-option name="rolesProperties" value="${jboss.server.config.dir}/roles.properties"/>

           

           

                                  </login-module>

           

           

                              </authentication>

           

           

                          </security-domain>

           

           

                          <security-domain name="jbpm-form-builder" cache-type="default">

           

           

                              <authentication>

           

           

                                  <login-module code="UsersRoles" flag="required">

           

           

                                      <module-option name="usersProperties" value="${jboss.server.config.dir}/users.properties"/>

           

           

                                      <module-option name="rolesProperties" value="${jboss.server.config.dir}/roles.properties"/>

           

           

                                  </login-module>

           

           

                              </authentication>

           

           

                          </security-domain>

           

           

                      </security-domains>

           

           

                  </subsystem>

           

           

                  <subsystem xmlns="urn:jboss:domain:threads:1.0"/>

           

           

                  <subsystem xmlns="urn:jboss:domain:transactions:1.0">

           

           

                      <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>

           

           

                      <core-environment>

           

           

                          <process-id>

           

           

                              <uuid />

           

           

                          </process-id>

           

           

                      </core-environment>

           

           

                      <coordinator-environment default-timeout="300"/>

           

           

                  </subsystem>

           

           

                  <subsystem xmlns="urn:jboss:domain:web:1.0" default-virtual-server="default-host">

           

           

                      <connector name="http" scheme="http" protocol="HTTP/1.1" socket-binding="http"/>

           

           

                      <virtual-server name="default-host" enable-welcome-root="true">

           

           

                         <alias name="localhost" />

           

           

                         <alias name="example.com" />

           

           

                      </virtual-server>

           

           

                  </subsystem>

           

           

                  <subsystem xmlns="urn:jboss:domain:weld:1.0" />

           

           

              </profile>

           

           

           

           

           

           

              <interfaces>

           

           

                  <interface name="management">

           

           

                      <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>

           

           

                  </interface>

           

           

                  <interface name="public">

           

           

                     <inet-address value="${jboss.bind.address:127.0.0.1}"/>

           

           

                  </interface>

           

           

              </interfaces>

           

           

           

           

           

           

              <socket-binding-group name="standard-sockets" default-interface="public">

           

           

                  <socket-binding name="http" port="8080"/>

           

           

                  <socket-binding name="https" port="8443"/>

           

           

                  <socket-binding name="jmx-connector-registry" interface="management" port="1090"/>

           

           

                  <socket-binding name="jmx-connector-server" interface="management" port="1091"/>

           

           

                  <socket-binding name="jndi" port="1099"/>

           

           

                  <socket-binding name="osgi-http" interface="management" port="8090"/>

           

           

                  <socket-binding name="remoting" port="4447"/>

           

           

                  <socket-binding name="txn-recovery-environment" port="4712"/>

           

           

                  <socket-binding name="txn-status-manager" port="4713"/>

           

           

              </socket-binding-group>

           

           

           

           

           

           

          </server>

           

           

          Shamals-MacBook-Air:jbpm-installer shamalk$

           

           

          {code}

           

          • 3. Re: Error - Table 'jbpm5.task' doesn't exist after trying to set mysql db
            hbarthel Newbie

            1st, but this is not the problem: the "task-service/resources/META-INF/persistence.xml" contains some duplicate classes: <class>org.jbpm.task.Comment</class> and <class>org.jbpm.task.Deadline</class>

            This is still in 5.4-SNAPSHOT the case... Maybe one of the developers wants to fix it one day.

             

            2nd, You'll see the problem if you look at "task-service/resources/war/persistence.xml"

            Per default the datasource "java:jboss/datasources/jbpmDS" (pointing to jbpm5 if you configured it according to the docu) is used which is wrong, you need to change this file that it points to your "task" schema.

            That's why I added another datasource in JBoss:

                             <datasource jndi-name="java:jboss/datasources/taskDS" pool-name="H2DS" enabled="true" use-java-context="true">

                                <connection-url>jdbc:mysql://localhost:3306/task</connection-url>

                                <driver>mysql</driver>

                                <pool></pool>

                                <security>

                                   <user-name>task</user-name>

                                   <password>task</password>

                                </security>

                            </datasource>

            ... and use this one in the "persistence.xml" of the task server. If you didn't change it upfront you have a mixture of jbpm5 and task DDL in your jbpm5 schema. If it's the case drop all tables in jbpm5 schema, then run "ant clean.demo", "ant install.demo.db" and "ant start.demo.db"

             

            Maybe you also wanna change the "persistence.xml" in "jbpm-human-task-war-5.3.0.Final.war".

             

            Why are there so many "persistence.xml" files? I don't know, there's also much duplicate code in jBPM, Sonar says 11.2%

            • 4. Re: Error - Table 'jbpm5.task' doesn't exist after trying to set mysql db
              Ken Luke Newbie

              Heiko, your suggestions worked great. Thanks.