Skip to content
Snippets Groups Projects
Closed [Queue-2.0] Failed to initialize lazy collection for time slots
  • View options
  • [Queue-2.0] Failed to initialize lazy collection for time slots

    • View options
  • Closed created

    There appears to be a hibernate failure in the automatic closing of passed (Closable) time slots. The error seems to be thrown every once in a while and appears to be because of there being no session in the method it is thrown in.

    org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: nl.tudelft.queue.model.TimeSlot.requests, could not initialize proxy - no Session
            at org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:606)
            at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:218)
            at org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:585)
            at org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:149)
            at org.hibernate.collection.internal.PersistentSet.iterator(PersistentSet.java:188)
            at java.base/java.util.Spliterators$IteratorSpliterator.estimateSize(Spliterators.java:1821)
            at java.base/java.util.Spliterator.getExactSizeIfKnown(Spliterator.java:408)
            at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:483)
            at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
            at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
            at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
            at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
            at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
            at nl.tudelft.queue.service.TimeSlotService.closeTimeSlot(TimeSlotService.java:64)
            at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
            at nl.tudelft.queue.service.TimeSlotService.checkClosableSlots(TimeSlotService.java:119)
            at nl.tudelft.queue.service.TimeSlotService$$FastClassBySpringCGLIB$$f1e1bf2e.invoke(<generated>)
            at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
            at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:687)
            at nl.tudelft.queue.service.TimeSlotService$$EnhancerBySpringCGLIB$$3e07c4b0.checkClosableSlots(<generated>)
            at jdk.internal.reflect.GeneratedMethodAccessor377.invoke(Unknown Source)
            at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.base/java.lang.reflect.Method.invoke(Method.java:566)
            at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:84)
            at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
            at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:93)
            at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
            at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
            at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
            at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
            at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
            at java.base/java.lang.Thread.run(Thread.java:834)

    Attributes

    Assignees

    None

    Labels

    Milestone

    None

    Dates

    Start: None

    Due: None

    Time tracking

    No estimate or time spent

    Activity

    • All activity
    • Comments only
    • History only
    • Newest first
    • Oldest first