Hi all,

running DSpace 6.3 / JSPUI

our library stuff had to import bibtex files into DSpace and they have to use the dspace-admin/batchimport jsp. But this automatically approves the import, what is not what we want. So I added a radio button to select if an item should be approved or go into the workflow (what I can do with the '-w' flag in .\dspace import --add-bte') And in the BatchImportServlet I check this button and set itemImportService.setUseWorkflow true or false accordingly. (Like it's done in ItemImportCLITool)
The rest is the same. Ending up im ItemImportServiceImpl.addBTEItems(..)

While everything works fine when itemImportService.setUseWorkflow(false), I got a org.hibernate.LazyInitializationException when setting itemImportService.setUseWorkflow(true)

Here's the whole stacktrace:

An error occurred during item import, the user will be notified. 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.hibernate.collection.internal.PersistentBag.isEmpty(PersistentBag.java:249) at org.apache.commons.collections.CollectionUtils.isEmpty(CollectionUtils.java:979) at org.apache.commons.collections.CollectionUtils.isNotEmpty(CollectionUtils.java:992)
        at org.dspace.content.DSpaceObject.getHandle(DSpaceObject.java:133)
at org.dspace.curate.WorkflowCuratorServiceImpl.getFlowStep(WorkflowCuratorServiceImpl.java:247) at org.dspace.curate.WorkflowCuratorServiceImpl.needsCuration(WorkflowCuratorServiceImpl.java:108) at org.dspace.workflowbasic.BasicWorkflowServiceImpl.advance(BasicWorkflowServiceImpl.java:338) at org.dspace.workflowbasic.BasicWorkflowServiceImpl.advance(BasicWorkflowServiceImpl.java:326) at org.dspace.workflowbasic.BasicWorkflowServiceImpl.start(BasicWorkflowServiceImpl.java:250) at org.dspace.workflowbasic.BasicWorkflowServiceImpl.start(BasicWorkflowServiceImpl.java:48) at org.dspace.app.itemimport.ItemImportServiceImpl.addItem(ItemImportServiceImpl.java:497) at org.dspace.app.itemimport.ItemImportServiceImpl.addItems(ItemImportServiceImpl.java:338) at org.dspace.app.itemimport.ItemImportServiceImpl.addBTEItems(ItemImportServiceImpl.java:242) at org.dspace.app.itemimport.ItemImportServiceImpl$2.run(ItemImportServiceImpl.java:1891)


Does anybody of you have an idea what is the cause of this Exception or any clue where I may dig deeper? Or have I just overseen anything?

BTW: the CLI --add-bte -w works perfectly.

Thanks in advance
--

Armin Wenz
Universitätsbibliothek Mainz
Leitung Bibliotheksanwendungen
Jakob-Welder-Weg 12
55128 Mainz
Tel.: +49 6131 39-29830
http://www.ub.uni-mainz.de

--
All messages to this mailing list should adhere to the Code of Conduct: 
https://duraspace.org/about/policies/code-of-conduct/
--- 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/45659d35-d7c9-9f5a-1416-b13398c71e94%40ub.uni-mainz.de.

Reply via email to