NullPointerException thrown from EntityManager
问题 I have a problem with an EntityManager , it throws a NullPointerException . This is the code: PersonServiceJpa.java package com.smartpump.service.jpa; import org.springframework.stereotype.Service; import com.smartpump.persistent.entity.Person; import com.smartpump.service.PersonService; import java.util.List; import javax.jdo.annotations.Transactional; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.Query; @Service("personService"