Hi,

we have exactly the same problem on our DSpace CRIS 2023.01.00. I suspect that it is a CRIS-specific problem. We currently just always run the job with the "-b" Option, which is OK as our repo is still quite small.

I spent some time digging and looking at other logs, increasing the log-level but could noct find anything obvious. We have not reported it as a bug for DSpace-CRIS yet as we were not sure whether it is due to some error in our config.
There ist also a post on the google-group about this issue with no solution: https://groups.google.com/g/dspace-tech/c/R_8QqHod-BE/m/X54sDegGBwAJ I tried to contact the author of this post without success.

Jarmo

Am 29.01.2024 um 03:26 schrieb Jack OE:
Hi,

Thanks for the reply.
We are not using any custom codes, and we weren't able to find any additional errors in the log. 
The DSpace version we are using is:
dspaceVersion": "DSpace 7.6.1",
  "crisVersion": "cris-2023.02.01
Hope that clarifies it a bit.
On Saturday, January 27, 2024 at 12:12:51 AM UTC+8 DSpace Technical Support wrote:
Hi,

The error " could not initialize proxy - no Session" usually implies a database connection or communication error.  (It also can occur if you are using custom code and the custom code has a bug where it's not contacting the database properly...but that's less likely for most sites.)

I'd recommend looking for additional errors just before this regarding your database connection... or possibly a major error earlier in the logs which resulted in an invalid database connection.  Based on the details of this error message, it's difficult to say what the cause is.  But, I'd recommend looking closer at your dspace.log and/or Tomcat logs to see if **additional errors** exist...as they may be causing this error.

If that doesn't help, then you should share the exact version of DSpace you are using.  It's also possible this is a bug in a specific version of DSpace, but we'd need more information about your setup to see if someone else can reproduce the problem.

Tim

On Thursday, January 25, 2024 at 9:06:51 PM UTC-6 [email protected] wrote:
Hi all

We are getting an error every time we try to execute "/dspace/bin/dspace index-discovery", but not problem when executing "/dspace/bin/dspace index-discovery -b"
Anyone know what the problem might be and how to resolve it? Any help is greatly appreciated, thanks!
Error msg at follows:

javax.persistence.PersistenceException: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.dspace.content.DSpaceObject.metadata, could not initialize proxy - no Session
 at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:154)
 at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1626)
 at org.hibernate.query.Query.getResultList(Query.java:165)
 at org.dspace.authorize.dao.impl.ResourcePolicyDAOImpl.findValidPolicyOwners(ResourcePolicyDAOImpl.java:450)
 at org.dspace.authorize.ResourcePolicyServiceImpl.findValidPolicyOwners(ResourcePolicyServiceImpl.java:430)
 at org.dspace.authorize.AuthorizeServiceImpl.getValidPolicyOwnersActionFilter(AuthorizeServiceImpl.java:529)
 at org.dspace.discovery.SolrServiceResourceRestrictionPlugin.additionalIndex(SolrServiceResourceRestrictionPlugin.java:79)
 at org.dspace.discovery.indexobject.IndexFactoryImpl.buildDocument(IndexFactoryImpl.java:70)
 at org.dspace.discovery.indexobject.DSpaceObjectIndexFactoryImpl.buildDocument(DSpaceObjectIndexFactoryImpl.java:30)
 at org.dspace.discovery.indexobject.ItemIndexFactoryImpl.buildDocument(ItemIndexFactoryImpl.java:144)
 at org.dspace.discovery.indexobject.ItemIndexFactoryImpl.buildDocument(ItemIndexFactoryImpl.java:81)
 at org.dspace.discovery.SolrServiceImpl.update(SolrServiceImpl.java:185)
 at org.dspace.discovery.SolrServiceImpl.indexContent(SolrServiceImpl.java:175)
 at org.dspace.discovery.SolrServiceImpl.updateIndex(SolrServiceImpl.java:365)
 at org.dspace.discovery.SolrServiceImpl.updateIndex(SolrServiceImpl.java:352)
 at org.dspace.discovery.IndexClient.internalRun(IndexClient.java:139)
 at org.dspace.scripts.DSpaceRunnable.run(DSpaceRunnable.java:150)
 at org.dspace.app.launcher.ScriptLauncher.executeScript(ScriptLauncher.java:174)
 at org.dspace.app.launcher.ScriptLauncher.handleScript(ScriptLauncher.java:151)
 at org.dspace.app.launcher.ScriptLauncher.handleScript(ScriptLauncher.java:125)
 at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:100)
Caused by: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.dspace.content.DSpaceObject.metadata, could not initialize proxy - no Session
 at org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:614)
 at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:218)
 at org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:591)
 at org.hibernate.collection.internal.AbstractPersistentCollection.forceInitialization(AbstractPersistentCollection.java:787)
 at org.hibernate.engine.internal.StatefulPersistenceContext.initializeNonLazyCollections(StatefulPersistenceContext.java:1005)
 at org.hibernate.engine.internal.StatefulPersistenceContext.initializeNonLazyCollections(StatefulPersistenceContext.java:991)
 at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:362)
 at org.hibernate.loader.Loader.doList(Loader.java:2868)
 at org.hibernate.loader.Loader.doList(Loader.java:2850)
 at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2682)
 at org.hibernate.loader.Loader.list(Loader.java:2677)
 at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:540)
 at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:400)
 at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:218)
 at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1459)
 at org.hibernate.query.internal.AbstractProducedQuery.doList(AbstractProducedQuery.java:1649)
 at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1617)
--
All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
---
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/ac606973-c60d-4063-8af1-b0941217b09dn%40googlegroups.com.

--
Dr. Jarmo Schrader
stellv. Bibliotheksleiter
Fachreferat und EDV
Universität Hildesheim
Universitätsbibliothek
Universitätsplatz 1
31141 Hildesheim

Tel: +49 (0) 5121 - 883 - 93004
[email protected]

--
All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
---
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/4f76caa9-2e23-4e3f-965b-5d5d05c7be0c%40uni-hildesheim.de.

Reply via email to