<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi Michael,<br>
         Thank you for the instructions. I wasn't able to find these
      instructions anywhere, but I'll check the readme again.<br>
      Where can I get the jacc and kie-tomcat-integration jar files
      from?<br>
      <br>
      Thanks,<br>
      Ven<br>
      <br>
      On 04/11/2014 10:49 AM, Michael Anstis wrote:<br>
    </div>
    <blockquote
cite="mid:CAAG9P0t1E1wWDzZ+eUJe7sBQCuWvRdJbCgS+xfeYhMhY5s6MEA@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <div dir="ltr">Hi,
        <div><br>
        </div>
        <div>There have been a few people with Tomcat deployment issues
          for kie-drools-wb, so I thought I'd give it a try.</div>
        <div><br>
        </div>
        <div>These are the steps I followed for <b>successful</b>
          deployment (most of which is already documented, but not
          obvious, in the WAR's README.txt file):-</div>
        <div><br>
        </div>
        <div><b>6.0.1</b></div>
        <div><b><br>
          </b></div>
        <div>Starting with a clean install of Tomcat 7.</div>
        <div><br>
        </div>
        <div>
          <div>1. Copy "kie-tomcat-integration" JAR into TOMCAT_HOME/lib
            (org.kie:kie-tomcat-integration)</div>
          <div>2. Copy "JACC" JAR into <font face="courier new,
              monospace">TOMCAT_HOME/lib</font>
            (javax.security.jacc:artifactId=javax.security.jacc-api in
            JBoss Maven Repository)</div>
          <div>3. Copy "slf4j-api" JAR into <font face="courier new,
              monospace">TOMCAT_HOME/lib</font>
            (org.slf4j:artifactId=slf4j-api in JBoss Maven Repository)</div>
          <div>4. Add valve configuration into <font face="courier new,
              monospace">TOMCAT_HOME/conf/server.xml</font> inside
            <font face="courier new, monospace">&lt;Host&gt;</font>
            element as last valve definition:</div>
          <div><br>
          </div>
          <div>  <font face="courier new, monospace"> &lt;Valve
              className="org.kie.integration.tomcat.JACCValve" /&gt;</font></div>
          <div><br>
          </div>
          <div>5. Edit <font face="courier new, monospace">TOMCAT_HOME/conf/tomcat-users.xml</font>
            to include roles and users, make sure there will be
            'analyst' or 'admin' roles defined as it's required to be
            authorized to use kie-wb</div>
        </div>
        <div>
          <div>6. Delete <font face="courier new, monospace">org.uberfire.security.auth.AuthenticationSource</font> inside
            <font face="courier new, monospace">WEB-INF/classes/META-INF/services</font></div>
          <div>7. Rename <font face="courier new, monospace">org.uberfire.security.auth.AuthenticationSource-TOMCAT-JEE-SECURITY</font>
            to
            <font face="courier new, monospace">org.uberfire.security.auth.AuthenticationSource </font>inside
            <font face="courier new, monospace">WEB-INF/classes/META-INF/services</font></div>
          <div>8. Increase Java's PermGen space by adding file <span
              style="font-family:'courier new',monospace">TOMCAT_HOME/bin/</span><font
              face="courier new, monospace">setenv.sh</font> containing <font
              face="courier new, monospace">export JAVA_OPTS="-Xmx1024m
              -XX:MaxPermSize=256m"</font></div>
        </div>
        <div>9. Start Tomcat with <font face="courier new, monospace">TOMCAT_HOME/bin/startup.sh<br>
          </font></div>
        <div>10. Go to Management Console, <font face="courier new,
            monospace"><a moz-do-not-send="true"
              href="http://localhost:8080/management" target="_blank">http://localhost:8080/management</a></font></div>
        <div>11. Deploy modified WAR</div>
        <div><br>
        </div>
        <div>If you do not complete these steps the WAR works "out of
          the box" but you'll need to define Users in <font
            face="courier new, monospace">WEB-INF/classes/login.config</font></div>
        <div><br>
        </div>
        <div><b>6.1.0-SNAPSHOT</b></div>
        <div><b><br>
          </b></div>
        <div>
          <div>Starting with a clean install of Tomcat 7.</div>
        </div>
        <div><br>
        </div>
        <div>
          <div>1. Copy "kie-tomcat-integration" JAR into TOMCAT_HOME/lib
            (org.kie:kie-tomcat-integration)</div>
          <div>2. Copy "JACC" JAR into TOMCAT_HOME/lib
            (javax.security.jacc:artifactId=javax.security.jacc-api in
            JBoss Maven Repository)</div>
          <div>3. Copy "slf4j-api" JAR into TOMCAT_HOME/lib
            (org.slf4j:artifactId=slf4j-api in JBoss Maven Repository)</div>
          <div>4. Add valve configuration into
            TOMCAT_HOME/conf/server.xml inside Host element as last
            valve definition:</div>
          <div><br>
          </div>
          <div>  <font face="courier new, monospace"> &lt;Valve
              className="org.kie.integration.tomcat.JACCValve" /&gt;</font></div>
          <div><br>
          </div>
          <div>5. Edit TOMCAT_HOME/conf/tomcat-users.xml to include
            roles and users, make sure there will be 'analyst' or
            'admin' roles defined as it's required to be authorized to
            use kie-wb</div>
          <div>
            <div style="font-weight:normal">6. Start Tomcat with <font
                face="courier new, monospace">TOMCAT_HOME/bin/startup.sh<br>
              </font></div>
            <div style="font-weight:normal">7. Go to Management
              Console, <font face="courier new, monospace"><a
                  moz-do-not-send="true"
                  href="http://localhost:8080/management"
                  target="_blank">http://localhost:8080/management</a></font></div>
            <div style="font-weight:normal">8. Deploy modified WAR</div>
            <div style="font-weight:bold"><br>
            </div>
            <div>With kind regards,</div>
            <div><br>
            </div>
            <div>Mike</div>
          </div>
        </div>
        <div><b><br>
          </b></div>
        <div><br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On 10 April 2014 19:25, Ven Tadipatri <span
            dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:ven.tadipatri@ll.mit.edu" target="_blank">ven.tadipatri@ll.mit.edu</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000"><font face="Times New
                Roman, Times, serif">Hi,<br>
                  I'm trying to get set up with Drools and Guvnor.  I've
                had some success building a test program with Drools,
                but when I saw that there's a webapp<br>
                to manage and view rules, I was interested in getting
                that working as well. Unfortunately I haven't had much
                success with that.<br>
                  I downloaded the
                kie-drools-wb-distribution-6.0.1.Final.zip file from the
                JBoss drools website and dropped the
                binaries/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0.war<br>
                into my Tomcat directory.  Tomcat was just hanging for a
                while, then spit out a bunch of error messages:<br>
                Apr 10, 2014 2:21:40 PM
                org.apache.catalina.core.StandardContext startInternal<br>
                INFO: Deploying web application archive
/opt/tomcat/tomcat7/webapps/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0.war<br>
                Apr 10, 2014 2:21:40 PM
                org.apache.catalina.core.StandardContext startInternal<br>
                SEVERE: Error listenerStart<br>
                Apr 10, 2014 2:21:40 PM
                org.apache.catalina.core.StandardContext startInternal<br>
                S</font><font face="Times New Roman, Times, serif">EVERE:
                Context
                [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0]
                startup failed due to previous errors<br>
                Apr 10, 2014 2:21:40 PM
                org.apache.catalina.loader.WebappClassLoader
                clearReferencesThreads<br>
                SEVERE: The web application
                [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0]
                appears to have started a thread named [pool-4-thread-1]
                but has failed to stop it. This is very likely to create
                a memory leak.<br>
                Apr 10, 2014 2:21:40 PM
                org.apache.catalina.loader.WebappClassLoader
                clearReferencesThreads<br>
                SEVERE: The web application
                [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0]
                appears to have started a thread named [Thread-3] but
                has failed to stop it. This is very likely to create a
                memory leak.<br>
                Apr 10, 2014 2:21:40 PM
                org.apache.catalina.loader.WebappClassLoader
                clearReferencesThreads<br>
                SEVERE: The web application
                [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0]
                appears to have started a thread named [pool-7-thread-1]
                but has failed to stop it. This is very likely to create
                a memory leak.<br>
                Apr 10, 2014 2:21:40 PM
                org.apache.catalina.loader.WebappClassLoader
                clearReferencesThreads<br>
                SEVERE: The web application
                [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0]
                appears to have started a thread named
                [Git-Daemon-Accept] but has failed to stop it. This is
                very likely to create a memory leak.<br>
                Apr 10, 2014 2:21:40 PM
                org.apache.catalina.loader.WebappClassLoader
                checkThreadLocalMapForLeaks<br>
                SEVERE: The web application
                [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0]
                created a ThreadLocal with key of type
                [org.jboss.errai.config.util.ClassScanner$1] (value
                [org.jboss.errai.config.util.ClassScanner$1@1b3870a5])
                and a value of type [java.lang.Boolean] (value [true])
                but failed to remove it when the web application was
                stopped. Threads are going to be renewed over time to
                try and avoid a probable memory leak.<br>
                Apr 10, 2014 2:21:40 PM
                org.apache.catalina.loader.WebappClassLoader
                checkThreadLocalMapForLeaks<br>
                SEVERE: The web application
                [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0]
                created a ThreadLocal with key of type
                [org.jboss.solder.servlet.beanManager.ServletContextAttributeProvider$1]
                (value
                [org.jboss.solder.servlet.beanManager.ServletContextAttributeProvider$1@166b6e99])

                and a value of type
                [org.apache.catalina.core.ApplicationContextFacade]
                (value
                [org.apache.catalina.core.ApplicationContextFacade@672a0a4e])
                but failed to remove it when the web application was
                stopped. Threads are going to be renewed over time to
                try and avoid a probable memory leak.<br>
                Apr 10, 2014 2:21:40 PM
                org.apache.catalina.loader.WebappClassLoader
                checkThreadLocalMapForLeaks<br>
                SEVERE: The web application
                [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0]
                created a ThreadLocal with key of type
                [org.eclipse.jgit.nls.NLS$1] (value
                [org.eclipse.jgit.nls.NLS$1@790abbcb]) and a value of
                type [org.eclipse.jgit.nls.NLS] (value
                [org.eclipse.jgit.nls.NLS@2faf4a82]) but failed to
                remove it when the web application was stopped. Threads
                are going to be renewed over time to try and avoid a
                probable memory leak.<br>
                <br>
                 Next I tried building the workbench from source:<br>
              </font><a moz-do-not-send="true"
                href="https://github.com/droolsjbpm/drools-wb/archive/6.0.1.Final.zip"
                target="_blank">https://github.com/droolsjbpm/drools-wb/archive/6.0.1.Final.zip</a><br>
               The maven build worked, and I dropped the tomcat war into
              the tomcat directory (removing any existing webapps and
              wars). Starting Tomcat now produced these errors:<br>
              <font face="Times New Roman, Times, serif"><br>
              </font>INFO: Deploying web application archive
              /opt/tomcat/tomcat7/webapps/drools-workbench-6.0.1.Final-tomcat7.0.war
              2014-04-10 13:46:31,975 [localhost-startStop-1]<br>
              <br>
              ERROR Failed to setup Repository 'uf-playground'
              java.lang.RuntimeException: <a moz-do-not-send="true"
                href="https://github.com/guvnorngtestuser1/guvnorng-playground.git"
                target="_blank">
https://github.com/guvnorngtestuser1/guvnorng-playground.git</a>: cannot
              open git-upload-pack
              <br>
              <br>
              What is the webapp trying to do with Git? Do I need to
              point it at some git repo?<br>
              <br>
              I tried the jboss instructions here:<br>
              <br>
              <a moz-do-not-send="true"
href="http://blog.athico.com/2013/05/how-to-build-and-run-drools-and-guvnor.html"
                target="_blank">http://blog.athico.com/2013/05/how-to-build-and-run-drools-and-guvnor.html</a><br>
              <br>
              But that didn't work either, with Jboss just hanging as
              well.  Any clues on what might be going wrong?<br>
              <br>
              Thanks,<br>
              Ven<br>
            </div>
            <br>
            _______________________________________________<br>
            rules-users mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
            <a moz-do-not-send="true"
              href="https://lists.jboss.org/mailman/listinfo/rules-users"
              target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </body>
</html>