Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [eclipselink-users] EclipseLink & Spring

Looks like PersistenceAnnotationBeanPostProcessor is not able to inject em in the DAO or it's really not getting called to post process the beans. I would try to debug in the spring code ( for PersistenceAnnotationBeanPostProcessor ) if possible and see what is being done there. Also check the spring log to check what PersistenceAnnotationBeanPostProcessor has to say. With the configuration you have pasted below, it should have worked w/o any issues.

-----Original Message-----
From: eclipselink-users-bounces@xxxxxxxxxxx [mailto:eclipselink-users-bounces@xxxxxxxxxxx] On Behalf Of RogerV
Sent: Monday, April 26, 2010 12:24 PM
To: eclipselink-users@xxxxxxxxxxx
Subject: 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

    private EntityManager em;

Trying to access the entityManger results in a Null Pointer Exception. What
am I still missing?


<bean id="entityManagerFactory"
    <property name="dataSource" ref="dataSource"/>
    <property name="persistenceUnitName"
            value="Genesis" />
    <property name="jpaVendorAdapter">
        <property name="showSql" value="true"/>
        <property name="generateDdl" value="true"/>
        <property name="databasePlatform"

  <bean id="dataSource"
    <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"/>


View this message in context:
Sent from the EclipseLink - Users mailing list archive at

eclipselink-users mailing list

Back to the top