Re: [struts-user] Re: struts2 json return null if involve hibernate or spring
What is the status of the Hibernate/JPA session at the time of the View rendering? i just use the following session approach in the application.xml in the CartManagerImpl.java public class CartManagerImpl implements CartManager { CartDao cartDao; public void setCartDao(CartDao cartDao) { this.cartDao=cartDao; } public void removeSingle(Cartitem item) throws Exception { cartDao.deleteSingle(item); } From: Jason Pyeron To: 'Struts Users Mailing List' Sent: Monday, October 27, 2014 8:20 AM Subject: RE: [struts-user] Re: struts2 json return null if involve hibernate or spring > -Original Message- > From: john lee > Sent: Monday, October 27, 2014 9:06 > > the delete itself has no problem if called it directly. (please try not to top post) > From: Lukasz Lenart > To: Struts Users Mailing List > Sent: Monday, October 27, 2014 2:46 AM > Subject: Re: struts2 json return null if involve hibernate or spring > > 2014-10-27 3:55 GMT+01:00 john lee : > > > > is hibernate dao manipulation could affect struts 2 json return? In my expereince yes, regarding lazy loading and caching. But your code sample does not give enough detail to say if that is likely. What is the status of the Hibernate/JPA session at the time of the View rendering? > > or spring framework could affect struts2 json return? > > my program's struts2 json execution is success if not > involve dao or spring call. > > but if involve hibernate/spring/dao manipulation, then json > return is null and not returned. > > struts.xml > ... > > > > > > > > > > Cart.jsp loadFromGoogle="%{google}" ajaxhistory="%{ajaxhistory}" > defaultIndicator="myDefaultIndicator"/> > > > > <%@ taglib prefix="s" uri="/struts-tags" %> > > <%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
RE: [struts-user] Re: struts2 json return null if involve hibernate or spring
> -Original Message- > From: john lee > Sent: Monday, October 27, 2014 9:06 > > the delete itself has no problem if called it directly. (please try not to top post) > From: Lukasz Lenart > To: Struts Users Mailing List > Sent: Monday, October 27, 2014 2:46 AM > Subject: Re: struts2 json return null if involve hibernate or spring > > 2014-10-27 3:55 GMT+01:00 john lee : > > > > is hibernate dao manipulation could affect struts 2 json return? In my expereince yes, regarding lazy loading and caching. But your code sample does not give enough detail to say if that is likely. What is the status of the Hibernate/JPA session at the time of the View rendering? > > or spring framework could affect struts2 json return? > > my program's struts2 json execution is success if not > involve dao or spring call. > > but if involve hibernate/spring/dao manipulation, then json > return is null and not returned. > > struts.xml > ... > > > > > > > > > > Cart.jsp loadFromGoogle="%{google}" ajaxhistory="%{ajaxhistory}" > defaultIndicator="myDefaultIndicator"/> > > > > <%@ taglib prefix="s" uri="/struts-tags" %> > > <%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
Re: struts2 json return null if involve hibernate or spring
the delete itself has no problem if called it directly. From: Lukasz Lenart To: Struts Users Mailing List Sent: Monday, October 27, 2014 2:46 AM Subject: Re: struts2 json return null if involve hibernate or spring 2014-10-27 3:55 GMT+01:00 john lee : > is hibernate dao manipulation could affect struts 2 json return? > or spring framework could affect struts2 json return? > my program's struts2 json execution is success if not involve dao or spring > call. > but if involve hibernate/spring/dao manipulation, then json return is null > and not returned. > struts.xml ... name="cart-del" class="CartAction" method="del"> > > > > > Cart.jsp loadFromGoogle="%{google}" ajaxhistory="%{ajaxhistory}" > defaultIndicator="myDefaultIndicator"/> > > <%@ taglib prefix="s" uri="/struts-tags" %> > <%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
Re: struts2 json return null if involve hibernate or spring
2014-10-27 3:55 GMT+01:00 john lee : > is hibernate dao manipulation could affect struts 2 json return? > or spring framework could affect struts2 json return? > my program's struts2 json execution is success if not involve dao or spring > call. > but if involve hibernate/spring/dao manipulation, then json return is null > and not returned. > struts.xml ... name="cart-del" class="CartAction" method="del"> > > > > > Cart.jsp loadFromGoogle="%{google}" ajaxhistory="%{ajaxhistory}" > defaultIndicator="myDefaultIndicator"/> > > <%@ taglib prefix="s" uri="/struts-tags" %> > <%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
struts2 json return null if involve hibernate or spring
is hibernate dao manipulation could affect struts 2 json return? or spring framework could affect struts2 json return? my program's struts2 json execution is success if not involve dao or spring call. but if involve hibernate/spring/dao manipulation, then json return is null and not returned. struts.xml ... Cart.jsp <%@ taglib prefix="s" uri="/struts-tags" %> <%@ taglib prefix="sj" uri="/struts-jquery-tags"%>