10 Replies Latest reply on Oct 30, 2007 12:02 PM by vtysh

    tomcat and mysql integration

    vsevel

      Hello,

      Previously I tested successfully jBPM with the websale example.
      Now I want to test it with tomcat 6 and mySQL 5.
      I followed the instructions of: http://wiki.jboss.org/wiki/Wiki.jsp?page=JbpmOnTomcat

      I deployed the console. However I have the following error:
      Could not find datasource: java:/JbpmDS
      javax.naming.NameNotFoundException: Le Nom JbpmDS n'est pas lié à ce Contexte
      at org.apache.naming.NamingContext.lookup(NamingContext.java:770) .....

      I also read http://docs.jboss.com/jbpm/v3/userguide/deployment.html

      Please help.
      Val

        • 1. Re: tomcat and mysql integration
          vtysh

          Your problem is in hibernate configuration

          • 2. Re: tomcat and mysql integration
            vsevel

            What else needs to be done?

            I did the modification in hibernate.cfg.xml and created the file jbpm-console.xml in /$CATALINA_HOME/conf/Catalina/localhost like it was specified in the tutorial

            I also tried to add in web.xml
            <resource-ref>
            jBPM Database
            <res-ref-name>jdbc/JbpmDS</res-ref-name>
            <res-ref-type>javax.sql.DataSource</res-ref-type>
            <res-auth>Container</res-auth>
            </resource-ref>

            and tried to add in jbpm-console.xml:



            I also tried to put the <Resource name="jdbc/JbpmDS" inside META-INF/context.xml with a context tag

            Nothing is working.
            Could you tell me the right procedure to configure hibernate?
            It is the first time I am using hibernate.
            I also read their faqs.

            Thanks
            Val

            • 3. Re: tomcat and mysql integration
              vsevel

              Oops I was saying that I tried to add the following piece of code:

              • 4. Re: tomcat and mysql integration
                vsevel

                 

                <Resource name="jdbc/JbpmDS" auth="Container"
                 type="javax.sql.DataSource" username="jbossjbpm" password="jbossjbpm"
                 driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/jbpm32"
                 maxActive="8" maxIdle="4"/>


                • 5. Re: tomcat and mysql integration
                  vtysh

                  I don't know how to configure datasources in tomcat, but you can specify db connection parameters dirrectly in hibernate.cfg.xml. Find strings hibernate.connection.driver_class,hibernate.connection.url and so forth...

                  • 6. Re: tomcat and mysql integration
                    vsevel

                    I already did it in jbpm-console/WEB-INF/classes/hibernate.cfg.xml like it was suggested in the tutorial.

                    <?xml version='1.0' encoding='utf-8'?>
                    
                    <!DOCTYPE hibernate-configuration PUBLIC
                     "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
                     "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
                    
                    <hibernate-configuration>
                     <session-factory>
                    
                     <!-- JDBC connection properties (begin) -->
                    
                     <!-- HSQL configuration
                     <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
                     <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
                     <property name="hibernate.connection.url">jdbc:hsqldb:mem:jbpm</property>
                     <property name="hibernate.connection.username">sa</property>
                     <property name="hibernate.connection.password"></property>
                     -->
                    
                     <!-- MYSQL configuration -->
                     <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
                     <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
                     <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jbpm32</property>
                     <property name="hibernate.connection.username">jbossjbpm</property>
                     <property name="hibernate.connection.password">jbossjbpm</property>
                    
                     <!-- JDBC connection properties (end) -->
                    
                    
                     <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
                    
                     <!-- DataSource properties (begin) -->
                     <property name="hibernate.connection.datasource">java:/JbpmDS</property>
                     <!-- DataSource properties (end) -->
                    
                     <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>
                    
                    
                     <!-- JTA transaction properties (begin) ===
                     <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
                     <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
                     ==== JTA transaction properties (end) -->
                    
                     <!-- CMT transaction properties (begin) ===
                     <property name="hibernate.transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</property>
                     <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
                     ==== CMT transaction properties (end) -->
                    
                     <!-- logging properties (begin) ===
                     <property name="hibernate.show_sql">true</property>
                     <property name="hibernate.format_sql">true</property>
                     <property name="hibernate.use_sql_comments">true</property>
                     ==== logging properties (end) -->
                    
                     <!-- ############################################ -->
                     <!-- # mapping files with external dependencies # -->
                     <!-- ############################################ -->
                    
                     <!-- following mapping file has a dependendy on -->
                     <!-- 'bsh-{version}.jar'. -->
                     <!-- uncomment this if you don't have bsh on your -->
                     <!-- classpath. you won't be able to use the -->
                     <!-- script element in process definition files -->
                     <mapping resource="org/jbpm/graph/action/Script.hbm.xml"/>
                    
                     <!-- following mapping files have a dependendy on -->
                     <!-- 'jbpm-identity.jar', mapping files -->
                     <!-- of the pluggable jbpm identity component. -->
                     <!-- Uncomment the following 3 lines if you -->
                     <!-- want to use the jBPM identity mgmgt -->
                     <!-- component. -->
                     <!-- identity mappings (begin) -->
                     <mapping resource="org/jbpm/identity/User.hbm.xml"/>
                     <mapping resource="org/jbpm/identity/Group.hbm.xml"/>
                     <mapping resource="org/jbpm/identity/Membership.hbm.xml"/>
                     <!-- identity mappings (end) -->
                    
                     <!-- following mapping files have a dependendy on -->
                     <!-- the JCR API -->
                     <!-- jcr mappings (begin) ===
                     <mapping resource="org/jbpm/context/exe/variableinstance/JcrNodeInstance.hbm.xml"/>
                     ==== jcr mappings (end) -->
                    
                    
                     <!-- ###################### -->
                     <!-- # jbpm mapping files # -->
                     <!-- ###################### -->
                    
                     <!-- hql queries and type defs -->
                     <mapping resource="org/jbpm/db/hibernate.queries.hbm.xml" />
                    
                     <!-- graph.action mapping files -->
                     <mapping resource="org/jbpm/graph/action/MailAction.hbm.xml"/>
                    
                     <!-- graph.def mapping files -->
                     <mapping resource="org/jbpm/graph/def/ProcessDefinition.hbm.xml"/>
                     <mapping resource="org/jbpm/graph/def/Node.hbm.xml"/>
                     <mapping resource="org/jbpm/graph/def/Transition.hbm.xml"/>
                     <mapping resource="org/jbpm/graph/def/Event.hbm.xml"/>
                     <mapping resource="org/jbpm/graph/def/Action.hbm.xml"/>
                     <mapping resource="org/jbpm/graph/def/SuperState.hbm.xml"/>
                     <mapping resource="org/jbpm/graph/def/ExceptionHandler.hbm.xml"/>
                     <mapping resource="org/jbpm/instantiation/Delegation.hbm.xml"/>
                    
                     <!-- graph.node mapping files -->
                     <mapping resource="org/jbpm/graph/node/StartState.hbm.xml"/>
                     <mapping resource="org/jbpm/graph/node/EndState.hbm.xml"/>
                     <mapping resource="org/jbpm/graph/node/ProcessState.hbm.xml"/>
                     <mapping resource="org/jbpm/graph/node/Decision.hbm.xml"/>
                     <mapping resource="org/jbpm/graph/node/Fork.hbm.xml"/>
                     <mapping resource="org/jbpm/graph/node/Join.hbm.xml"/>
                     <mapping resource="org/jbpm/graph/node/MailNode.hbm.xml"/>
                     <mapping resource="org/jbpm/graph/node/State.hbm.xml"/>
                     <mapping resource="org/jbpm/graph/node/TaskNode.hbm.xml"/>
                    
                     <!-- context.def mapping files -->
                     <mapping resource="org/jbpm/context/def/ContextDefinition.hbm.xml"/>
                     <mapping resource="org/jbpm/context/def/VariableAccess.hbm.xml"/>
                    
                     <!-- taskmgmt.def mapping files -->
                     <mapping resource="org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml"/>
                     <mapping resource="org/jbpm/taskmgmt/def/Swimlane.hbm.xml"/>
                     <mapping resource="org/jbpm/taskmgmt/def/Task.hbm.xml"/>
                     <mapping resource="org/jbpm/taskmgmt/def/TaskController.hbm.xml"/>
                    
                     <!-- module.def mapping files -->
                     <mapping resource="org/jbpm/module/def/ModuleDefinition.hbm.xml"/>
                    
                     <!-- bytes mapping files -->
                     <mapping resource="org/jbpm/bytes/ByteArray.hbm.xml"/>
                    
                     <!-- file.def mapping files -->
                     <mapping resource="org/jbpm/file/def/FileDefinition.hbm.xml"/>
                    
                     <!-- scheduler.def mapping files -->
                     <mapping resource="org/jbpm/scheduler/def/CreateTimerAction.hbm.xml"/>
                     <mapping resource="org/jbpm/scheduler/def/CancelTimerAction.hbm.xml"/>
                    
                     <!-- graph.exe mapping files -->
                     <mapping resource="org/jbpm/graph/exe/Comment.hbm.xml"/>
                     <mapping resource="org/jbpm/graph/exe/ProcessInstance.hbm.xml"/>
                     <mapping resource="org/jbpm/graph/exe/Token.hbm.xml"/>
                     <mapping resource="org/jbpm/graph/exe/RuntimeAction.hbm.xml"/>
                    
                     <!-- module.exe mapping files -->
                     <mapping resource="org/jbpm/module/exe/ModuleInstance.hbm.xml"/>
                    
                     <!-- context.exe mapping files -->
                     <mapping resource="org/jbpm/context/exe/ContextInstance.hbm.xml"/>
                     <mapping resource="org/jbpm/context/exe/TokenVariableMap.hbm.xml"/>
                     <mapping resource="org/jbpm/context/exe/VariableInstance.hbm.xml"/>
                     <mapping resource="org/jbpm/context/exe/variableinstance/ByteArrayInstance.hbm.xml"/>
                     <mapping resource="org/jbpm/context/exe/variableinstance/DateInstance.hbm.xml"/>
                     <mapping resource="org/jbpm/context/exe/variableinstance/DoubleInstance.hbm.xml"/>
                     <mapping resource="org/jbpm/context/exe/variableinstance/HibernateLongInstance.hbm.xml"/>
                     <mapping resource="org/jbpm/context/exe/variableinstance/HibernateStringInstance.hbm.xml"/>
                     <mapping resource="org/jbpm/context/exe/variableinstance/LongInstance.hbm.xml"/>
                     <mapping resource="org/jbpm/context/exe/variableinstance/NullInstance.hbm.xml"/>
                     <mapping resource="org/jbpm/context/exe/variableinstance/StringInstance.hbm.xml"/>
                    
                     <!-- job mapping files -->
                     <mapping resource="org/jbpm/job/Job.hbm.xml"/>
                     <mapping resource="org/jbpm/job/Timer.hbm.xml"/>
                     <mapping resource="org/jbpm/job/ExecuteNodeJob.hbm.xml"/>
                     <mapping resource="org/jbpm/job/ExecuteActionJob.hbm.xml"/>
                    
                     <!-- taskmgmt.exe mapping files -->
                     <mapping resource="org/jbpm/taskmgmt/exe/TaskMgmtInstance.hbm.xml"/>
                     <mapping resource="org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml"/>
                     <mapping resource="org/jbpm/taskmgmt/exe/PooledActor.hbm.xml"/>
                     <mapping resource="org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml"/>
                    
                     <!-- logging mapping files -->
                     <mapping resource="org/jbpm/logging/log/ProcessLog.hbm.xml"/>
                     <mapping resource="org/jbpm/logging/log/MessageLog.hbm.xml"/>
                     <mapping resource="org/jbpm/logging/log/CompositeLog.hbm.xml"/>
                     <mapping resource="org/jbpm/graph/log/ActionLog.hbm.xml"/>
                     <mapping resource="org/jbpm/graph/log/NodeLog.hbm.xml"/>
                     <mapping resource="org/jbpm/graph/log/ProcessInstanceCreateLog.hbm.xml"/>
                     <mapping resource="org/jbpm/graph/log/ProcessInstanceEndLog.hbm.xml"/>
                     <mapping resource="org/jbpm/graph/log/ProcessStateLog.hbm.xml"/>
                     <mapping resource="org/jbpm/graph/log/SignalLog.hbm.xml"/>
                     <mapping resource="org/jbpm/graph/log/TokenCreateLog.hbm.xml"/>
                     <mapping resource="org/jbpm/graph/log/TokenEndLog.hbm.xml"/>
                     <mapping resource="org/jbpm/graph/log/TransitionLog.hbm.xml"/>
                     <mapping resource="org/jbpm/context/log/VariableLog.hbm.xml"/>
                     <mapping resource="org/jbpm/context/log/VariableCreateLog.hbm.xml"/>
                     <mapping resource="org/jbpm/context/log/VariableDeleteLog.hbm.xml"/>
                     <mapping resource="org/jbpm/context/log/VariableUpdateLog.hbm.xml"/>
                     <mapping resource="org/jbpm/context/log/variableinstance/ByteArrayUpdateLog.hbm.xml"/>
                     <mapping resource="org/jbpm/context/log/variableinstance/DateUpdateLog.hbm.xml"/>
                     <mapping resource="org/jbpm/context/log/variableinstance/DoubleUpdateLog.hbm.xml"/>
                     <mapping resource="org/jbpm/context/log/variableinstance/HibernateLongUpdateLog.hbm.xml"/>
                     <mapping resource="org/jbpm/context/log/variableinstance/HibernateStringUpdateLog.hbm.xml"/>
                     <mapping resource="org/jbpm/context/log/variableinstance/LongUpdateLog.hbm.xml"/>
                     <mapping resource="org/jbpm/context/log/variableinstance/StringUpdateLog.hbm.xml"/>
                     <mapping resource="org/jbpm/taskmgmt/log/TaskLog.hbm.xml"/>
                     <mapping resource="org/jbpm/taskmgmt/log/TaskCreateLog.hbm.xml"/>
                     <mapping resource="org/jbpm/taskmgmt/log/TaskAssignLog.hbm.xml"/>
                     <mapping resource="org/jbpm/taskmgmt/log/TaskEndLog.hbm.xml"/>
                     <mapping resource="org/jbpm/taskmgmt/log/SwimlaneLog.hbm.xml"/>
                     <mapping resource="org/jbpm/taskmgmt/log/SwimlaneCreateLog.hbm.xml"/>
                     <mapping resource="org/jbpm/taskmgmt/log/SwimlaneAssignLog.hbm.xml"/>
                    
                     </session-factory>
                    </hibernate-configuration>


                    • 7. Re: tomcat and mysql integration
                      vsevel

                      I do not have anymore the datasource problem.
                      I forgot to comment the datasource part of the hibernate file.

                      But now I have another problem:

                      INFO: connection properties: {user=jbossjbpm, password=****}
                      30 oct. 2007 14:30:19 org.hibernate.cfg.SettingsFactory buildSettings
                      ATTENTION: Could not obtain connection metadata
                      com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:

                      ** BEGIN NESTED EXCEPTION **

                      java.net.ConnectException
                      MESSAGE: Connection refused: connect

                      STACKTRACE:

                      java.net.ConnectException: Connection refused: connect
                      at java.net.PlainSocketImpl.socketConnect(Native Method)
                      at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
                      at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
                      at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
                      at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
                      at java.net.Socket.connect(Socket.java:518)
                      at java.net.Socket.connect(Socket.java:468)
                      at java.net.Socket.<init>(Socket.java:365)
                      at java.net.Socket.<init>(Socket.java:208)
                      at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:256)
                      at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:271)
                      at com.mysql.jdbc.Connection.createNewIO(Connection.java:2771)
                      at com.mysql.jdbc.Connection.<init>(Connection.java:1555)
                      at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
                      at java.sql.DriverManager.getConnection(DriverManager.java:582)
                      at java.sql.DriverManager.getConnection(DriverManager.java:154)
                      at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
                      at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:84)
                      at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
                      at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
                      at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:91)
                      at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:95)
                      at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:99)
                      at org.jbpm.persistence.db.DbPersistenceService.getJobSession(DbPersistenceService.java:359)
                      at org.jbpm.JbpmContext.getJobSession(JbpmContext.java:563)
                      at org.jbpm.job.executor.JobExecutorThread.acquireJobs(JobExecutorThread.java:112)
                      at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:58)


                      ** END NESTED EXCEPTION **



                      Last packet sent to the server was 0 ms ago.
                      at com.mysql.jdbc.Connection.createNewIO(Connection.java:2847)
                      at com.mysql.jdbc.Connection.<init>(Connection.java:1555)
                      at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
                      at java.sql.DriverManager.getConnection(DriverManager.java:582)
                      at java.sql.DriverManager.getConnection(DriverManager.java:154)
                      at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
                      at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:84)
                      at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
                      at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
                      at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:91)
                      at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:95)
                      at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:99)
                      at org.jbpm.persistence.db.DbPersistenceService.getJobSession(DbPersistenceService.java:359)
                      at org.jbpm.JbpmContext.getJobSession(JbpmContext.java:563)
                      at org.jbpm.job.executor.JobExecutorThread.acquireJobs(JobExecutorThread.java:112)
                      at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:58)
                      30 oct. 2007 14:30:19 org.hibernate.dialect.Dialect <init>
                      INFO: Using dialect: org.hibernate.dialect.MySQLInnoDBDialect
                      30 oct. 2007 14:30:19 org.hibernate.transaction.TransactionFactoryFactory buildTransactionFactory
                      INFO: Transaction strategy: org.hibernate.transaction.JDBCTransactionFactory
                      30 oct. 2007 14:30:19 org.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup
                      INFO: No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
                      30 oct. 2007 14:30:19 org.hibernate.cfg.SettingsFactory buildSettings
                      INFO: Automatic flush during beforeCompletion(): disabled
                      30 oct. 2007 14:30:19 org.hibernate.cfg.SettingsFactory buildSettings
                      INFO: Automatic session close at end of transaction: disabled
                      30 oct. 2007 14:30:19 org.hibernate.cfg.SettingsFactory buildSettings
                      INFO: Scrollable result sets: disabled
                      30 oct. 2007 14:30:19 org.hibernate.cfg.SettingsFactory buildSettings
                      INFO: JDBC3 getGeneratedKeys(): disabled
                      30 oct. 2007 14:30:19 org.hibernate.cfg.SettingsFactory buildSettings
                      INFO: Connection release mode: auto
                      30 oct. 2007 14:30:19 org.hibernate.cfg.SettingsFactory buildSettings
                      INFO: Maximum outer join fetch depth: 2
                      30 oct. 2007 14:30:19 org.hibernate.cfg.SettingsFactory buildSettings
                      INFO: Default batch fetch size: 1
                      30 oct. 2007 14:30:19 org.hibernate.cfg.SettingsFactory buildSettings
                      INFO: Generate SQL with comments: disabled
                      30 oct. 2007 14:30:19 org.hibernate.cfg.SettingsFactory buildSettings
                      INFO: Order SQL updates by primary key: disabled
                      30 oct. 2007 14:30:19 org.hibernate.cfg.SettingsFactory createQueryTranslatorFactory
                      INFO: Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
                      30 oct. 2007 14:30:19 org.hibernate.hql.ast.ASTQueryTranslatorFactory <init>
                      INFO: Using ASTQueryTranslatorFactory
                      30 oct. 2007 14:30:19 org.hibernate.cfg.SettingsFactory buildSettings
                      INFO: Query language substitutions: {}
                      30 oct. 2007 14:30:19 org.hibernate.cfg.SettingsFactory buildSettings
                      INFO: JPA-QL strict compliance: disabled
                      30 oct. 2007 14:30:19 org.hibernate.cfg.SettingsFactory buildSettings
                      INFO: Second-level cache: enabled
                      30 oct. 2007 14:30:19 org.hibernate.cfg.SettingsFactory buildSettings
                      INFO: Query cache: disabled
                      30 oct. 2007 14:30:19 org.hibernate.cfg.SettingsFactory createCacheProvider
                      INFO: Cache provider: org.hibernate.cache.HashtableCacheProvider
                      30 oct. 2007 14:30:19 org.hibernate.cfg.SettingsFactory buildSettings
                      INFO: Optimize cache for minimal puts: disabled
                      30 oct. 2007 14:30:19 org.hibernate.cfg.SettingsFactory buildSettings
                      INFO: Structured second-level cache entries: disabled
                      30 oct. 2007 14:30:19 org.hibernate.cfg.SettingsFactory buildSettings
                      INFO: Statistics: disabled
                      30 oct. 2007 14:30:19 org.hibernate.cfg.SettingsFactory buildSettings
                      INFO: Deleted entity synthetic identifier rollback: disabled
                      30 oct. 2007 14:30:19 org.hibernate.cfg.SettingsFactory buildSettings
                      INFO: Default entity-mode: pojo
                      30 oct. 2007 14:30:19 org.hibernate.cfg.SettingsFactory buildSettings
                      INFO: Named query checking : enabled
                      30 oct. 2007 14:30:19 org.hibernate.impl.SessionFactoryImpl <init>
                      INFO: building session factory
                      30 oct. 2007 14:30:20 org.hibernate.impl.SessionFactoryObjectFactory addInstance
                      INFO: Not binding factory to JNDI, no JNDI name configured
                      30 oct. 2007 14:30:22 org.hibernate.util.JDBCExceptionReporter logExceptions
                      ATTENTION: SQL Error: 0, SQLState: 08S01
                      30 oct. 2007 14:30:22 org.hibernate.util.JDBCExceptionReporter logExceptions
                      GRAVE: Communications link failure due to underlying exception:


                      • 8. Re: tomcat and mysql integration
                        vtysh

                        Error occurs somethere in the connection layer, maybe your mysql service is stopped or incorrectly configured. Seems that it is not a jbpm problem

                        • 9. Re: tomcat and mysql integration - Cannot login
                          vsevel

                          You are right the problem was due to the port.

                          Now I have:

                          INFO: building session factory
                          30 oct. 2007 15:13:12 org.hibernate.impl.SessionFactoryObjectFactory addInstance
                          INFO: Not binding factory to JNDI, no JNDI name configured
                          30 oct. 2007 15:14:23 com.sun.facelets.compiler.TagLibraryConfig loadImplicit


                          Previously I imported successfully mysql.identity.script.sql. ( I build the war from jbpm-jpdl-3.2.2)

                          When I am using the user "ernie" or "bert" (the users that are defined in the database), I got the follwing error:
                          Error 403 Ressource access has been forbidden
                          L'accès à la ressource demandée (L'accès à la ressource demandée a été interdit) a été interdit.

                          I did not see any error logged into catalina.2007-10-30.log
                          What configuration needs to be done?
                          I have the following in web.xml
                          <!--
                          This role list should be changed to include all the relevant roles for your
                          environment.
                          -->
                          <security-role>
                          <role-name>admin</role-name>
                          </security-role>

                          <!--
                          Security constraints - uncomment and optionally customize the role name to require
                          a login before access is allowed to the application.

                          Also, be sure to edit jboss-web.xml to configure the security domain if you are
                          deploying inside JBossAS.
                          -->
                          <security-constraint>
                          <web-resource-collection>
                          <web-resource-name>Secure Area</web-resource-name>
                          <url-pattern>/sa/*</url-pattern>
                          <http-method>GET</http-method>
                          <http-method>POST</http-method>
                          </web-resource-collection>
                          <auth-constraint>
                          <role-name>user</role-name>
                          </auth-constraint>
                          </security-constraint>
                          <!-- end security constraints -->

                          <!-- Example Login page - lists user names -->
                          <login-config>
                          <auth-method>FORM</auth-method>
                          <form-login-config>
                          <form-login-page>/ua/login-example.jsf</form-login-page>
                          <form-error-page>/ua/login-example.jsf?error=true</form-error-page>
                          </form-login-config>
                          </login-config>
                          <!-- End Example Login page - lists user names -->

                          <!-- Login configuration option #1 - use the login page ==>
                          <login-config>
                          <auth-method>FORM</auth-method>
                          <form-login-config>
                          <form-login-page>/ua/login.jsf</form-login-page>
                          <form-error-page>/ua/login.jsf?error=true</form-error-page>
                          </form-login-config>
                          </login-config>
                          <!== End Login configuration option #1 -->

                          <!-- Login configuration option #2 - use basic auth ==>
                          <login-config>
                          <auth-method>BASIC</auth-method>
                          <realm-name>jBPM Administration Console</realm-name>
                          </login-config>
                          <!== End Login configuration option #2 -->



                          <!-- This servlet serves the purpose of executing pending timer jobs. -->
                          <!-- JbpmJobExecutorServlet BEGIN -->
                          <servlet>
                          <servlet-name>JobExecutorServlet</servlet-name>
                          <servlet-class>org.jbpm.job.executor.JobExecutorServlet</servlet-class>
                          <load-on-startup>1</load-on-startup>
                          </servlet>
                          <servlet-mapping>
                          <servlet-name>JobExecutorServlet</servlet-name>
                          <url-pattern>/jobs</url-pattern>
                          </servlet-mapping>
                          <!-- JbpmJobExecutorServlet END -->

                          <!-- This section is so that the web console can deploy in the jbpm-enterprise.ear module -->
                          <!-- EJB LOCAL REFS BEGIN ===
                          <ejb-local-ref>
                          <ejb-ref-name>ejb/LocalTimerServiceBean</ejb-ref-name>
                          <ejb-ref-type>Session</ejb-ref-type>
                          <local-home>org.jbpm.scheduler.ejbtimer.LocalTimerServiceHome</local-home>
                          <local>org.jbpm.scheduler.ejbtimer.LocalTimerService</local>
                          <ejb-link>TimerServiceBean</ejb-link>
                          </ejb-local-ref>
                          ==== EJB LOCAL REFS END -->



                          When I am using the users "user" "admin" "manager", I have the following error Login failed. Invalid user name or password.
                          This users are described in jbpm-console/WEB-INF/access.properties
                          Is this file is needed when using mysql?

                          # Security configuration for jBPM Administration Console.
                          #
                          # Customize the properties in this file to define security permissions
                          # for different components within the console.

                          # Require one of the given roles for identity management functionality.
                          # Insert a bogus role name to disable identity management (if you are not
                          # using the jBPM identity module, for example).
                          role.identities=manager

                          # Fine-grained controls for different levels of identity management.
                          role.identities.user=admin
                          role.identities.user.add=
                          role.identities.user.delete=
                          role.identities.user.modify=

                          role.identities.group=admin
                          role.identities.group.add=
                          role.identities.group.delete=
                          role.identities.group.modify=

                          # Process definition operations
                          role.process.deploy=manager,admin
                          role.process.delete=admin
                          role.process.start=manager

                          # Process instance and token operations
                          role.execution.suspend=
                          role.execution.edit=
                          role.execution.delete=
                          role.execution.end=

                          # Task management operations
                          role.tasks=
                          role.task.assign=manager
                          role.task.assign.any=manager
                          role.task.modify=

                          # Job management operations
                          role.jobs=admin
                          role.jobs.delete=


                          • 10. Re: tomcat and mysql integration
                            vtysh

                            This text is present in jboss installation of the jbpm-console in login-config.xml. Maybe this will help You.

                             <application-policy name = "jbpm">
                             <authentication>
                             <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule"
                             flag="required">
                             <module-option name="dsJndiName">java:/JbpmDS</module-option>
                             <module-option name="principalsQuery">
                             SELECT PASSWORD_ FROM JBPM_ID_USER WHERE NAME_=?
                             </module-option>
                             <module-option name="rolesQuery">
                             SELECT g.NAME_ ,'Roles'
                             FROM JBPM_ID_USER u,
                             JBPM_ID_MEMBERSHIP m,
                             JBPM_ID_GROUP g
                             WHERE g.TYPE_='security-role'
                             AND m.GROUP_ = g.ID_
                             AND m.USER_ = u.ID_
                             AND u.NAME_=?
                             </module-option>
                             </login-module>
                             </authentication>
                             </application-policy>

                            Currently i don't know what exactly you should do to start jbpm-console on tomcat. Try to search the forum...