Are you using AppFuse? If so, what version? The
OpenEntityManagerInViewFilter should solve this issue for JPA. You may
have to add <dispatcher>FORWARD</dispatcher> (and REQUEST) if you're
seeing this issue on a forward.

Matt

On Nov 9, 2007 9:29 PM, thufail <[EMAIL PROTECTED]> wrote:
>
> Hi Matt,
>
>           Thanks for your reply. The problem i am facing is using JPA. In my
> applicationContext.xml, i wont specify anythig like
> sessionFactory(datasource, HibernateTransactionManager et.,) which is
> specified in Hibernate, instead i use entityManagerFactory and jpa based
> transactionManager for JPA. There is also filter available for jpa but
> eventhough it shows the  LazyIni...  error.
>
> The main problem according to me is that i am using JPA but it is searching
> for Hibernate configuration, i am unaware how to manage this one. This error
> happens only when i use relational db. If i try to retrieve a single table
> without any relation the whole data is retrieved and displayed in the view.
> If u have any suggestion please offer.
> This is the configuration i have done in app..Context.xml
>  <bean id="entityManagerFactory"
>           class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">
>         <property name="persistenceUnitName" value="ngsubsPersistence"/>
>     </bean>
>
>     <!-- Spring JPA Transaction Manager -->
>     <bean id="txManager"
>           class="org.springframework.orm.jpa.JpaTransactionManager">
>         <property name="entityManagerFactory" ref="entityManagerFactory"/>
>     </bean>
>
> JPA filter
> <filter>
>              <filter-name>jpaFilter</filter-name>
>
> <filter-class>org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter
> </filter-class>
> </filter>
> <filter-mapping>
>     <filter-name>jpaFilter</filter-name>
>      <url-pattern>/*</url-pattern>
> </filter-mapping>
>
> This shows same LazyIni... exception.
>
> Regars
> Thufail.
>
> --
> View this message in context: 
> http://www.nabble.com/LazyInitializationException-again-tf4654121s2369.html#a13679278
>
> Sent from the AppFuse - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
http://raibledesigns.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to