[jboss-user] [JBoss Seam] - Seam security with drools logging not working

andrew.rw.robinson do-not-reply at jboss.com
Fri Jun 22 17:21:23 EDT 2007


I have setup the Drools based security with a Seam project residing on Tomcat 6. I am getting an exception of:

Caused by: java.lang.IllegalArgumentException: The rule called TestRule is not valid. Check for compile errors reported.
(stack)

In the tomcat6/logs/localhost.2007-06-22.log file. None of the log files for tomcat actually contain the compiler error though (including catalina.out where I am sending all tomcat stdout and stderr output).

How can I get the rule compiler error information?

Relevant Environment:
jdk 1.6
tomcat 6
jboss embedded ejb3 configuration files

WEB-INF/lib contents:

  | activation-1.1.jar                 concurrent-1.3.4.jar                    jsf-facelets-1.1.11.jar
  | ajax4jsf-1.1.1.jar                 core-3.2.0.666.jar                      jstl-1.1.2.jar
  | antlr-2.7.6.jar                    dom4j-1.6.1.jar                         jung-1.7.2.jar
  | antlr-3.0ea8.jar                   drools-compiler-3.0.5.jar               junit-3.8.1.jar
  | asm-1.5.3.jar                      drools-core-3.0.5.jar                   log4j-1.2.12.jar
  | asm-attrs-1.5.3.jar                ehcache-1.2.4.jar                       logkit-1.0.1.jar
  | avalon-framework-4.1.3.jar         el-api-1.1.11.jar                       mail-1.4.jar
  | cglib-2.1_3.jar                    el-ri-1.1.11.jar                        myfaces-api-1.1.5.jar
  | christws-common-0.0.1.jar          hibernate3-3.2.3.GA.jar                 myfaces-impl-1.1.5.jar
  | colt-1.2.0.jar                     hibernate-annotations-3.2.1.GA.jar      oro-2.0.8.jar
  | commons-beanutils-1.7.0.jar        hibernate-entitymanager-3.2.1.GA.jar    persistence-api-1.0.jar
  | commons-codec-1.3.jar              janino-2.4.3.jar                        poi-2.5.1-final-20040804.jar
  | commons-collections-3.2.jar        javassist-3.4.ga.jar                    postgresql-8.1-407.jdbc3.jar
  | commons-digester-1.8.jar           jboss-ejb3-all-1.2.1.GA.jar             richfaces-3.0.1.jar
  | commons-el-1.0.jar                 jboss-seam-1.2.1.GA.jar                 spring-2.0.1.jar
  | commons-fileupload-1.1.1.jar       jboss-seam-debug-1.2.1.GA.jar           stringtemplate-2.3b6.jar
  | commons-io-1.1.jar                 jboss-seam-mail-1.2.1.GA.jar            tagHandlers-0.9.jar
  | commons-jci-core-1.0.jar           jboss-seam-remoting-1.2.1.GA.jar        tomahawk-1.1.6.jar
  | commons-jci-eclipse-3.2.0.666.jar  jboss-seam-ui-1.2.1.GA.jar              tomahawk-sandbox-1.1.6.jar
  | commons-jci-fam-1.0.jar            jbpm-3.1.4.jar                          trove-1.0.2.jar
  | commons-jci-janino-1.0.jar         jcaptcha-all-1.0-RC-2.0.1.jar           xercesImpl-2.8.1.jar
  | commons-lang-2.2.jar               jenia4faces-1.2.1.jar                   xml-apis-1.0.b2.jar
  | commons-logging-1.1.jar            jgroups-all-2.2.9.1.jar                 xpp3-1.1.3.4.O.jar
  | commons-logging-api-1.0.4.jar      joda-time-1.4.jar                       xstream-1.1.3.jar
  | commons-validator-1.3.1.jar        jsf-comp-facelets-deployment-0.1.1.jar
  | 

Contents of log4j.xml in my war's WEB-INF/classes directory:

  | <?xml version="1.0" encoding="UTF-8"?>
  | <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
  | <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
  |   
  |   <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
  |     <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
  |     <param name="Target" value="System.out"/>
  | 
  |     <layout class="org.apache.log4j.PatternLayout">
  |       <param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{1}] %m%n"/>
  |     </layout>
  |   </appender>
  | 
  |   <root>
  |     <priority value="INFO"/>
  |     <appender-ref ref="CONSOLE"/>
  |   </root>
  |   
  | </log4j:configuration>
  | 

security-rules.drl:

  | package mydomainPermissions;
  | 
  | import java.security.Principal;
  | 
  | import org.jboss.seam.security.PermissionCheck;
  | import org.jboss.seam.security.Role;
  | 
  | rule TestRule
  | 	no-loop
  | 	activation-group "permissions"
  | when
  | 	check: PermissionCheck(name == "test", action == "test", granted == false)
  | 	Role(name == "user")
  | then
  | 	check.grant();
  | end;
  | 
Any Ideas?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057029#4057029

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057029



More information about the jboss-user mailing list