You might want to try reversing the order of your filter and filter-mapping declarations in web.xml to put OpenSessionInViewFilter first.
Other than that, I would need to see your applicationContext.xml file. Jonathan > -----Original Message----- > From: Toby Hobson [mailto:[EMAIL PROTECTED] > Sent: Wednesday, April 30, 2008 1:00 PM > To: users@tapestry.apache.org > Subject: Question about T5 and OpenSessionInViewFilter > > Hi guys, > > Anyone know af any "gotchas" re: using this filter in T5? I'm trying to > display a collection of objects in my page but i'm getting hibernate > LazyInitialization errors. Here's the relevant code: > > Start.tml > > <t:loop source="newPhotos" value="currentPhoto"> > <div class="pic"> > <img alt="#" src="${currentPhoto.imageResource}" > width="64" > height="64" /> > <h2>${photo.name}</h2> > By > <span>${photo.name}</span> > </div> > </t:loop> > > Start.java > > public class Start > { > > @Inject > @Service("imageService") > private ImageService imageService; > > private Photo currentPhoto; > > public Collection<Photo> getNewPhotos() { > return imageService.getRecentUploads(5); > } > > public Photo getCurrentPhoto() { > return currentPhoto; > } > > public void setCurrentPhoto(Photo photo) { > this.currentPhoto = photo; > } > > } > > web.xml > > <filter> > <filter-name>app</filter-name> > <!-- Special filter that adds in a T5 IoC module derived from the > Spring WebApplicationContext. --> > <filter-class> > org.apache.tapestry.spring.TapestrySpringFilter > </filter-class> > </filter> > > <filter> > <filter-name>hibernateFilter</filter-name> > <filter-class> > > org.springframework.orm.hibernate3.support.OpenSessionInViewFilter > </filter-class> > </filter> > > <filter-mapping> > <filter-name>app</filter-name> > <url-pattern>/*</url-pattern> > </filter-mapping> > > <filter-mapping> > <filter-name>hibernateFilter</filter-name> > <url-pattern>/*</url-pattern> > </filter-mapping> > > And i get: > > Render queue error > [EMAIL PROTECTED]:co > uld not initialize proxy - the owning Session was closed > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]