org.hibernate.AssertionFailure: bug adding collection twice
at org.hibernate.engine.internal.StatefulPersistenceContext.addCollection(StatefulPersistenceContext.java:859) [hibernate-core-5.2.12.Final.jar:5.2.12.Final]
at org.hibernate.engine.internal.StatefulPersistenceContext.addInitializedCollection(StatefulPersistenceContext.java:898) [hibernate-core-5.2.12.Final.jar:5.2.12.Final]
at org.hibernate.engine.loading.internal.CollectionLoadContext.endLoadingCollection(CollectionLoadContext.java:242) [hibernate-core-5.2.12.Final.jar:5.2.12.Final]
at org.hibernate.engine.loading.internal.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:221) [hibernate-core-5.2.12.Final.jar:5.2.12.Final]
at org.hibernate.engine.loading.internal.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:194) [hibernate-core-5.2.12.Final.jar:5.2.12.Final]
at org.hibernate.loader.plan.exec.process.internal.CollectionReferenceInitializerImpl.endLoading(CollectionReferenceInitializerImpl.java:154) [hibernate-core-5.2.12.Final.jar:5.2.12.Final]
at org.hibernate.loader.plan.exec.process.internal.AbstractRowReader.finishLoadingCollections(AbstractRowReader.java:249) [hibernate-core-5.2.12.Final.jar:5.2.12.Final]
at org.hibernate.loader.plan.exec.process.internal.AbstractRowReader.finishUp(AbstractRowReader.java:212) [hibernate-core-5.2.12.Final.jar:5.2.12.Final]
at org.hibernate.loader.plan.exec.process.internal.ResultSetProcessorImpl.extractResults(ResultSetProcessorImpl.java:133) [hibernate-core-5.2.12.Final.jar:5.2.12.Final]
at org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad(AbstractLoadPlanBasedLoader.java:122) [hibernate-core-5.2.12.Final.jar:5.2.12.Final]
at org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad(AbstractLoadPlanBasedLoader.java:86) [hibernate-core-5.2.12.Final.jar:5.2.12.Final]
at org.hibernate.loader.collection.plan.AbstractLoadPlanBasedCollectionInitializer.initialize(AbstractLoadPlanBasedCollectionInitializer.java:87) [hibernate-core-5.2.12.Final.jar:5.2.12.Final]
at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:688) [hibernate-core-5.2.12.Final.jar:5.2.12.Final]
at org.hibernate.event.internal.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:75) [hibernate-core-5.2.12.Final.jar:5.2.12.Final]
at org.hibernate.internal.SessionImpl.initializeCollection(SessionImpl.java:2185) [hibernate-core-5.2.12.Final.jar:5.2.12.Final]
at org.hibernate.collection.internal.AbstractPersistentCollection$4.doWork(AbstractPersistentCollection.java:565) [hibernate-core-5.2.12.Final.jar:5.2.12.Final]
at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:247) [hibernate-core-5.2.12.Final.jar:5.2.12.Final]
at org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:561) [hibernate-core-5.2.12.Final.jar:5.2.12.Final]
at org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:132) [hibernate-core-5.2.12.Final.jar:5.2.12.Final]
at org.hibernate.collection.internal.PersistentBag.iterator(PersistentBag.java:277) [hibernate-core-5.2.12.Final.jar:5.2.12.Final]
at java.lang.Iterable.forEach(Iterable.java:74) [na:1.8.0_181]
at org.moltimate.moltimatebackend.model.Motif.lambda$runQueries$7(Motif.java:67) [classes/:na]
at java.lang.Iterable.forEach(Iterable.java:75) [na:1.8.0_181]
at org.moltimate.moltimatebackend.model.Motif.runQueries(Motif.java:62) [classes/:na]
at org.moltimate.moltimatebackend.service.AlignmentService.alignActiveSites(AlignmentService.java:66) ~[classes/:na]
at org.moltimate.moltimatebackend.service.AlignmentService.lambda$null$0(AlignmentService.java:56) ~[classes/:na]
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[na:1.8.0_181]
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) ~[na:1.8.0_181]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[na:1.8.0_181]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[na:1.8.0_181]
at java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:747) ~[na:1.8.0_181]
at java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:721) ~[na:1.8.0_181]
at java.util.stream.AbstractTask.compute(AbstractTask.java:316) ~[na:1.8.0_181]
at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731) ~[na:1.8.0_181]
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) ~[na:1.8.0_181]
at java.util.concurrent.ForkJoinPool$WorkQueue.execLocalTasks(ForkJoinPool.java:1040) ~[na:1.8.0_181]
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1058) ~[na:1.8.0_181]
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) ~[na:1.8.0_181]
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) ~[na:1.8.0_181]
2019-01-30 14:58:53.763 WARN 13848 --- [nio-8080-exec-2] o.h.e.loading.internal.LoadContexts : HHH000100: Fail-safe cleanup (collections) : org.hibernate.engine.loading.internal.CollectionLoadContext@75c9c8e5<rs=HikariProxyResultSet@295938403 wrapping rs38289: null>
2019-01-30 14:58:53.764 WARN 13848 --- [nio-8080-exec-2] o.h.e.loading.internal.LoadContexts : HHH000100: Fail-safe cleanup (collections) : org.hibernate.engine.loading.internal.CollectionLoadContext@5a05e5fe<rs=HikariProxyResultSet@173519207 wrapping rs39199: null>
2019-01-30 14:58:53.764 WARN 13848 --- [nio-8080-exec-2] o.h.e.l.internal.CollectionLoadContext : HHH000160: On CollectionLoadContext#cleanup, localLoadingCollectionKeys contained [1] entries
2019-01-30 14:58:53.765 ERROR 13848 --- [nio-8080-exec-2] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.hibernate.AssertionFailure: bug adding collection twice] with root cause