Hi Lukasz, AFAIK I just need to define sessionFactory bean in my applicationContext.xml to work with my JPA-enabled classes (just like in the Person example) ? How can I do that ?
-- Thx, Milan Milan Milanovic wrote: > > Hi Lukasz, > > I tried to define web.xml as you give here, but when I deploy my > application I get this exception: > > org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean > named 'sessionFactory' is defined > at > org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:360) > at > org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:914) > at > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:241) > at > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) > at > org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:737) > at > org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.lookupSessionFactory(OpenSessionInViewFilter.java:243) > at > org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.lookupSessionFactory(OpenSessionInViewFilter.java:227) > at > org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:171) > at > org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) > at > org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:413) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) > ... > > ? > > In this application > http://struts.apache.org/2.0.11.1/docs/struts-2-spring-2-jpa-ajax.html > Struts 2 + Spring + JPA + AJAX there is no defined bean with name > 'sessionFactory'. > What can I do ? > > -- > Thx in advance, Milan > > > Lukasz Lenart wrote: >> >> 2008/6/27 Milan Milanovic <[EMAIL PROTECTED]>: >>> >>> Hi Lukasz, >>> >>> I wrote this in my first post in this thread, I need to read >>> person.getJobs() when person object is loaded in my action class for >>> this >>> Struts + AJAX+ Spring + Hibernate example provided in Struts docs, >>> that's >>> it. >> >> Just add that filter and that's all, you don't have to change anything >> else with your app. >> >> >> Regards >> -- >> Lukasz >> http://www.lenart.org.pl/ >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> > > -- View this message in context: http://www.nabble.com/LazyInitializationException-with-Struts-2-%2B-Spring-2-%2B-JPA-%2B-AJAX-application-tp18155823p18158236.html Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]