4 Replies Latest reply on Jan 2, 2009 10:55 AM by jeremiah lumontod

    cannot login in jbpm-console using jbpm-3.3.0 mysql jboss4.2

    jeremiah lumontod Newbie


      I can deploy the process (since i can see it in mysql database) but i cannot login at jbpm-console. it seems that something is missing in javaserver faces configuration

      my web.xml:




      <?xml version="1.0" encoding="UTF-8"?>
      <web-app version="2.4"
      xmlns="http://java.sun.com/xml/ns/j2ee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" >


      <!--
      * Force initialization of the hibernate sessions in jbpm.
      * This will create the DB tables on new installations.
      * If that's not needed the listener can be removed.
      -->

      <listener-class>
      org.jbpm.web.BootstrapListener
      </listener-class>



      Enable the JSF servlet. See faces-config.xml for Faces-specific configuration
      <servlet-name>Faces Servlet</servlet-name>
      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
      <load-on-startup>1</load-on-startup>


      <!-- Mapping for all plain pages. -->
      <servlet-mapping>
      <servlet-name>Faces Servlet</servlet-name>
      <url-pattern>*.jsf</url-pattern>
      </servlet-mapping>

      <!-- This mapping is for the process images. -->
      <servlet-mapping>
      <servlet-name>Faces Servlet</servlet-name>
      <url-pattern>/sa/pi/*</url-pattern>
      </servlet-mapping>

      <context-param>
      Use Documents Saved as *.xhtml
      <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
      <param-value>.xhtml</param-value>
      </context-param>

      <context-param>
      Facelets debug output
      <param-name>facelets.DEVELOPMENT</param-name>
      <param-value>true</param-value>
      </context-param>

      <!-- Facelets tag libraries (semi-colon separated) -->
      <context-param>
      <param-name>facelets.LIBRARIES</param-name>
      <param-value>/WEB-INF/jbpm.taglib.xml;/WEB-INF/jbpm-tf.taglib.xml</param-value>
      </context-param>

      <!-- Custom Facelets resource resolver to handle the task form fetching from the process definition files -->
      <context-param>
      <param-name>facelets.RESOURCE_RESOLVER</param-name>
      <param-value>org.jbpm.webapp.taskforms.TaskFormsResourceResolver</param-value>
      </context-param>

      <!-- Work around a bug in JSF 1.2_03 -->
      <context-param>
      <param-name>com.sun.faces.disableVersionTracking</param-name>
      <param-value>true</param-value>
      </context-param>

      <!-- A simple JSP to redirect to the basic search page. -->
      <welcome-file-list>
      <welcome-file>index.jsp</welcome-file>
      </welcome-file-list>


      This is the GDP's deployer servlet
      <servlet-name>GDP Deployer Servlet</servlet-name>
      <servlet-class>org.jbpm.web.ProcessUploadServlet</servlet-class>
      <load-on-startup>1</load-on-startup>


      <servlet-mapping>
      <servlet-name>GDP Deployer Servlet</servlet-name>
      <url-pattern>/upload/*</url-pattern>
      </servlet-mapping>

      <servlet-mapping>
      <servlet-name>GDP Deployer Servlet</servlet-name>
      <url-pattern>/uploadDefinition</url-pattern>
      </servlet-mapping>


      <!--
      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-role>
      <role-name>user</role-name>
      </security-role>

      <security-role>
      <role-name>participant</role-name>
      </security-role>
      <security-role>
      <role-name>manager</role-name>
      </security-role>
      <security-role>
      <role-name>administrator</role-name>
      </security-role>

      <!--
      Security constraints - 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 JBoss AS.
      -->
      <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>

      <security-constraint>
      <web-resource-collection>
      <web-resource-name>Common Pages</web-resource-name>
      <url-pattern>/common/*</url-pattern>
      <http-method>GET</http-method>
      <http-method>POST</http-method>
      </web-resource-collection>
      <auth-constraint>
      <role-name>participant</role-name>
      <role-name>manager</role-name>
      <role-name>administrator</role-name>
      </auth-constraint>
      </security-constraint>

      <security-constraint>
      <web-resource-collection>
      <web-resource-name>Participant Pages</web-resource-name>
      <url-pattern>/main/*</url-pattern>
      <http-method>GET</http-method>
      <http-method>POST</http-method>
      </web-resource-collection>
      <auth-constraint>
      <role-name>participant</role-name>
      </auth-constraint>
      </security-constraint>

      <security-constraint>
      <web-resource-collection>
      <web-resource-name>Search Pages</web-resource-name>
      <url-pattern>/search/*</url-pattern>
      <http-method>GET</http-method>
      <http-method>POST</http-method>
      </web-resource-collection>
      <auth-constraint>
      <role-name>participant</role-name>
      </auth-constraint>
      </security-constraint>


      <security-constraint>
      <web-resource-collection>
      <web-resource-name>Process Pages</web-resource-name>
      <url-pattern>/process/*</url-pattern>
      <http-method>GET</http-method>
      <http-method>POST</http-method>
      </web-resource-collection>
      <auth-constraint>
      <role-name>participant</role-name>
      </auth-constraint>
      </security-constraint>

      <security-constraint>
      <web-resource-collection>
      <web-resource-name>Task Pages</web-resource-name>
      <url-pattern>/task/*</url-pattern>
      <http-method>GET</http-method>
      <http-method>POST</http-method>
      </web-resource-collection>
      <auth-constraint>
      <role-name>participant</role-name>
      </auth-constraint>
      </security-constraint>

      <security-constraint>
      <web-resource-collection>
      <web-resource-name>Report Pages</web-resource-name>
      <url-pattern>/report/*</url-pattern>
      <http-method>GET</http-method>
      <http-method>POST</http-method>
      </web-resource-collection>
      <auth-constraint>
      <role-name>participant</role-name>
      </auth-constraint>
      </security-constraint>



      <!-- 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>
      -->

      <!-- 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>


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



      <!-- Job executor launcher ==>


      Starts the job executor on servlet context initialization and stops it on
      servlet context destruction.

      <listener-class>org.jbpm.web.JobExecutorLauncher</listener-class>

      <!== Job executor launcher -->



      Closes the jBPM configuration on servlet context destruction, releasing
      application resources. This listener should appear after the job executor
      launcher to avoid reopening the configuration.

      <listener-class>org.jbpm.web.JbpmConfigurationCloser</listener-class>


      <!-- Job executor servlet ==>


      This servlet has the purpose of executing pending jobs. Deprecated,
      replaced by JobExecutorLauncher.

      <servlet-name>JobExecutorServlet</servlet-name>
      <servlet-class>org.jbpm.job.executor.JobExecutorServlet</servlet-class>
      <load-on-startup>1</load-on-startup>

      <servlet-mapping>
      <servlet-name>JobExecutorServlet</servlet-name>
      <url-pattern>/jobs</url-pattern>
      </servlet-mapping>
      <!== Job executor servlet -->

      <!-- CloseJbpmConfigurationServlet BEGIN -->

      <servlet-name>CloseJbpmConfigurationServlet</servlet-name>
      <servlet-class>org.jbpm.web.CloseJbpmConfigurationServlet</servlet-class>
      <load-on-startup>1</load-on-startup>



      <resource-ref>

      Logical name of the data source that provides connections to the persistence service.
      Must match the hibernate.connection.datasource property in the Hibernate
      configuration file.

      <res-ref-name>jdbc/JbpmDataSource</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
      </resource-ref>

      <resource-ref>

      Logical name of the factory that provides JMS connections to the message service.
      Required for processes that contain asynchronous continuations.

      <res-ref-name>jms/JbpmConnectionFactory</res-ref-name>
      <res-type>javax.jms.ConnectionFactory</res-type>
      <res-auth>Container</res-auth>
      </resource-ref>

      <ejb-local-ref>

      Link to the local entity bean that implements the scheduler service. Required for
      processes that contain timers.

      <ejb-ref-name>ejb/TimerEntityBean</ejb-ref-name>
      <ejb-ref-type>Entity</ejb-ref-type>
      <local-home>org.jbpm.ejb.LocalTimerEntityHome</local-home>
      org.jbpm.ejb.LocalTimerEntity
      <ejb-link>TimerEntityBean</ejb-link>
      </ejb-local-ref>

      <message-destination-ref>

      The message service sends job messages to the queue referenced here. To ensure
      this is the same queue from which the JobListenerBean receives messages, the
      message-destination-link element points to a common logical destination, JobQueue.

      <message-destination-ref-name>jms/JobQueue</message-destination-ref-name>
      <message-destination-type>javax.jms.Queue</message-destination-type>
      <message-destination-usage>Produces</message-destination-usage>
      <message-destination-link>JobQueue</message-destination-link>
      </message-destination-ref>

      </web-app>







      my faces-config.xml:






      <?xml version='1.0' encoding='UTF-8'?>
      <faces-config xmlns="http://java.sun.com/xml/ns/javaee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
      version="1.2">


      <!-- Managed beans -->

      <!-- global -->

      <managed-bean>
      <managed-bean-name>jbpmBean</managed-bean-name>
      <managed-bean-class>org.jbpm.webapp.bean.JbpmBean</managed-bean-class>
      <managed-bean-scope>request</managed-bean-scope>
      </managed-bean>

      <managed-bean>
      <managed-bean-name>identityBean</managed-bean-name>
      <managed-bean-class>org.jbpm.webapp.bean.IdentityBean</managed-bean-class>
      <managed-bean-scope>request</managed-bean-scope>
      <managed-property>
      <property-name>jbpmBean</property-name>
      #{jbpmBean}
      </managed-property>
      </managed-bean>

      <managed-bean>
      <managed-bean-name>applicationBean</managed-bean-name>
      <managed-bean-class>org.jbpm.webapp.bean.ApplicationBean</managed-bean-class>
      <managed-bean-scope>application</managed-bean-scope>
      </managed-bean>

      <!-- Graph object beans -->

      <managed-bean>
      <managed-bean-name>taskInstanceBean</managed-bean-name>
      <managed-bean-class>org.jbpm.webapp.bean.TaskInstanceBean</managed-bean-class>
      <managed-bean-scope>request</managed-bean-scope>
      <managed-property>
      <property-name>jbpmBean</property-name>
      #{jbpmBean}
      </managed-property>
      <managed-property>
      <property-name>pageBean</property-name>
      #{pageBean}
      </managed-property>
      <managed-property>
      <property-name>taskBean</property-name>
      #{taskBean}
      </managed-property>
      <managed-property>
      <property-name>processBean</property-name>
      #{processBean}
      </managed-property>
      <managed-property>
      <property-name>processInstanceBean</property-name>
      #{processInstanceBean}
      </managed-property>
      <managed-property>
      <property-name>applicationBean</property-name>
      #{applicationBean}
      </managed-property>
      <managed-property>
      <property-name>identityBean</property-name>
      #{identityBean}
      </managed-property>
      </managed-bean>

      <managed-bean>
      <managed-bean-name>taskBean</managed-bean-name>
      <managed-bean-class>org.jbpm.webapp.bean.TaskBean</managed-bean-class>
      <managed-bean-scope>request</managed-bean-scope>
      <managed-property>
      <property-name>pageBean</property-name>
      #{pageBean}
      </managed-property>
      <managed-property>
      <property-name>jbpmBean</property-name>
      #{jbpmBean}
      </managed-property>
      <managed-property>
      <property-name>applicationBean</property-name>
      #{applicationBean}
      </managed-property>
      <managed-property>
      <property-name>processBean</property-name>
      #{processBean}
      </managed-property>
      </managed-bean>

      <managed-bean>
      <managed-bean-name>processInstanceBean</managed-bean-name>
      <managed-bean-class>org.jbpm.webapp.bean.ProcessInstanceBean</managed-bean-class>
      <managed-bean-scope>request</managed-bean-scope>
      <managed-property>
      <property-name>pageBean</property-name>
      #{pageBean}
      </managed-property>
      <managed-property>
      <property-name>jbpmBean</property-name>
      #{jbpmBean}
      </managed-property>
      <managed-property>
      <property-name>processBean</property-name>
      #{processBean}
      </managed-property>
      </managed-bean>

      <managed-bean>
      <managed-bean-name>processBean</managed-bean-name>
      <managed-bean-class>org.jbpm.webapp.bean.ProcessBean</managed-bean-class>
      <managed-bean-scope>request</managed-bean-scope>
      <managed-property>
      <property-name>jbpmBean</property-name>
      #{jbpmBean}
      </managed-property>
      <managed-property>
      <property-name>pageBean</property-name>
      #{pageBean}
      </managed-property>
      </managed-bean>

      <managed-bean>
      <managed-bean-name>pageBean</managed-bean-name>
      <managed-bean-class>org.jbpm.webapp.bean.PageBean</managed-bean-class>
      <managed-bean-scope>request</managed-bean-scope>
      </managed-bean>




      <locale-config>
      <default-locale>en</default-locale>
      </locale-config>

      <!--
      Use Facelets as the primary view handler. Since we have bookmarkable URLs,
      add Gravel's query preserving view handler to the list.
      -->
      <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
      <view-handler>org.jboss.gravel.QueryPreservingViewHandler</view-handler>

      <!--
      Use Gravel's navigation model.
      -->
      <navigation-handler>org.jboss.gravel.navigation.GravelNavigationHandler</navigation-handler>


      <!-- Converters -->


      <converter-id>pooledActorsConverter</converter-id>
      <converter-class>org.jbpm.webapp.converter.PooledActorsConverter</converter-class>



      <converter-id>timeIntervalConverter</converter-id>
      <converter-class>org.jbpm.webapp.converter.TimeIntervalConverter</converter-class>


      <!-- jBPM tx phase listener handler -->


      <phase-listener>org.jbpm.jsf.core.phase.JbpmPhaseListener</phase-listener>



      </faces-config>



      i think the problem comes from the configuration / setup of javaserver faces, but since its my first time using jbpm i have no clue.

      if somebody who is an expert in this can guide me or give me some tips,
      it would be a great help.








        • 2. Re: cannot login in jbpm-console using jbpm-3.3.0 mysql jbos
          jeremiah lumontod Newbie

          Hello Ronald

          here's the message when i login:



          HTTP Status 403 - Access to the requested resource has been denied

          type Status report

          message Access to the requested resource has been denied

          description Access to the specified resource (Access to the requested resource has been denied) has been forbidden.
          JBossWeb/2.0.1.GA



          my guess is my javaserver faces configuration (web.xml and faces-config.xml). i just started playing with jbpm and i kinda like it. my future plan is to integrate it with seam. but im currently stocked in here.


          can you help what might be the problem? i played around with version 3.2.2 of jbpm using hypersonic and eclipse 3.2.1 and everything is good, now i shifted to eclipse 3.4.1 and jbpm 3.3.0 using mysql since i like what upgrades / additional stuff they've added. deploying is good, accessing the web is my problem.

          thank you for your time




          • 3. Re: cannot login in jbpm-console using jbpm-3.3.0 mysql jbos
            jeremiah lumontod Newbie


            Additional error logs from console:





            14:49:25,703 ERROR [STDERR] Jan 2, 2009 2:49:25 PM com.sun.facelets.compiler.Tag
            LibraryConfig loadImplicit
            INFO: Added Library from: jar:file:/C:/jboss-4.2.2.GA/server/default/deploy/jbpm
            /jbpm-enterprise-bundle.ear/jsf-console.war/WEB-INF/lib/gravel-1.0.0.GA.jar!/MET
            A-INF/gravel-compat.taglib.xml
            14:49:25,750 ERROR [STDERR] Jan 2, 2009 2:49:25 PM com.sun.facelets.compiler.Tag
            LibraryConfig loadImplicit
            INFO: Added Library from: jar:file:/C:/jboss-4.2.2.GA/server/default/deploy/jbpm
            /jbpm-enterprise-bundle.ear/jsf-console.war/WEB-INF/lib/gravel-1.0.0.GA.jar!/MET
            A-INF/gravel-data.taglib.xml
            14:49:25,765 ERROR [STDERR] Jan 2, 2009 2:49:25 PM com.sun.facelets.compiler.Tag
            LibraryConfig loadImplicit
            INFO: Added Library from: jar:file:/C:/jboss-4.2.2.GA/server/default/deploy/jbpm
            /jbpm-enterprise-bundle.ear/jsf-console.war/WEB-INF/lib/gravel-1.0.0.GA.jar!/MET
            A-INF/gravel-nav.taglib.xml
            14:49:25,796 ERROR [STDERR] Jan 2, 2009 2:49:25 PM com.sun.facelets.compiler.Tag
            LibraryConfig loadImplicit
            INFO: Added Library from: jar:file:/C:/jboss-4.2.2.GA/server/default/deploy/jbpm
            /jbpm-enterprise-bundle.ear/jsf-console.war/WEB-INF/lib/gravel-1.0.0.GA.jar!/MET
            A-INF/gravel-simple.taglib.xml
            14:49:26,296 ERROR [STDERR] Jan 2, 2009 2:49:26 PM com.sun.facelets.compiler.Tag
            LibraryConfig loadImplicit
            INFO: Added Library from: jar:file:/C:/jboss-4.2.2.GA/server/default/deploy/jbpm
            /jbpm-enterprise-bundle.ear/jsf-console.war/WEB-INF/lib/jsf-console-jbpm4jsf-3.3
            .0.GA.jar!/META-INF/core.taglib.xml
            14:49:26,375 ERROR [STDERR] Jan 2, 2009 2:49:26 PM com.sun.facelets.compiler.Tag
            LibraryConfig loadImplicit
            INFO: Added Library from: jar:file:/C:/jboss-4.2.2.GA/server/default/deploy/jbpm
            /jbpm-enterprise-bundle.ear/jsf-console.war/WEB-INF/lib/jsf-console-jbpm4jsf-3.3
            .0.GA.jar!/META-INF/identity.taglib.xml
            14:49:26,390 ERROR [STDERR] Jan 2, 2009 2:49:26 PM com.sun.facelets.compiler.Tag
            LibraryConfig loadImplicit
            INFO: Added Library from: jar:file:/C:/jboss-4.2.2.GA/server/default/deploy/jbpm
            /jbpm-enterprise-bundle.ear/jsf-console.war/WEB-INF/lib/jsf-console-jbpm4jsf-3.3
            .0.GA.jar!/META-INF/tf-compat.taglib.xml
            14:49:26,406 ERROR [STDERR] Jan 2, 2009 2:49:26 PM com.sun.facelets.compiler.Tag
            LibraryConfig loadImplicit
            INFO: Added Library from: jar:file:/C:/jboss-4.2.2.GA/server/default/deploy/jbpm
            /jbpm-enterprise-bundle.ear/jsf-console.war/WEB-INF/lib/jsf-console-jbpm4jsf-3.3
            .0.GA.jar!/META-INF/tf.taglib.xml
            14:49:26,421 ERROR [STDERR] Jan 2, 2009 2:49:26 PM com.sun.facelets.compiler.Tag
            LibraryConfig loadImplicit
            INFO: Added Library from: jar:file:/C:/jboss-4.2.2.GA/server/default/deploy/jbpm
            /jbpm-enterprise-bundle.ear/jsf-console.war/WEB-INF/lib/jsf-console-jbpm4jsf-3.3
            .0.GA.jar!/META-INF/tfl-compat.taglib.xml
            14:49:26,437 ERROR [STDERR] Jan 2, 2009 2:49:26 PM com.sun.facelets.compiler.Tag
            LibraryConfig loadImplicit
            INFO: Added Library from: jar:file:/C:/jboss-4.2.2.GA/server/default/deploy/jbpm
            /jbpm-enterprise-bundle.ear/jsf-console.war/WEB-INF/lib/jsf-console-jbpm4jsf-3.3
            .0.GA.jar!/META-INF/tfl.taglib.xml
            14:49:26,484 ERROR [STDERR] Jan 2, 2009 2:49:26 PM com.sun.facelets.compiler.Tag
            LibraryConfig loadImplicit
            INFO: Added Library from: jar:file:/C:/jboss-4.2.2.GA/server/default/deploy/jbpm
            /jbpm-enterprise-bundle.ear/jsf-console.war/WEB-INF/lib/jsf-facelets-1.1.14.jar!
            /META-INF/jsf-core.taglib.xml
            14:49:26,515 ERROR [STDERR] Jan 2, 2009 2:49:26 PM com.sun.facelets.compiler.Tag
            LibraryConfig loadImplicit
            INFO: Added Library from: jar:file:/C:/jboss-4.2.2.GA/server/default/deploy/jbpm
            /jbpm-enterprise-bundle.ear/jsf-console.war/WEB-INF/lib/jsf-facelets-1.1.14.jar!
            /META-INF/jsf-html.taglib.xml
            14:49:26,546 ERROR [STDERR] Jan 2, 2009 2:49:26 PM com.sun.facelets.compiler.Tag
            LibraryConfig loadImplicit
            INFO: Added Library from: jar:file:/C:/jboss-4.2.2.GA/server/default/deploy/jbpm
            /jbpm-enterprise-bundle.ear/jsf-console.war/WEB-INF/lib/jsf-facelets-1.1.14.jar!
            /META-INF/jsf-ui.taglib.xml
            14:49:26,578 ERROR [STDERR] Jan 2, 2009 2:49:26 PM com.sun.facelets.compiler.Tag
            LibraryConfig loadImplicit
            INFO: Added Library from: jar:file:/C:/jboss-4.2.2.GA/server/default/deploy/jbpm
            /jbpm-enterprise-bundle.ear/jsf-console.war/WEB-INF/lib/jsf-facelets-1.1.14.jar!
            /META-INF/jstl-core.taglib.xml
            14:49:26,578 ERROR [STDERR] Jan 2, 2009 2:49:26 PM com.sun.facelets.compiler.Tag
            LibraryConfig loadImplicit
            INFO: Added Library from: jar:file:/C:/jboss-4.2.2.GA/server/default/deploy/jbpm
            /jbpm-enterprise-bundle.ear/jsf-console.war/WEB-INF/lib/jsf-facelets-1.1.14.jar!
            /META-INF/jstl-fn.taglib.xml





            • 4. Re: cannot login in jbpm-console using jbpm-3.3.0 mysql jbos
              jeremiah lumontod Newbie

              got it.

              it has something to do with the following tables:

              jbpm_id_group
              jbpm_id_user
              jbpm_id_membership