Hi, I found what was wrong...I had 2 jars of acegi. One under my project/lib and another one under JBossAS/server/defaut/lib. When I remove the one under jboss, it worked.
Thanks Mariella. Mariella wrote: > > > H i, > > I am trying to deploy an appfuse application in JBoss AS 4.0.4 but I am > getting the following error in the console. > > "Bean context must contain at least one bean of type > org.acegisecurity.util.FilterChainProxy" > > I am attaching my web.xml and applicationContext-security.xml. > > Any ideas on what I am making a mistake? > > Thanks! > Mariella. > > > > > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" > "http://www.springframework.org/dtd/spring-beans.dtd"> > > <beans> > > <!-- ======================== FILTER CHAIN ======================= --> > <bean id="filterChainProxy" > class="org.acegisecurity.util.FilterChainProxy"> > <property name="filterInvocationDefinitionSource"> > <value> > CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON > PATTERN_TYPE_APACHE_ANT > > /**=httpSessionContextIntegrationFilter,authenticationProcessingFilter,remoteUserFilter,rememberMeProcessingFilter,anonymousProcessingFilter,exceptionTranslationFilter,filterInvocationInterceptor > </value> > <!-- Put channelProcessingFilter before remoteUserFilter to > turn on SSL switching --> > <!-- It's off by default b/c Canoo WebTest doesn't support SSL > out-of-the-box --> > </property> > </bean> > > <!-- ======================== AUTHENTICATION ======================= > --> > > <!-- Note the order that entries are placed against the > objectDefinitionSource is critical. > The FilterSecurityInterceptor will work from the top of the list > down to the FIRST pattern that matches the request URL. > Accordingly, you should place MOST SPECIFIC (ie a/b/c/d.*) > expressions first, with LEAST SPECIFIC (ie a/.*) expressions last --> > <bean id="filterInvocationInterceptor" > class="org.acegisecurity.intercept.web.FilterSecurityInterceptor"> > <property name="authenticationManager" > ref="authenticationManager"/> > <property name="accessDecisionManager" > ref="accessDecisionManager"/> > <property name="objectDefinitionSource"> > <value> > PATTERN_TYPE_APACHE_ANT > /signup.html=ROLE_ANONYMOUS,admin,user > /passwordHint.html*=ROLE_ANONYMOUS,admin,user > /**/*.html*=admin,user > /clickstreams.jsp=admin > </value> > </property> > </bean> > > <bean id="authenticationManager" > class="org.acegisecurity.providers.ProviderManager"> > <property name="providers"> > <list> > <ref local="daoAuthenticationProvider"/> > <ref local="anonymousAuthenticationProvider"/> > <ref local="rememberMeAuthenticationProvider"/> > </list> > </property> > </bean> > > <!-- Log failed authentication attempts to commons-logging --> > <bean id="loggerListener" > class="org.acegisecurity.event.authentication.LoggerListener"/> > > <bean id="daoAuthenticationProvider" > class="org.acegisecurity.providers.dao.DaoAuthenticationProvider"> > <property name="userDetailsService" ref="userDao"/> > <property name="userCache" ref="userCache"/> > <property name="passwordEncoder" ref="passwordEncoder"/> > </bean> > > <!-- This bean definition must be available to > ApplicationContext.getBean() so StartupListener > can look for it and detect if password encryption is turned on or > not --> > <bean id="passwordEncoder" > class="org.acegisecurity.providers.encoding.ShaPasswordEncoder"/> > > <bean id="anonymousAuthenticationProvider" > class="org.acegisecurity.providers.anonymous.AnonymousAuthenticationProvider"> > <property name="key" value="anonymous"/> > </bean> > > <bean id="roleVoter" class="org.acegisecurity.vote.RoleVoter"> > <property name="rolePrefix" value=""/> > </bean> > > <bean id="accessDecisionManager" > class="org.acegisecurity.vote.AffirmativeBased"> > <property name="allowIfAllAbstainDecisions" value="false"/> > <property name="decisionVoters"> > <list> > <ref local="roleVoter"/> > </list> > </property> > </bean> > > <!-- ===================== HTTP REQUEST SECURITY ==================== > --> > <bean id="httpSessionContextIntegrationFilter" > class="org.acegisecurity.context.HttpSessionContextIntegrationFilter"/> > > <bean id="authenticationProcessingFilter" > class="org.acegisecurity.ui.webapp.AuthenticationProcessingFilter"> > <property name="authenticationManager" > ref="authenticationManager"/> > <property name="authenticationFailureUrl" > value="/login.jsp?error=true"/> > <property name="defaultTargetUrl" value="/"/> > <property name="filterProcessesUrl" value="/j_security_check"/> > <property name="rememberMeServices" ref="rememberMeServices"/> > </bean> > > <bean id="anonymousProcessingFilter" > class="org.acegisecurity.providers.anonymous.AnonymousProcessingFilter"> > <property name="key" value="anonymous"/> > <property name="userAttribute" value="anonymous,ROLE_ANONYMOUS"/> > </bean> > > <bean id="exceptionTranslationFilter" > class="org.acegisecurity.ui.ExceptionTranslationFilter"> > <property name="authenticationEntryPoint" > ref="authenticationProcessingFilterEntryPoint"/> > </bean> > > <bean id="remoteUserFilter" > class="org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter"/> > > <bean id="authenticationProcessingFilterEntryPoint" > class="org.acegisecurity.ui.webapp.AuthenticationProcessingFilterEntryPoint"> > <property name="loginFormUrl" value="/login.jsp"/> > <property name="forceHttps" value="false"/> > </bean> > > <!-- Override 'userManager' bean definition to add userManagerSecurity > interceptor --> > <bean id="userManager" parent="txProxyTemplate"> > <property name="target"> > <bean > class="com.ge.research.leadradar.service.impl.UserManagerImpl"> > <property name="userDao" ref="userDao"/> > </bean> > </property> > <!-- Override default transaction attributes b/c of > UserExistsException --> > <property name="transactionAttributes"> > <props> > <prop > key="save*">PROPAGATION_REQUIRED,-UserExistsException</prop> > <prop key="remove*">PROPAGATION_REQUIRED</prop> > <prop key="*">PROPAGATION_REQUIRED,readOnly</prop> > </props> > </property> > <property name="preInterceptors"> > <list> > <ref bean="userSecurityInterceptor"/> > <ref bean="userManagerSecurity"/> > </list> > </property> > </bean> > > <bean id="userManagerSecurity" > class="org.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor"> > <property name="authenticationManager" > ref="authenticationManager"/> > <property name="accessDecisionManager" > ref="accessDecisionManager"/> > <property name="objectDefinitionSource"> > <value> > > com.ge.research.leadradar.service.UserManager.getUsers=admin > > com.ge.research.leadradar.service.UserManager.removeUser=admin > </value> > </property> > </bean> > > <!-- ===================== REMEMBER ME ==================== --> > <bean id="rememberMeProcessingFilter" > class="org.acegisecurity.ui.rememberme.RememberMeProcessingFilter"> > <property name="authenticationManager" > ref="authenticationManager"/> > <property name="rememberMeServices" ref="rememberMeServices"/> > </bean> > > <bean id="rememberMeServices" > class="org.acegisecurity.ui.rememberme.TokenBasedRememberMeServices"> > <property name="userDetailsService" ref="userDao"/> > <property name="key" value="appfuseRocks"/> > <property name="parameter" value="rememberMe"/> > </bean> > > <bean id="rememberMeAuthenticationProvider" > class="org.acegisecurity.providers.rememberme.RememberMeAuthenticationProvider"> > > <property name="key" value="appfuseRocks"/> > </bean> > > <!-- ===================== SSL SWITCHING ==================== --> > <bean id="channelProcessingFilter" > class="org.acegisecurity.securechannel.ChannelProcessingFilter"> > <property name="channelDecisionManager" > ref="channelDecisionManager"/> > <property name="filterInvocationDefinitionSource"> > <value> > PATTERN_TYPE_APACHE_ANT > /admin/**=REQUIRES_SECURE_CHANNEL > /login*=REQUIRES_SECURE_CHANNEL > /j_security_check*=REQUIRES_SECURE_CHANNEL > /editProfile.html*=REQUIRES_SECURE_CHANNEL > /signup.html*=REQUIRES_SECURE_CHANNEL > /saveUser.html*=REQUIRES_SECURE_CHANNEL > /**=REQUIRES_INSECURE_CHANNEL > </value> > </property> > </bean> > > <bean id="channelDecisionManager" > class="org.acegisecurity.securechannel.ChannelDecisionManagerImpl"> > <property name="channelProcessors"> > <list> > <bean > class="org.acegisecurity.securechannel.SecureChannelProcessor"/> > <bean > class="org.acegisecurity.securechannel.InsecureChannelProcessor"/> > </list> > </property> > </bean> > </beans> > > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application > 2.3//EN" > "http://java.sun.com/dtd/web-app_2_3.dtd"> > > <web-app> > <display-name>appfuse</display-name> > > <!-- precompiled jsp mappings --> > > <!-- Define the basename for a resource bundle for I18N --> > <context-param> > > <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name> > <param-value>ApplicationResources</param-value> > </context-param> > <!-- Fallback locale if no bundles found for browser's preferred > locale --> > <!-- Force a single locale using param-name > 'javax.servlet.jsp.jstl.fmt.locale' --> > <context-param> > <param-name>javax.servlet.jsp.jstl.fmt.fallbackLocale</param-name> > <param-value>en</param-value> > </context-param> > <!-- Context Configuration locations for Spring XML files --> > <context-param> > <param-name>contextConfigLocation</param-name> > <param-value>/WEB-INF/applicationContext-*.xml</param-value> > </context-param> > > <filter> > <filter-name>securityFilter</filter-name> > > <filter-class>org.acegisecurity.util.FilterToBeanProxy</filter-class> > <init-param> > <param-name>targetClass</param-name> > > <param-value>org.acegisecurity.util.FilterChainProxy</param-value> > </init-param> > </filter> > <filter> > <filter-name>cacheFilter</filter-name> > > <filter-class>com.opensymphony.oscache.web.filter.CacheFilter</filter-class> > </filter> > <filter> > <filter-name>clickstreamFilter</filter-name> > > <filter-class>com.opensymphony.clickstream.ClickstreamFilter</filter-class> > </filter> > <filter> > <filter-name>encodingFilter</filter-name> > > <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> > <init-param> > <param-name>encoding</param-name> > <param-value>UTF-8</param-value> > </init-param> > <init-param> > <param-name>forceEncoding</param-name> > <param-value>true</param-value> > </init-param> > </filter> > <filter> > <filter-name>hibernateFilter</filter-name> > > <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class> > </filter> > <filter> > <filter-name>rewriteFilter</filter-name> > > <filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class> > <init-param> > <param-name>logLevel</param-name> > <param-value>commons</param-value> > </init-param> > </filter> > <filter> > <filter-name>sitemesh</filter-name> > > <filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class> > </filter> > <filter> > <filter-name>exportFilter</filter-name> > > <filter-class>org.displaytag.filter.ResponseOverrideFilter</filter-class> > </filter> > <filter> > <filter-name>compressionFilter</filter-name> > > <filter-class>com.ge.research.leadradar.webapp.filter.GZIPFilter</filter-class> > </filter> > <filter> > <filter-name>localeFilter</filter-name> > > <filter-class>com.ge.research.leadradar.webapp.filter.LocaleFilter</filter-class> > </filter> > > <filter-mapping> > <filter-name>securityFilter</filter-name> > <url-pattern>/j_security_check</url-pattern> > </filter-mapping> > <filter-mapping> > <filter-name>securityFilter</filter-name> > <url-pattern>*.html</url-pattern> > </filter-mapping> > <filter-mapping> > <filter-name>securityFilter</filter-name> > <url-pattern>*.jsp</url-pattern> > </filter-mapping> > > <!-- Commented out for 2 reasons: 1) it's a pain when developing JSPs, > and > 2) it causes the Signup webtest to > fail --> > <!--filter-mapping> > <filter-name>cacheFilter</filter-name> > <url-pattern>*.jsp</url-pattern> > </filter-mapping--> > <filter-mapping> > <filter-name>hibernateFilter</filter-name> > <url-pattern>*.html</url-pattern> > </filter-mapping> > <filter-mapping> > <filter-name>clickstreamFilter</filter-name> > <url-pattern>*.html</url-pattern> > </filter-mapping> > <filter-mapping> > <filter-name>encodingFilter</filter-name> > <url-pattern>*.html</url-pattern> > </filter-mapping> > <filter-mapping> > <filter-name>encodingFilter</filter-name> > <url-pattern>*.jsp</url-pattern> > </filter-mapping> > <filter-mapping> > <filter-name>localeFilter</filter-name> > <url-pattern>*.html</url-pattern> > </filter-mapping> > <filter-mapping> > <filter-name>localeFilter</filter-name> > <url-pattern>*.jsp</url-pattern> > </filter-mapping> > <filter-mapping> > <filter-name>exportFilter</filter-name> > <url-pattern>*.html</url-pattern> > </filter-mapping> > <filter-mapping> > <filter-name>compressionFilter</filter-name> > <url-pattern>*.html</url-pattern> > </filter-mapping> > <filter-mapping> > <filter-name>rewriteFilter</filter-name> > <url-pattern>/*</url-pattern> > <!--dispatcher>REQUEST</dispatcher> > <dispatcher>FORWARD</dispatcher--> > </filter-mapping> > <filter-mapping> > <filter-name>sitemesh</filter-name> > <url-pattern>/*</url-pattern> > <!--dispatcher>REQUEST</dispatcher> > <dispatcher>FORWARD</dispatcher--> > </filter-mapping> > > <listener> > > <listener-class>com.opensymphony.clickstream.ClickstreamListener</listener-class> > </listener> > <listener> > > <listener-class>net.sf.navigator.menu.MenuContextListener</listener-class> > </listener> > <listener> > > <listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class> > </listener> > <listener> > > <listener-class>com.ge.research.leadradar.webapp.listener.StartupListener</listener-class> > </listener> > <listener> > > <listener-class>com.ge.research.leadradar.webapp.listener.UserCounterListener</listener-class> > </listener> > > <servlet> > <servlet-name>action</servlet-name> > > <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> > <load-on-startup>2</load-on-startup> > </servlet> > > <servlet> > <servlet-name>dwr-invoker</servlet-name> > <servlet-class>uk.ltd.getahead.dwr.DWRServlet</servlet-class> > <init-param> > <param-name>debug</param-name> > <param-value>true</param-value> > </init-param> > </servlet> > > <servlet-mapping> > <servlet-name>action</servlet-name> > <url-pattern>/html/*</url-pattern> > </servlet-mapping> > <servlet-mapping> > <servlet-name>action</servlet-name> > <url-pattern>*.html</url-pattern> > </servlet-mapping> > <servlet-mapping> > <servlet-name>dwr-invoker</servlet-name> > <url-pattern>/dwr/*</url-pattern> > </servlet-mapping> > > <session-config> > <session-timeout>10</session-timeout> > </session-config> > > <welcome-file-list> > <welcome-file>index.jsp</welcome-file> > </welcome-file-list> > > <error-page> > <error-code>500</error-code> > <location>/error.jsp</location> > </error-page> > <error-page> > <error-code>400</error-code> > <location>/index.jsp</location> > </error-page> > <error-page> > <error-code>403</error-code> > <location>/403.jsp</location> > </error-page> > <error-page> > <error-code>404</error-code> > <location>/404.jsp</location> > </error-page> > <resource-ref> > <description>DB Connection</description> > <res-ref-name>jdbc/lb03db4</res-ref-name> > <res-type>javax.sql.DataSource</res-type> > <res-auth>Container</res-auth> > </resource-ref> > </web-app> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- View this message in context: http://www.nabble.com/html-search-form-for-hibernate-managed-object-Displaytag-displayed-data---Looking-for-Best-Practices-tf2822969s2369.html#a7899111 Sent from the AppFuse - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
