2 Replies Latest reply on Jul 19, 2018 1:36 PM by aravindps

    Deploy jBPM 7.8.0 in Tomcat - Not able to Login using tomcat user

    aravindps

      I am trying to deploy jBPM 7.8.0 in tomcat.

       

      I have placed the war files in webapps directory in tomcat 7.0.40. Java 1.8.

       

      I have made the changes as per the readMe files in kie-server & kie-wb war files.

       

      I am able to deploy the wars. Login page is coming up. But I am not able to login. Error is "Login Failed: Not Authorized"

       

      Logs attached.

      Tomct users:

      <role rolename="admin"/>

      <role rolename="PM"/>

      <role rolename="HR"/>

      <role rolename="analyst"/>

      <role rolename="user"/>

      <role rolename="kie-server"/>

       

      <user username="testuser" password="testpwd" roles="admin,analyst,PM,HR,kie-server"/>

      <user username="kieserver" password="kieserver1!" roles="kie-server"/>

       

      Note - Read me file does not mention configuring the bitronix trxn manager.

       

      Can anyone help me with this?

       

      In catalina.bat, catalina options is set to:

      set CATALINA_OPTS= %CATALINA_OPTS% -Djbpm.tsr.jndi.lookup=java:comp/env/TransactionSynchronizationRegistry -Dorg.kie.server.persistence.ds=java:comp/env/jdbc/jbpm -Djbpm.tm.jndi.lookup=java:comp/env/TransactionManager -Dorg.kie.server.persistence.tm=JBossTS -Dhibernate.connection.release_mode=after_transaction -Dorg.kie.server.id=tomcat-kieserver -Dorg.kie.server.location=http://localhost:7001/kie-server-7.8.0/services/rest/server -Dorg.kie.server.controller=http://localhost:7001/kie-wb-7.8.0/rest/controller -Djava.security.auth.login.config=D:\Aravind\Installation\Tomcat_8\webapps\kie-wb-7.8.0\WEB-INF\classes\login.config -Dorg.jboss.logging.provider=jdk

       

      regards,

      Aravind

        • 1. Re: Deploy jBPM 7.8.0 in Tomcat - Not able to Login using tomcat user
          aravindps

          Tomcat user DB setup was missing. This issue is fixed. I am able to login now.

           

          But I cannot see the process definitions and process instances.

           

          I have given the roles in tomcat-users.xml.

          I have also given the role in web.xml in workbench war and kie server war (kie-server, rest-all, rest-client roles).

          Now these roles are shown in the roles page in the workbench. It is also assigned to the user.

          BUT when I click on the process definition/instance, there is an error:

               "Process Definitions could not be loaded. Check if the jBPM Capabilities are enabled and if the remote server is correctly set up."

           

          Many roles added in Tomcat show in workbench as groups.

           

          The kie-server has started correctly:

          <response type="SUCCESS" msg="Kie Server info">

           

          <response type="SUCCESS" msg="Kie Server info">

           

          <kie-server-info>

           

           

          <capabilities>KieServer</capabilities>

           

          <capabilities>BRM</capabilities>

          <capabilities>BPM</capabilities>

          <capabilities>CaseMgmt</capabilities>

          <capabilities>BPM-UI</capabilities>

          <capabilities>BRP</capabilities>

          <capabilities>DMN</capabilities>

          <capabilities>Swagger</capabilities>

           

           

          <messages>

           

           

          <content>

           

          Server KieServerInfo{serverId='tomcat-kieserver', version='7.8.0.Final', name='tomcat-kieserver', location='http://localhost:7001/kie-server-7.8.0/services/rest/server', capabilities=[KieServer, BRM, BPM, CaseMgmt, BPM-UI, BRP, DMN, Swagger], messages=null}started successfully at Thu Jul 19 21:13:27 IST 2018

          </content>

          <severity>INFO</severity>

          <timestamp>2018-07-19T21:13:27.262+05:30</timestamp>

          </messages>

          <name>tomcat-kieserver</name>

          <id>tomcat-kieserver</id>

          <version>7.8.0.Final</version>

          </kie-server-info>

          </response>

           

          Can anyone tell me how to fix this?

          • 2. Re: Deploy jBPM 7.8.0 in Tomcat - Not able to Login using tomcat user
            aravindps

            Process definitions not visible

            Tomcat users:

            <tomcat-users>

              <role rolename="process-admin"/>

              <role rolename="manager"/>

              <role rolename="rest-client"/>

              <role rolename="admin"/>

              <role rolename="analyst"/>

              <role rolename="rest-all"/>

              <role rolename="developer"/>

              <role rolename="kie-server"/>

              <user username="kieserver" password="kieserver1!" fullName="" roles="admin,kie-server"/>

              <user username="jbpmrest" password="jbpmrest" roles="rest-all,rest-client"/>

              <user username="superuser" password="sonpass" fullName="super user" roles="manager,rest-client,process-admin,rest-all,analyst,developer,kie-server,admin"/>

            </tomcat-users>

             

            Login done with superuser.

            CATALINA_OPTS:

            -Djbpm.tsr.jndi.lookup=java:comp/env/TransactionSynchronizationRegistry -Dorg.kie.server.persistence.ds=java:comp/env/jdbc/jbpm -Djbpm.tm.jndi.lookup=java:comp/env/TransactionManager -Dorg.kie.server.persistence.tm=JBossTS -Dhibernate.connection.release_mode=after_transaction -Dorg.kie.server.id=tomcat-kieserver -Dorg.kie.server.location=http://localhost:7001/kie-server-7.8.0/services/rest/server -Dorg.kie.server.controller=http://localhost:7001/kie-wb-7.8.0/rest/controller -Djava.security.auth.login.config=D:\Aravind\Installation\Tomcat_8\webapps\kie-wb-7.8.0\WEB-INF\classes\login.config -Dorg.jboss.logging.provider=jdk -Dorg.kie.server.controller.user=superuser -Dorg.kie.server.controller.pwd=sonpass

             

            ROLES were getting showin in workbench UI as GROUPS. So I have added following roles in web.xml of kie-wb and kie-server war:

            Kie-server:

            <security-role>

                <description>Rest All

                </description>

                <role-name>rest-all</role-name>

              </security-role>

             

              <security-role>

                <description>Rest Client

                </description>

                <role-name>rest-client</role-name>

              </security-role>

            kie-wb:

            <security-role>

                <description>Rest All

                </description>

                <role-name>rest-all</role-name>

              </security-role>

             

              <security-role>

                <description>Rest Client

                </description>

                <role-name>rest-client</role-name>

              </security-role>

             

              <security-role>

                <description>kie server

                </description>

                <role-name>kie-server</role-name>

              </security-role>

             

            Now the 3 roles are visible as roles in the role UI page.

             

            STILL I am not able to see the process definitions.

             

            H2 memory DB is configured:jdbcx.JdbcDataSour

            ceFactory"/

             

            <Resource name="sharedDataSource"

                      auth="Container"

                      type="org.h2.jdbcx.JdbcDataSource"

                      user="sa"

                          password="sa"

                          url="jdbc:h2:mem:jbpm;DB_CLOSE_DELAY=-1;MVCC=TRUE"

                          description="H2 Data Source"

                          loginTimeout="0"

                          testOnBorrow="false"

                          factory="org.h2.jdbcx.JdbcDataSourceFactory"/>

             

            The execution server page has the process checkbox unchecked. If I create a new configuration, remote server is not visible. Initially, execution server showed this deployment unit. Now is not used by the server. No option to select the server config. For my newly created config, remote server is not visible.

            Process is unchecked.

            >