Announcement Announcement Module
Collapse
No announcement yet.
lazy loading issue with JPA Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • lazy loading issue with JPA

    Hi All,

    I am using JPA with Springs i had some problem.

    this is my web.xml

    <filter>
    <filter-name>lazyLoadingFilter</filter-name>
    <filter-class>
    org.springframework.orm.jpa.support.OpenEntityMana gerInViewFilter
    </filter-class>
    </filter>
    <filter-mapping>
    <filter-name>lazyLoadingFilter</filter-name>
    <url-pattern>/*</url-pattern>
    </filter-mapping>

    <listener>
    <listener-class>
    org.springframework.web.context.ContextLoaderListe ner
    </listener-class>
    </listener>


    --------------
    in app.xml

    <bean id="entityManagerFactory"
    class="org.springframework.orm.jpa.LocalEntityMana gerFactoryBean">
    <property name="persistenceUnitName"
    value="testing" />
    </bean>


    ------------
    But when i run the app i got

    No bean named 'entityManagerFactory' is defined

    if i disable lazyLoadingFilter in web.xml i.e i remove the below code
    --
    <filter>
    <filter-name>lazyLoadingFilter</filter-name>
    <filter-class>
    org.springframework.orm.jpa.support.OpenEntityMana gerInViewFilter
    </filter-class>
    </filter>
    <filter-mapping>
    <filter-name>lazyLoadingFilter</filter-name>
    <url-pattern>/*</url-pattern>
    </filter-mapping>

    ------------
    then it runs fine
    But i need lazyloading
    Last edited by gaddamsandeeps; Apr 27th, 2009, 05:49 AM.
Working...
X