blz, estou a 2 dias tomando esse erro, não sei mas por onde ir.
meu applicationContext
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:security="http://www.springframework.org/schema/security"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:p="http://www.springframework.org/schema/p"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">
<!-- enabling annotation driven configuration /-->
<context:annotation-config/>
<context:component-scan base-package="br.com.agile2.beinfo.DAO"/>
<tx:annotation-driven transaction-manager="transactionManager"/>
<bean
class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/>
<bean id="dataSourcePG"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="org.postgresql.Driver" />
<property name="url" value="jdbc:postgresql://database.beinfo.agile:5432/foodmart" />
<property name="username" value="root" />
<property name="password" value="root" />
</bean>
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory" />
<qualifier value="transactionManager" />
</bean>
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSourcePG" />
<property name="persistenceXmlLocation" value="classpath:META-INF/persistence.xml" />
<property name="persistenceUnitName" value="saikuPU"></property>
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="showSql" value="false" />
<property name="generateDdl" value="false" />
<property name="databasePlatform" value="org.hibernate.dialect.PostgreSQLDialect" />
</bean>
</property>
<bean id="objetoItemDAO" class="br.com.agile2.beinfo.DAO.ObjetoItemDAO"/>
</bean>
<context:annotation-config />
<security:global-method-security secured-annotations="enabled">
</security:global-method-security>
<!-- BASIC AUTHENTICATION -->
<security:http auto-config='true' access-denied-page="/login.jsp">
<security:intercept-url pattern="/serverdocs/**" access="IS_AUTHENTICATED_ANONYMOUSLY" />
<security:intercept-url pattern="/rest/saiku/session*" access="IS_AUTHENTICATED_ANONYMOUSLY" />
<security:intercept-url pattern="/rest/saiku/session/" access="IS_AUTHENTICATED_ANONYMOUSLY" />
<security:intercept-url pattern="/rest/**" access="IS_AUTHENTICATED_FULLY" />
<security:intercept-url pattern="/json/**" access="IS_AUTHENTICATED_FULLY" />
<security:intercept-url pattern="/**" access="IS_AUTHENTICATED_ANONYMOUSLY" />
<security:logout logout-url="/logout"/>
<security:http-basic/>
</security:http>
<import resource="applicationContext-spring-security.xml"/>
<security:authentication-manager alias="authenticationManager">
<security:authentication-provider user-service-ref='userDetailsService'>
<security:password-encoder ref="passwordEncoder" />
</security:authentication-provider>
</security:authentication-manager>
</beans>
DAO
package br.com.agile2.beinfo.DAO;
import br.com.agile2.beinfo.model.ObjetoItem;
import java.math.BigDecimal;
import java.util.List;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service
public class ObjetoItemDAO extends GenericDAO<ObjetoItem> {
public ObjetoItemDAO() {
super(ObjetoItem.class);
}
@PersistenceContext(unitName="saikuPU")
private EntityManager entityManager;
@Transactional
public List<ObjetoItem> findAllByUsuario(BigDecimal idUsuario){
List<ObjetoItem> entityList = entityManager.createNamedQuery("ObjetoItem.findByUsuario", ObjetoItem.class)
.setParameter("idUsuario", idUsuario)
.getResultList();
this.closeTransaction();
return entityList;
}
}