in springe I cannot work with JPA since it does not see my resource file.

<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"> <persistence-unit name="aoz_jdbc" transaction-type="JTA"> <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider> <jta-data-source>jdbc/aoc</jta-data-source> <exclude-unlisted-classes>true</exclude-unlisted-classes> <properties/> </persistence-unit> </persistence> 

aplication-context.xml file

  <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> <property name="dataSource" ref="dataSource" /> <property name="jpaVendorAdapter"> <bean class="org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter"/> </property> <property name="jpaProperties" ref="eclipselinkjpavendoradapter"/> <property name="packagesToScan"> <list> <value>com.andrew</value> </list> </property> </bean> <bean id="dataSource" class="org.springframework.jdbc.datasource.SimpleDriverDataSource"> <property name="driverClass" value="com.mysql.jdbc.Driver"/> <property name="url" value="jdbc:mysql://localhost:3306/bibabotan"/> <property name="username" value="aoz_root"/> <property name="password" value="123456"/> </bean> 

in java call so

 @ImportResource("classpath*:/spring-conf/spring-config.xml") @Service public class UserServiceImpl implements UserService { @PersistenceContext(unitName = "aoz_jdbc") private EntityManager em; 

Exception

 weblogic.application.ModuleException: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'aoz_jdbc' is defined:org.springframework.beans.factory.NoSuchBeanDefinitionException:No bean named 'aoz_jdbc' is defined 

    0