JTrac 2.3.2
OS: Linux
JVM Details:
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.6+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.6+10, mixed mode)
- Create a few users
- Create a space
- Assign a user to the newly created space
- Following exception is generated on jetty console,
org.hibernate.LazyInitializationException: could not initialize proxy - no Session
at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:108)
at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:150)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:150)
at info.jtrac.domain.Metadata$$EnhancerByCGLIB$$32e16c32.getAllRoleKeys(<generated>)
at info.jtrac.wicket.SpaceAllocatePage$SpaceAllocateForm.initRoleChoice(SpaceAllocatePage.java:91)
at info.jtrac.wicket.SpaceAllocatePage$SpaceAllocateForm.access$500(SpaceAllocatePage.java:78)
at info.jtrac.wicket.SpaceAllocatePage$SpaceAllocateForm$4.onUpdate(SpaceAllocatePage.java:179)
at org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior.onEvent(AjaxFormComponentUpdatingBehavior.java:141)
at org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:163)
at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:297)
at org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:104)
at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91)
at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1239)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1316)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1418)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:532)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:356)
at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:201)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)</generated>
I tried switching to JDK 8 & used the latest code (tag: r1424) to build the jtrac.war but the exception remains.
I can't reproduce this. Starting with an empty database, I created 4 users, and had no issues assigning users to them either directly after creating a new space, or later on through the menu (using Adoptium 11 on macOS).
Last edit: Ulf Dittmer 2023-12-27
Sorry for the late reply. I found that this happens only with the user which has an ADMIN role only. As soon as a DEFAULT role is assigned to this user, the exception doesn't happen.
Nope, can't reproduce it with admin users, either.
I'd need the exact sequence of steps that led to the exception in order to investigate this.
Last edit: Ulf Dittmer 2024-01-09