This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Spring-Hibernate: proxy Session closed  RSS feed

Nina Anderson
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

I'm using Spring and Hibernate in my Web application. When I try to access a hibernate object from my struts action class or my JSP page, I get an exception stating:

Uncaught exception thrown in one of the service methods of the servlet: action. Exception thrown : javax.servlet.ServletException: could not initialize proxy - the owning Session was closed

Does anyone know what I'm doing wrong and how to solve the problem.

Here's my code:


<!-- =================== Define Spring Bean Definition Files to be loaded ================== -->



<!-- =================== Spring Context Loader Servlet ================== -->

////JAVA CODE//////

BusinessServiceCbo businessServiceCbo = new
BusinessCbo businessCbo = new BusinessCbo();
businessCbo = businessDao.findById(businessId);

List serviceList = new ArrayList( businessCbo.getBusinessServices());


System.out.println("Service List: " + businessDetailDto.getServiceList()); //error occurs here!!!

///APPLiCATION Context.xml /////

<bean id="businessBSTarget" class="">
<property name="businessDao"><ref local="businessDao" /></property>
<bean id="businessBS" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<property name="target">
<ref local="businessBSTarget" />
<property name="interceptorNames">


<!-- ============================= Spring Plugin ================================== -->

<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
value="/WEB-INF/presentationContext.xml classpath*:com/PBCoreApp/architecture/applicationContext.xml" />

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!