-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hello im getting this error, my spring-security is:
<global-method-security pre-post-annotations="enabled" />
<http auto-config="true"
use-expressions ="true"
access-denied-page="/AccesoDenegado.xhtml">
<!-- Se definen los dos perfiles y se interceptan las paginas para realizar la autenticacion -->
<intercept-url pattern="/page1**" access="ROLE_PROFE"/>
<intercept-url pattern="/page2**" access="ROLE_ALUMNO" />
<!--Se define una pagina de login personalizada, no a que viene por defecto-->
<form-login
login-processing-url="/j_spring_security_check"
login-page="/login.xhtml"
authentication-failure-url="/login" />
<!-- Cerrar Sesion-->
<logout invalidate-session="true" delete-cookies="JSESSIONID" logout-success-url="/" logout-url="/logout" />
</http>
<authentication-manager>
<authentication-provider>
<jdbc-user-service data-source-ref="dataSource"
users-by-username-query=
"select usuario,contraseña, habilitado from tabla_usuarios where usuario=?"
authorities-by-username-query=
"select usuario, rol from roles where usuario =? " />
</authentication-provider>
</authentication-manager>
</beans:beans>
my Aplication Context
<import resource="classes/com/mkyong/customer/spring/DataSource.xml"/>
<import resource="classes/com/mkyong/customer/spring/HibernateSessionFactory.xml"/>
<!-- Beans Declaration -->
<import resource="classes/com/mkyong/customer/spring/CustomerBean.xml"/>
</beans> My hibernate session factory
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource"/>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
<prop key="hibernate.show_sql">true</prop>
</props>
</property>
<property name="mappingResources">
<list>
<value>com/mkyong/customer/hibernate/Customer.hbm.xml</value>
</list>
</property>
</bean> </beans> my dataSource bean
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="location"> <value>WEB-INF/classes/config/database/db.properties</value> </property> </bean>
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="${jdbc.driverClassName}"/> <property name="url" value="${jdbc.url}"/> <property name="username" value="${jdbc.username}"/> <property name="password" value="${jdbc.password}"/> </bean>
</beans>
and my customer bean
<bean id="customerBo"
class="customer.bo.impl.CustomerBoImpl" >
<property name="customerDao" ref="customerDao" />
</bean>
<bean id="customerDao"
class="customer.dao.impl.CustomerDaoImpl" >
<property name="sessionFactory" ref="sessionFactory"></property>
</bean>
</beans>
when i use autentication without hibernate works fine, but when i integrate them, i get that error.. any idea why??
Show us your web.xml please
Asked: 2014-08-01 14:31:32 +0800
Seen: 10 times
Last updated: Aug 04 '14
where to put @Transactional (Hibernate Spring)
How to configure quartz to use Hibernate in Zk app? [closed]
zk hibernate session per conversation
Is ZK compatible with hibernate 4.0
use Hibernate standard methods to manage Sessions ??
ZK + Hibernate validation using JSR
a little more stacktrace would be helpfull (caused by ......)
chillworld ( 2014-08-01 15:30:45 +0800 )edit