Announcement Announcement Module
Collapse
No announcement yet.
Problems with AbstractJpaTests Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problems with AbstractJpaTests

    Hi all,

    I have some problems when testing with AbstractJpaTests.
    When I use "persistenceXmlLocation" in my entityManagerFactory with LocalContainerEntityManagerFactoryBean it crashes.
    Error :
    Usuario is not mapped [select u from Usuario u where u.username like '?1']

    my entityManager from applicationContext.xml:
    Code:
    <bean id="entityManagerFactory" class= "org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
            <property name="dataSource" ref="dataSource"/>
            <property name="persistenceXmlLocation" value="file:c:/workspace/ALP/ALP/WebContent/META-INF/p*.xml"/>       
            <property name="persistenceUnitName" value="testing"/>
            <property name="jpaVendorAdapter">
          		<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
    		        <property name="showSql" value="true"/>
    	    	    <property name="generateDdl" value="true"/>
            		<property name="databasePlatform" value="org.hibernate.dialect.MySQL5Dialect"/>
        	  </bean>
    	    </property>
        
        </bean>

    regards, Jose
Working...
X