org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.dspace.content.DSpaceObject.handles, could not initialize proxy - no Session

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
via Stack Overflow by Kleber Mota

Use eager fetch (fetch = FetchType.EAGER) annotation.

,
via Stack Overflow by JamesENL

Use the proper ORM annotations (@ManyToOne and @OneToMany).

Solutions on the web

via Sakai JIRA by Terry Brady, 1 year ago
failed to lazily initialize a collection of role: org.dspace.content.DSpaceObject.handles, could not initialize proxy - no Session
via Stack Overflow by ProSyth
, 2 years ago
failed to lazily initialize a collection of role: com.atorresbr.springapp.model.Empresa.ldiarios, could not initialize proxy - no Session
via Stack Overflow by Kleber Mota
, 2 years ago
failed to lazily initialize a collection of role: com.horariolivre.entity.Usuario.autorizacoes, could not initialize proxy - no Session
via jhuep.com by Unknown author, 1 year ago
failed to lazily initialize a collection of role: org.myorg.jpatickets.bo.Event.tickets, could not initialize proxy - no Session
via Stack Overflow by Vercryger
, 2 years ago
failed to lazily initialize a collection of role: org.myorg.testing.domains.Person.tasks, could not initialize proxy - no Session
via Stack Overflow by Dave
, 2 years ago
failed to lazily initialize a collection of role: org.mainco.subco.lessonplan.domain.LessonPlan.classrooms, could not initialize proxy - no Session
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.dspace.content.DSpaceObject.handles, could not initialize proxy - no Session
at org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:569)
at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:188)
at org.hibernate.collection.internal.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:139)
at org.apache.commons.collections.CollectionUtils.isEmpty(CollectionUtils.java:979)
at org.dspace.content.DSpaceObject.getHandle(DSpaceObject.java:133)
at org.dspace.discovery.SolrServiceImpl.indexContent(SolrServiceImpl.java:198)
at org.dspace.discovery.SolrServiceImpl.indexContent(SolrServiceImpl.java:2305)
at org.dspace.discovery.IndexClient.indexAll(IndexClient.java:192)
at org.dspace.discovery.IndexClient.main(IndexClient.java:152)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:229)

Users with the same issue

6 times, 1 year ago
6 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.