4 Replies Latest reply on Feb 21, 2013 9:54 PM by Joe Chang

    jBPM5.4 Integrating tomcat6 with jbpm-console jBPM-console

    Joe Chang Newbie

      who can help me?

       

       

      *******************************************************

      tomcat-users.xml

       

      <?xml version='1.0' encoding='utf-8'?>

      <tomcat-users>

        <role rolename="manager"/>

        <role rolename="admin"/>

        <role rolename="user"/>

        <user username="admin" password="" roles="admin,manager"/>

        <user username="mary" password="mary" roles="user"/>

        <user username="john" password="john" roles="user"/>

        <user username="william" password="william" roles="user"/>

      </tomcat-users>

      *****************************************************************************************

       

      ========================================

      persistence.xml

       

      <?xml version="1.0" encoding="UTF-8"?>
      <persistence version="2.0"
        xmlns="http://java.sun.com/xml/ns/persistence"
        xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_2_0.xsd">

        <persistence-unit name="org.jbpm.persistence.jpa" transaction-type="JTA">
          <provider>org.hibernate.ejb.HibernatePersistence</provider>
          <mapping-file>META-INF/JBPMorm-JPA2.xml</mapping-file>
          <mapping-file>META-INF/ProcessInstanceInfoMapping-JPA2.xml</mapping-file>
          <mapping-file>META-INF/ExtraIndexes.hbm.xml</mapping-file>

          <class>org.drools.persistence.info.SessionInfo</class>
          <class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</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.MySQL5Dialect"/>
            <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/>
            <property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/jbpm55?useUnicode=true&amp;characterEncoding=UTF-8"/>
            <property name="hibernate.connection.username" value="root"/>
            <property name="hibernate.connection.password" value="mysql"/>
           
            <property name="hibernate.max_fetch_depth" value="3" />
            <property name="hibernate.hbm2ddl.auto" value="update" />
            <property name="hibernate.show_sql" value="false" />
            <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup" />
           
            <!-- BZ 841786: AS7/EAP 6/Hib 4 uses new (sequence) generators which seem to cause problems -->     
            <property name="hibernate.id.new_generator_mappings" value="false" />
          </properties>

        </persistence-unit>
      </persistence>

       

      ===================================================

       

       

       

       

       

      2013-2-19 16:53:21 org.apache.catalina.core.StandardWrapperValve invoke

      严重: Servlet.service() for servlet Resteasy threw exception

      org.jboss.resteasy.spi.UnhandledException: java.lang.RuntimeException: Session was not initialized, check previous errors in log

      at org.jboss.resteasy.core.SynchronousDispatcher.unwrapException(SynchronousDispatcher.java:345)

      at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:321)

      at org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:214)

      at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:190)

      at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:534)

      at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:496)

      at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)

      at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)

      at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)

      at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      at org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)

      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)

      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)

      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)

      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)

      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)

      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)

      at java.lang.Thread.run(Thread.java:619)

      Caused by: java.lang.RuntimeException: Session was not initialized, check previous errors in log

      at org.jbpm.integration.console.StatefulKnowledgeSessionUtil.getStatefulKnowledgeSession(StatefulKnowledgeSessionUtil.java:89)

      at org.jbpm.integration.console.SessionInitializer.<init>(SessionInitializer.java:25)

      at org.jbpm.integration.console.TaskManagement.<init>(TaskManagement.java:52)

      at org.jbpm.integration.console.ManagementFactory.createTaskManagement(ManagementFactory.java:26)

      at org.jbpm.integration.console.ManagementFactory.createTaskManagement(ManagementFactory.java:19)

      at org.jboss.bpm.console.server.TaskListFacade.getTaskManagement(TaskListFacade.java:72)

      at org.jboss.bpm.console.server.TaskListFacade.getTasksForIdRef(TaskListFacade.java:101)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:597)

      at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140)

      at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:255)

      at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:220)

      at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:209)

      at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:519)

      ... 22 more