[rules-users] Problems deploying war

Michael Anstis michael.anstis at gmail.com
Tue Apr 15 08:40:07 EDT 2014


If you're using 6.0 (as opposed to 6.1.0-SNAPSHOT) did you also uncomment
the J2EE security section in the web.xml?


On 15 April 2014 13:27, Ven Tadipatri <ven.tadipatri at ll.mit.edu> wrote:

>  I've added the following libraries to the lib folder (I'm assuming you
> mean the Tomcat library, not the webapp-specific WEB-INF/lib folder ):
> -rwxr-xr-x 1 svc-tomcat svc-tomcat   43519 Apr 14 08:38
> javax.security.jacc-api-1.4.jar
> -rwxr-xr-x 1 svc-tomcat svc-tomcat    6992 Apr 14 08:38
> kie-tomcat-integration-6.0.1.Final.jar
> -rwxr-xr-x 1 svc-tomcat svc-tomcat   26084 Apr 14 08:38 slf4j-api-1.7.5.jar
>
> The following lines are in the server.xml:
>           <Host name="localhost"  appBase="webapps"  unpackWARs="true"
> autoDeploy="true">
>
>         <Valve className="org.apache.catalina.valves.AccessLogValve"
> directory="logs"
>                prefix="localhost_access_log." suffix=".txt"
>                pattern="%h %l %u %t &quot;%r&quot; %s %b" />
>
>         <Valve className="org.kie.integration.tomcat.JACCValve" />
>     </Host>
>
> There doesn't seem to be any log output when the login fails. It just
> brings me back to the same url:
>
> http://localhost:8080/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0/org.kie.workbench.drools.KIEDroolsWebapp/j_security_check
> Any ideas?
>
> Thanks,
> Ven
>
>
>
> On 04/14/2014 11:50 AM, Michael Anstis wrote:
>
> You'll need to add the additional libraries to /lib and configure Catalina
> with the additional "Valve", as described in previous emails.
>
>  These configure Tomcat to use the tomcat-users.xml file.
>
>
> On 14 April 2014 14:36, Ven Tadipatri <ven.tadipatri at ll.mit.edu> wrote:
>
>>  You're right - I'm getting closer :)
>> Now, the
>> http://localhost:8080/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0/url comes up, but when I try to log in with the user and password in my
>> tomcat-users.xml file, it doesn't log me in.
>>
>> I was able to bring up the main page both with the binary distribution
>> (which came up with a KIE IDE logo) and the one I built with maven from
>> sources
>> (which came up with a UF logo). The login page looked identical except
>> for the logo.
>>
>> This is what my tomcat-users.xml file looks like:
>> <role rolename="analyst"/>
>>   <role rolename="admin"/>
>>   <user username="guest" password="****" roles="analyst,admin"/>
>>   <user username="admin" password="****" roles="analyst,admin"/>
>>
>> (The password has been starred out in this e-mail)
>> The only change I made to the war was
>>  mv org.uberfire.security.auth.AuthenticationSource-TOMCAT-JEE-SECURITY
>> org.uberfire.security.auth.AuthenticationSource
>>
>> Is there something I have to do with the login.config or realm.properties?
>>
>> Thanks,
>> Ven
>>
>>
>> On 04/14/2014 09:17 AM, Michael Anstis wrote:
>>
>> You're almost there by the look of it!!!
>>
>>  I replied to your other questions about why the workbench is trying to
>> access git.. you can disable this and then you shouldn't get the error you
>> paste (I assume you can't access github.com from where you're trying to
>> deploy).
>>
>>  The JBoss AS7 WAR works "out of the box".. no need to configure
>> anything extra, or download any WARs :)
>>
>>  I would encourage you to delete .niogit folder in /bin when trying to
>> deploy (if you had errors before).
>>
>>  .niogit is where the workbench stores it's configuration and any
>> downloaded git repositories.
>>
>>
>> On 14 April 2014 14:14, Ven Tadipatri <ven.tadipatri at ll.mit.edu> wrote:
>>
>>>  I'm not quite sure why it's so challenging to get the war deployed
>>> with Tomcat. Is it easier to deploy the war with Jboss?
>>> These are the exceptions I'm getting, even after adding
>>> "-Dorg.kie.demo=false" to the CATALINA_OPTS in catalina.sh
>>> I want to disable the access to remote git repos.
>>>
>>> INFO: Deploying web application archive
>>> /opt/tomcat/tomcat7/webapps/drools-workbench-6.0.1.Final-tomcat7.0.war
>>>  2014-04-14 09:04:23,985 [localhost-startStop-1] INFO  Found kmodule:
>>> jar:file:/opt/tomcat/tomcat7/webapps/drools-workbench-6.0.1.Final-tomcat7.0/WEB-INF/lib/drools-wb-rest-defaultapprover-6.0.1.Final.jar!/META-INF/kmodule.xml
>>> 2014-04-14 09:04:24,036 [localhost-startStop-1] INFO  KieModule was
>>> added:ZipKieModule[
>>> ReleaseId=org.drools:drools-wb-rest-defaultapprover:6.0.1.Finalfile=/opt/tomcat/tomcat7/webapps/drools-workbench-6.0.1.Final-tomcat7.0/WEB-INF/lib/drools-wb-rest-defaultapprover-6.0.1.Final.jar]
>>> 2014-04-14 09:04:24,036 [localhost-startStop-1] INFO  Found kmodule:
>>> jar:file:/opt/tomcat/tomcat7/webapps/drools-workbench-6.0.1.Final-tomcat7.0/WEB-INF/lib/drools-wb-rest-defaultapprover-6.0.1.Final.jar!/META-INF/kmodule.xml
>>> 2014-04-14 09:04:24,039 [localhost-startStop-1] INFO  KieModule was
>>> added:ZipKieModule[
>>> ReleaseId=org.drools:drools-wb-rest-defaultapprover:6.0.1.Finalfile=/opt/tomcat/tomcat7/webapps/drools-workbench-6.0.1.Final-tomcat7.0/WEB-INF/lib/drools-wb-rest-defaultapprover-6.0.1.Final.jar]
>>> 2014-04-14 09:07:36,460 [localhost-startStop-1] ERROR Failed to setup
>>> Repository 'uf-playground'
>>>
>>> java.lang.RuntimeException:
>>> https://github.com/guvnorngtestuser1/guvnorng-playground.git: cannot
>>> open git-upload-pack
>>>          at
>>> org.uberfire.backend.server.repositories.git.GitRepositoryFactoryHelper.newRepository(GitRepositoryFactoryHelper.java:80)
>>> ~[uberfire-backend-server-0.3.1.Final.jar:0.3.1.Final]
>>>         at
>>> org.uberfire.backend.server.repositories.git.GitRepositoryFactoryHelper$Proxy$_$$_WeldClientProxy.newRepository(GitRepositoryFactoryHelper$Proxy$_$$_WeldClientProxy.java)
>>> ~[uberfire-backend-server-0.3.1.Final.jar:0.3.1.Final]
>>>
>>>
>>> Thanks,
>>> Ven
>>>
>>>
>>> On 04/14/2014 08:57 AM, Michael Anstis wrote:
>>>
>>> If apply the additional configuration you are telling Tomcat to use
>>> Users defined in <tomcat_install_folder>/conf/tomcat-users.xml
>>>
>>>  I modified the WAR by unzipping it, modifying the relevant files and
>>> then zipping it back into a WAR before deploying.
>>>
>>>
>>> On 14 April 2014 13:53, Ven Tadipatri <ven.tadipatri at ll.mit.edu> wrote:
>>>
>>>>  Hi Michael,
>>>>    Unfortunately I can't seem to get the 6.0.1 version up and running.
>>>> I followed the steps below, finding the 3 jars listed below online.
>>>> But still, Tomcat just hangs for a bit, then throws a bunch of severe
>>>> warnings. There don't seem to be any log messages describing the problem.
>>>> Also, I'm a bit confused by the directions - how can we modify the
>>>> WEB-INF directory before the war is deployed? And how do we define users
>>>> in the login.config file?
>>>>
>>>>
>>>> Thanks,
>>>> Ven
>>>>
>>>> On 04/11/2014 10:49 AM, Michael Anstis wrote:
>>>>
>>>> Hi,
>>>>
>>>>  There have been a few people with Tomcat deployment issues for
>>>> kie-drools-wb, so I thought I'd give it a try.
>>>>
>>>>  These are the steps I followed for *successful* deployment (most of
>>>> which is already documented, but not obvious, in the WAR's README.txt
>>>> file):-
>>>>
>>>>  *6.0.1*
>>>>
>>>>  Starting with a clean install of Tomcat 7.
>>>>
>>>>  1. Copy "kie-tomcat-integration" JAR into TOMCAT_HOME/lib
>>>> (org.kie:kie-tomcat-integration)
>>>> 2. Copy "JACC" JAR into TOMCAT_HOME/lib(javax.security.jacc:artifactId=javax.security.jacc-api in JBoss Maven
>>>> Repository)
>>>> 3. Copy "slf4j-api" JAR into TOMCAT_HOME/lib(org.slf4j:artifactId=slf4j-api in JBoss Maven Repository)
>>>> 4. Add valve configuration into TOMCAT_HOME/conf/server.xml inside
>>>> <Host> element as last valve definition:
>>>>
>>>>     <Valve className="org.kie.integration.tomcat.JACCValve" />
>>>>
>>>>  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
>>>>  6. Delete org.uberfire.security.auth.AuthenticationSource inside
>>>> WEB-INF/classes/META-INF/services
>>>> 7. Rename
>>>> org.uberfire.security.auth.AuthenticationSource-TOMCAT-JEE-SECURITY to
>>>> org.uberfire.security.auth.AuthenticationSource inside
>>>> WEB-INF/classes/META-INF/services
>>>> 8. Increase Java's PermGen space by adding file TOMCAT_HOME/bin/
>>>> setenv.sh containing export JAVA_OPTS="-Xmx1024m -XX:MaxPermSize=256m"
>>>>  9. Start Tomcat with TOMCAT_HOME/bin/startup.sh
>>>>  10. Go to Management Console, http://localhost:8080/management
>>>> 11. Deploy modified WAR
>>>>
>>>>  If you do not complete these steps the WAR works "out of the box" but
>>>> you'll need to define Users in WEB-INF/classes/login.config
>>>>
>>>>  *6.1.0-SNAPSHOT*
>>>>
>>>>  Starting with a clean install of Tomcat 7.
>>>>
>>>>  1. Copy "kie-tomcat-integration" JAR into TOMCAT_HOME/lib
>>>> (org.kie:kie-tomcat-integration)
>>>> 2. Copy "JACC" JAR into TOMCAT_HOME/lib
>>>> (javax.security.jacc:artifactId=javax.security.jacc-api in JBoss Maven
>>>> Repository)
>>>> 3. Copy "slf4j-api" JAR into TOMCAT_HOME/lib
>>>> (org.slf4j:artifactId=slf4j-api in JBoss Maven Repository)
>>>> 4. Add valve configuration into TOMCAT_HOME/conf/server.xml inside Host
>>>> element as last valve definition:
>>>>
>>>>     <Valve className="org.kie.integration.tomcat.JACCValve" />
>>>>
>>>>  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
>>>>  6. Start Tomcat with TOMCAT_HOME/bin/startup.sh
>>>>  7. Go to Management Console, http://localhost:8080/management
>>>> 8. Deploy modified WAR
>>>>
>>>>  With kind regards,
>>>>
>>>>  Mike
>>>>
>>>>
>>>>
>>>>
>>>> On 10 April 2014 19:25, Ven Tadipatri <ven.tadipatri at ll.mit.edu> wrote:
>>>>
>>>>> Hi,
>>>>>   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
>>>>> to manage and view rules, I was interested in getting that working as
>>>>> well. Unfortunately I haven't had much success with that.
>>>>>   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
>>>>> into my Tomcat directory.  Tomcat was just hanging for a while, then
>>>>> spit out a bunch of error messages:
>>>>> Apr 10, 2014 2:21:40 PM org.apache.catalina.core.StandardContext
>>>>> startInternal
>>>>> INFO: Deploying web application archive
>>>>> /opt/tomcat/tomcat7/webapps/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0.war
>>>>> Apr 10, 2014 2:21:40 PM org.apache.catalina.core.StandardContext
>>>>> startInternal
>>>>> SEVERE: Error listenerStart
>>>>> Apr 10, 2014 2:21:40 PM org.apache.catalina.core.StandardContext
>>>>> startInternal
>>>>> SEVERE: Context
>>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] startup failed due
>>>>> to previous errors
>>>>> Apr 10, 2014 2:21:40 PM org.apache.catalina.loader.WebappClassLoader
>>>>> clearReferencesThreads
>>>>> 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.
>>>>> Apr 10, 2014 2:21:40 PM org.apache.catalina.loader.WebappClassLoader
>>>>> clearReferencesThreads
>>>>> 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.
>>>>> Apr 10, 2014 2:21:40 PM org.apache.catalina.loader.WebappClassLoader
>>>>> clearReferencesThreads
>>>>> 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.
>>>>> Apr 10, 2014 2:21:40 PM org.apache.catalina.loader.WebappClassLoader
>>>>> clearReferencesThreads
>>>>> 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.
>>>>> Apr 10, 2014 2:21:40 PM org.apache.catalina.loader.WebappClassLoader
>>>>> checkThreadLocalMapForLeaks
>>>>> 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 at 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.
>>>>> Apr 10, 2014 2:21:40 PM org.apache.catalina.loader.WebappClassLoader
>>>>> checkThreadLocalMapForLeaks
>>>>> 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 at 166b6e99])
>>>>> and a value of type [org.apache.catalina.core.ApplicationContextFacade]
>>>>> (value [org.apache.catalina.core.ApplicationContextFacade at 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.
>>>>> Apr 10, 2014 2:21:40 PM org.apache.catalina.loader.WebappClassLoader
>>>>> checkThreadLocalMapForLeaks
>>>>> 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 at 790abbcb]) and a value of type
>>>>> [org.eclipse.jgit.nls.NLS] (value [org.eclipse.jgit.nls.NLS at 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.
>>>>>
>>>>>  Next I tried building the workbench from source:
>>>>> https://github.com/droolsjbpm/drools-wb/archive/6.0.1.Final.zip
>>>>>  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:
>>>>>
>>>>> 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]
>>>>>
>>>>> ERROR Failed to setup Repository 'uf-playground'
>>>>> java.lang.RuntimeException:
>>>>> https://github.com/guvnorngtestuser1/guvnorng-playground.git: cannot
>>>>> open git-upload-pack
>>>>>
>>>>> What is the webapp trying to do with Git? Do I need to point it at
>>>>> some git repo?
>>>>>
>>>>> I tried the jboss instructions here:
>>>>>
>>>>>
>>>>> http://blog.athico.com/2013/05/how-to-build-and-run-drools-and-guvnor.html
>>>>>
>>>>> But that didn't work either, with Jboss just hanging as well.  Any
>>>>> clues on what might be going wrong?
>>>>>
>>>>> Thanks,
>>>>> Ven
>>>>>
>>>>> _______________________________________________
>>>>> rules-users mailing list
>>>>> rules-users at lists.jboss.org
>>>>> https://lists.jboss.org/mailman/listinfo/rules-users
>>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> rules-users mailing list
>>>> rules-users at lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/rules-users
>>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> rules-users mailing listrules-users at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-users
>>>
>>>
>>>
>>> _______________________________________________
>>> rules-users mailing list
>>> rules-users at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/rules-users
>>>
>>
>>
>>
>> _______________________________________________
>> rules-users mailing listrules-users at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-users
>>
>>
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>
>
>
> _______________________________________________
> rules-users mailing listrules-users at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-users
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140415/fd68f19b/attachment-0001.html 


More information about the rules-users mailing list