[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [eclipselink-users] EclipseLink & Spring
|
Thanks for that. This is what I've got at the moment. Everything starts up
but I'm not getting the EntityManager injected into my Dao classes using
@PersistenceContext
private EntityManager em;
Trying to access the entityManger results in a Null Pointer Exception. What
am I still missing?
Regards
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="persistenceUnitName"
value="Genesis" />
<property name="jpaVendorAdapter">
<bean
class="org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter">
<property name="showSql" value="true"/>
<property name="generateDdl" value="true"/>
<property name="databasePlatform"
value="org.eclipse.persistence.platform.database.MySQLPlatform"/>
</bean>
</property>
</bean>
<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<property name="url" value="jdbc:mysql://localhost:3306/genesis"/>
<property name="username" value="userId"/>
<property name="password" value="password"/>
</bean>
<bean
class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/>
--
View this message in context: http://old.nabble.com/EclipseLink---Spring-tp28349408p28361434.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.