I think this is a regression. In conf, I get a 503 response where it should send a validation error. An exception is thrown indicating that the session is already closed or session is null.

[04 Feb 09:38:00 conference] ERROR exception message: could not initialize proxy - no Session
org.hibernate.LazyInitializationException: could not initialize proxy - no Session
	at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:167)
	at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:215)
	at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:190)
	at webdsl.generated.domain.Profile_$$_javassist_79.getNaturalId(Profile_$$_javassist_79.java)
	at webdsl.generated.templates.signInOut_ta3_Template.handlePhase(signInOut_ta3_Template.java:78)
	at utils.TemplateServlet.renderInternal(TemplateServlet.java:139)
	at utils.TemplateServlet.render(TemplateServlet.java:118)
	at utils.TemplateServlet.handleTemplateCall(TemplateServlet.java:297)
        ...

It turns out that when principal() is used, it returns an entity which is not part of the current session.

x = ((SecurityContext)ThreadLocalPage.getEnv().getSessionVariable("securityContext")).getPrincipal();
utils.HibernateUtil.getCurrentSession().contains( x ) returns false.

Submitted by Elmer van Chastelet on 4 February 2016 at 09:56

On 11 February 2016 at 12:23 Elmer van Chastelet closed this issue.

Log in to post comments