Announcement Announcement Module
Collapse
No announcement yet.
Error creating bean with name 'httpSessionContextIntegration Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error creating bean with name 'httpSessionContextIntegration

    I'm having problems to start the bean "httpSessionContextIntegration"

    Here is the consoleOutput after starting JBoss. The erros occurs while deploying my application.

    Code:
    10:42:35,203 INFO  [DefaultListableBeanFactory] Creating shared instance of singleton bean 'filterChainProxy'
    10:42:35,296 INFO  [DefaultListableBeanFactory] Creating shared instance of singleton bean 'filterInvocationInterceptor'
    10:42:35,328 INFO  [DefaultListableBeanFactory] Creating shared instance of singleton bean 'authenticationManager'
    10:42:35,359 INFO  [DefaultListableBeanFactory] Creating shared instance of singleton bean 'daoAuthenticationProvider'
    10:42:35,375 INFO  [DefaultListableBeanFactory] Creating shared instance of singleton bean 'jdbcAuthenticationDao'
    10:42:35,453 INFO  [SQLErrorCodesFactory] SQL error codes for 'SAP DB' not found
    10:42:35,468 INFO  [SQLErrorCodesFactory] SQL error codes for 'SAP DB' not found
    10:42:35,468 INFO  [SQLErrorCodesFactory] SQL error codes for 'SAP DB' not found
    10:42:35,468 INFO  [DefaultListableBeanFactory] Creating shared instance of singleton bean 'userCache'
    10:42:35,500 INFO  [EhCacheManagerFactoryBean] Creating EHCache CacheManager
    10:42:35,500 INFO  [EhCacheFactoryBean] Creating new EHCache cache region 'userCache'
    10:42:35,531 INFO  [DefaultListableBeanFactory] Creating shared instance of singleton bean 'anonymousAuthenticationProvider'
    10:42:35,531 INFO  [DefaultListableBeanFactory] Creating shared instance of singleton bean 'accessDecisionManager'
    10:42:35,562 INFO  [DefaultListableBeanFactory] Creating shared instance of singleton bean 'roleVoter'
    10:42:35,578 INFO  [AbstractSecurityInterceptor] Validated configuration attributes
    10:42:35,578 INFO  [DefaultListableBeanFactory] Creating shared instance of singleton bean 'httpSessionContextIntegrationFilter'
    10:42:35,593 INFO  [DefaultListableBeanFactory] Destroying singletons in factory {org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [lookupManager,txProxyTemplate,manager,userManager,roleManager,mailEngine,mailSender,velocityEngine,mailMessage,filterChainProxy,filterInvocationInterceptor,authenticationManager,loggerListener,daoAuthenticationProvider,jdbcAuthenticationDao,userCache,anonymousAuthenticationProvider,roleVoter,accessDecisionManager,httpSessionContextIntegrationFilter,authenticationProcessingFilter,anonymousProcessingFilter,securityEnforcementFilter,remoteUserFilter,authenticationProcessingFilterEntryPoint,clientManager,orgUnitManager,locationManager,contactManager,shopManager,projectManager,serviceManager,serviceGroupManager,serviceTemplateManager,activityManager,rndOrderManager,relationTypeManager,ProviderManager,EmployeeManager,EquipmentManager,propertyConfigurer,dataSource,sessionFactory,transactionManager,dao,lookupDAO,userDAO,roleDAO,clientDAO,orgUnitDAO,locationDAO,shopDAO,contactDAO,serviceDAO,serviceGroupDAO,serviceTemplateDAO,projectDAO,activityDAO,rndOrderDAO,relationTypeDAO,providerDAO,employeeDAO,equipmentDAO]; root of BeanFactory hierarchy}
    10:42:35,593 INFO  [LocalSessionFactoryBean] Closing Hibernate SessionFactory
    10:42:35,593 INFO  [SessionFactoryImpl] closing
    10:42:35,593 INFO  [DefaultListableBeanFactory] Destroying inner beans in factory {org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [lookupManager,txProxyTemplate,manager,userManager,roleManager,mailEngine,mailSender,velocityEngine,mailMessage,filterChainProxy,filterInvocationInterceptor,authenticationManager,loggerListener,daoAuthenticationProvider,jdbcAuthenticationDao,userCache,anonymousAuthenticationProvider,roleVoter,accessDecisionManager,httpSessionContextIntegrationFilter,authenticationProcessingFilter,anonymousProcessingFilter,securityEnforcementFilter,remoteUserFilter,authenticationProcessingFilterEntryPoint,clientManager,orgUnitManager,locationManager,contactManager,shopManager,projectManager,serviceManager,serviceGroupManager,serviceTemplateManager,activityManager,rndOrderManager,relationTypeManager,ProviderManager,EmployeeManager,EquipmentManager,propertyConfigurer,dataSource,sessionFactory,transactionManager,dao,lookupDAO,userDAO,roleDAO,clientDAO,orgUnitDAO,locationDAO,shopDAO,contactDAO,serviceDAO,serviceGroupDAO,serviceTemplateDAO,projectDAO,activityDAO,rndOrderDAO,relationTypeDAO,providerDAO,employeeDAO,equipmentDAO]; root of BeanFactory hierarchy}
    10:42:35,593 INFO  [EhCacheManagerFactoryBean] Shutting down EHCache CacheManager
    10:42:35,593 WARN  [CacheManager] CacheManager already shutdown
    10:42:35,593 ERROR [ContextLoader] Context initialization failed
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'httpSessionContextIntegrationFilter' defined in ServletContext resource [/WEB-INF/applicationContext-security.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyAccessExceptionsException: PropertyAccessExceptionsException (1 errors); nested propertyAccessExceptions are: [org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String] to required type [java.lang.Class] for property 'context'; nested exception is java.lang.IllegalArgumentException: Invalid class name: 
    				net/sf/acegisecurity/context/security/SecureContextImpl
    			]
    PropertyAccessExceptionsException (1 errors)
    org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String] to required type [java.lang.Class] for property 'context'; nested exception is java.lang.IllegalArgumentException: Invalid class name: 
    				net/sf/acegisecurity/context/security/SecureContextImpl
    			
    java.lang.IllegalArgumentException: Invalid class name: 
    				net/sf/acegisecurity/context/security/SecureContextImpl
    That's my application-security.xml

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
        "http&#58;//www.springframework.org/dtd/spring-beans.dtd">
    
    <beans>
    
    	<!-- ======================== FILTER CHAIN ======================= -->
    	<bean id="filterChainProxy"
    		class="net.sf.acegisecurity.util.FilterChainProxy">
    		<property name="filterInvocationDefinitionSource">
    			<value>
    				CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
    				PATTERN_TYPE_APACHE_ANT
    				/j_security_check*=httpSessionContextIntegrationFilter,authenticationProcessingFilter
    				/*.html*=httpSessionContextIntegrationFilter,remoteUserFilter,anonymousProcessingFilter,securityEnforcementFilter
    				/logout.jsp=httpSessionContextIntegrationFilter,remoteUserFilter
    			</value>
    		</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 &#40;ie a/b/c/d.*&#41; expressions first, with LEAST SPECIFIC &#40;ie a/.*&#41; expressions last -->
    	<bean id="filterInvocationInterceptor"
    		class="net.sf.acegisecurity.intercept.web.FilterSecurityInterceptor">
    		<property name="authenticationManager">
    			<ref local="authenticationManager" />
    		</property>
    		<property name="accessDecisionManager">
    			<ref local="accessDecisionManager" />
    		</property>
    		<property name="objectDefinitionSource">
    			<value>
    				CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
    				PATTERN_TYPE_APACHE_ANT
    				/signup.html=ROLE_ANONYMOUS,admin,tomcat
    				/passwordhint.html*=ROLE_ANONYMOUS,admin,tomcat
    				/*.html*=admin,tomcat
    			</value>
    		</property>
    	</bean>
    
    	<bean id="authenticationManager"
    		class="net.sf.acegisecurity.providers.ProviderManager">
    		<property name="providers">
    			<list>
    				<ref local="daoAuthenticationProvider" />
    				<ref local="anonymousAuthenticationProvider" />
    			</list>
    		</property>
    	</bean>
    
    	<!-- Automatically receives AuthenticationEvent messages from DaoAuthenticationProvider -->
    	<bean id="loggerListener"
    		class="net.sf.acegisecurity.providers.dao.event.LoggerListener" />
    
    	<bean id="daoAuthenticationProvider"
    		class="net.sf.acegisecurity.providers.dao.DaoAuthenticationProvider">
    		<property name="authenticationDao">
    			<ref local="jdbcAuthenticationDao" />
    		</property>
    		<property name="userCache">
    			<ref local="userCache" />
    		</property>
    	</bean>
    
    	<!-- Read users from database -->
    	<bean id="jdbcAuthenticationDao"
    		class="net.sf.acegisecurity.providers.dao.jdbc.JdbcDaoImpl">
    		<property name="dataSource">
    			<ref bean="dataSource" />
    		</property>
    		<property name="usersByUsernameQuery">
    			<value>
    				SELECT username,password,enabled FROM user WHERE
    				username = ?
    			</value>
    		</property>
    		<property name="authoritiesByUsernameQuery">
    			<value>
    				SELECT username,role_name FROM rel_user_role WHERE username
    				= ?
    			</value>
    		</property>
    	</bean>
    
    	<bean id="userCache"
    		class="net.sf.acegisecurity.providers.dao.cache.EhCacheBasedUserCache">
    		<property name="cache">
    			<bean
    				class="org.springframework.cache.ehcache.EhCacheFactoryBean">
    				<property name="cacheManager">
    					<bean
    						class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" />
    				</property>
    				<property name="cacheName">
    					<value>userCache</value>
    				</property>
    			</bean>
    		</property>
    	</bean>
    
    	<bean id="anonymousAuthenticationProvider"
    		class="net.sf.acegisecurity.providers.anonymous.AnonymousAuthenticationProvider">
    		<property name="key">
    			<value>anonymous</value>
    		</property>
    	</bean>
    
    	<bean id="roleVoter" class="net.sf.acegisecurity.vote.RoleVoter">
    		<property name="rolePrefix">
    			<value />
    		</property>
    	</bean>
    
    	<bean id="accessDecisionManager"
    		class="net.sf.acegisecurity.vote.AffirmativeBased">
    		<property name="allowIfAllAbstainDecisions">
    			<value>false</value>
    		</property>
    		<property name="decisionVoters">
    			<list>
    				<ref local="roleVoter" />
    			</list>
    		</property>
    	</bean>
    
    	<!-- ===================== HTTP REQUEST SECURITY ==================== -->
    	<bean id="httpSessionContextIntegrationFilter"
    		class="net.sf.acegisecurity.context.HttpSessionContextIntegrationFilter">
    		<property name="context" >
    			<value>
    				net.sf.acegisecurity.context.security.SecureContextImpl
    			</value>
    		</property>
    	</bean>
    
    	<bean id="authenticationProcessingFilter"
    		class="net.sf.acegisecurity.ui.webapp.AuthenticationProcessingFilter">
    		<property name="authenticationManager">
    			<ref local="authenticationManager" />
    		</property>
    		<property name="authenticationFailureUrl">
    			<value>/login.jsp?error=true</value>
    		</property>
    		<property name="defaultTargetUrl">
    			<value>/</value>
    		</property>
    		<property name="filterProcessesUrl">
    			<value>/j_security_check</value>
    		</property>
    	</bean>
    
    	<bean id="anonymousProcessingFilter"
    		class="net.sf.acegisecurity.providers.anonymous.AnonymousProcessingFilter">
    		<property name="key">
    			<value>anonymous</value>
    		</property>
    		<property name="userAttribute">
    			<value>anonymous,ROLE_ANONYMOUS</value>
    		</property>
    	</bean>
    
    	<bean id="securityEnforcementFilter"
    		class="net.sf.acegisecurity.intercept.web.SecurityEnforcementFilter">
    		<property name="filterSecurityInterceptor">
    			<ref local="filterInvocationInterceptor" />
    		</property>
    		<property name="authenticationEntryPoint">
    			<ref local="authenticationProcessingFilterEntryPoint" />
    		</property>
    	</bean>
    
    	<bean id="remoteUserFilter"
    		class="net.sf.acegisecurity.wrapper.ContextHolderAwareRequestFilter" />
    
    	<bean id="authenticationProcessingFilterEntryPoint"
    		class="net.sf.acegisecurity.ui.webapp.AuthenticationProcessingFilterEntryPoint">
    		<property name="loginFormUrl">
    			<value>/login.jsp</value>
    		</property>
    		<property name="forceHttps">
    			<value>false</value>
    		</property>
    	</bean>
    </beans>
    It would be nice if you can help me

    cheers

  • #2
    Does your WAR deploy OK on Tomcat? I can see no problem with your configuration of HttpSessionContextIntegrationFilter.

    Comment

    Working...
    X