Error 500 on submission

60 views
Skip to first unread message

Michael Plate

unread,
May 4, 2023, 12:30:29 PM5/4/23
to dspac...@googlegroups.com
Hi,

we are facing a serious error on submitting a workspace item
First: the item gets into the system via SAF and is added like this

~/bin/dspace import --add --eperson=XXXXX --collection=123456789/22
--source=. --mapfile=map -w -n -p

Metadata contains a title and some text from OCR an 3 PDF files.

Then the metadata is edited through the workflow and extended by author,
date of submission, language and so on.

The interface is set to German lang.

There is always a yellow circle atop right in the step with an
exclamation mark, but this only says "warnings" - nothing more or less.

Very often, bu not always, the Item cannot be saved for the next step
with an error like "could not be submitted, try later".

In the browser console is a 500 internal error and the log says

2023-05-04 18:02:25,920 INFO 43d49670-c5d7-454f-a2df-068371ebcf88
881b078e-6bd7-4658-91ba-c619dfaed9fe
org.dspace.content.MetadataValueServiceImpl @
xxxxxxxxxx::add_metadatavalue:metadata_value_id=3172
2023-05-04 18:02:25,921 ERROR 43d49670-c5d7-454f-a2df-068371ebcf88
881b078e-6bd7-4658-91ba-c619dfaed9fe
org.dspace.app.rest.submit.SubmissionService @ [Assertion failed] - this
collection must not be empty: it must contain at least 1 element
java.lang.IllegalArgumentException: [Assertion failed] - this collection
must not be empty: it must contain at least 1 element
at org.springframework.util.Assert.notEmpty(Assert.java:470)
~[spring-core-5.3.20.jar:5.3.20]

Sometimes one can try later (means: edit it again), some times it works
ootb .

Just at the moment I was able to submit it w/o reediting by setting the
lang to English on the fly (reloads and keeps the data).

Anyone else ?

Michael

DSpace Technical Support

unread,
May 5, 2023, 12:24:20 PM5/5/23
to DSpace Technical Support
Hi Michael,

The ERROR text you shared seems like it might be cut off.  Was there any more info in the log?

I'd also highly recommend following the steps in our Troubleshooting guide.  Because DSpace 7 has a client side UI, there are some client side errors which will *never* appear in the logs.  So, it's important to look at the browser's devtools (both the console *and* the network tab) as you may be able to get more information about the 500 error.  You also can turn on debugging temporarily to see even more details about the error in your browser's network tab.


Tim

Michael Plate

unread,
May 8, 2023, 12:26:17 PM5/8/23
to dspac...@googlegroups.com
Hi Tim,

this will get a longish one…

I tested the submission-forms.xml with xmllint against the DTD…and got
around 50 errors - the order of the XML-Elements in the <field>
descriptions where "garbled".
After that, I tried again and got the same problem.
BTW, DSpace is very lax with the XML - forgetting a <row></row> around
<fields> does not produce an error (the fields are just not shown).


Am 05.05.23 um 18:24 schrieb DSpace Technical Support:
> Hi Michael,
>
> The ERROR text you shared seems like it might be cut off.  Was there any
> more info in the log?
>
> I'd also highly recommend following the steps in our Troubleshooting
> guide.  Because DSpace 7 has a client side UI, there are some client
> side errors which will *never* appear in the logs.  So, it's important
> to look at the browser's devtools (both the console *and* the network
> tab) as you may be able to get more information about the 500 error.
> You also can turn on debugging temporarily to see even more details
> about the error in your browser's network tab.
>

The workflow…

item-submission.xml
In the form-definitons, there is a new form for the workflow named
"fb11_abschlussarbeiten_form"
It uses dc and dcterms schema.

item-submission.xml
In the submission-maps, there is a name-map wich ties two certain
collections to submission-name.
<name-map collection-handle="123456789/22"
submission-name="fb11_abschlussarbeiten_map"/>
<name-map collection-handle="123456789/61"
submission-name="fb11_abschlussarbeiten_map"/>


There ist a step-definition
<step-definition id="fb11_abschlussarbeiten_form"
mandatory="true">
<heading>submit.progressbar.describe.stepone</heading>

<processing-class>org.dspace.app.rest.submit.step.DescribeStep</processing-class>
<type>submission-form</type>
</step-definition>


submisson-definitions
<submission-process name="fb11_abschlussarbeiten_map">
<step id="collection"/>
<step id="fb11_abschlussarbeiten_form"/>
<step id="upload"/>
</submission-process >


Hope it is not to confusing.



The collection with the id "22" has the follwoing roles:

Submitters
Default Item Read Access
Default bitstream read access
Final Editors

All include subgroups from LDAP.
There is an additional authorization TYPE_CUSTOM READ for the groups,
else they get the form, but there is no metadata shown.

The items are scanned and OCR'ed files and automated converted to a SAF
structure.
The dublin_core.xml only contains dc.title and dc.description, wich is
the title page of the item as OCR.

The contents exists of three PDFs, an original, the recalculated OCR'ed
and third single special page and thumbnails for all PDFs.

They are added via dspace import and an admin account to the workflow.

The editors got the task via E-Mail and see the item in the workflow
tasks ( w/o a thumbnail, BTW, if choosing "View" the TN are there).

Now to the browser devtools… "Claim" -> "Edit":

[…]
cannot deserialize type workflowstep

Can't cache incomplete workflowstep: null, parsed from (partial)
response:
{"id":"finaleditstep","type":"workflowstep","_links":{"workflowactions":{"href":"https://HOST/server/api/config/workflowsteps/finaleditstep/workflowactions"},"self":{"href":"https://HOST/server/api/config/workflowsteps/finaleditstep"}},"_embedded":"..."}

cannot deserialize type workflowstep
[…]

Presumably this is responsible for the yellow exclamation mark in the
head of the step wich tells "Warnings".

On the "Uploaded files" there are the 3 files - w/o thumbnails - where I
can edit the access rights.
Opening this produces an error

ERROR TypeError: t.rows.find(...) is undefined
inCurrentSubmissionScope https://HOST/9179.1ab6f886663d4bbc.js:1
hasMetadataEnrichment https:/HOST/9179.1ab6f886663d4bbc.js:1
hasMetadataEnrichment https://HOST/9179.1ab6f886663d4bbc.js:1
updateForm https:/HOST/9179.1ab6f886663d4bbc.js:1
subscriptions https://HOST/9179.1ab6f886663d4bbc.js:1
next https://HOST/main.9c8d009a4093bd8e.js:1
_next https:/HOST/main.9c8d009a4093bd8e.js:1
next

but it is possible to set the access condition type for all files, the
error only occurs one time.
Sometimes on this the error occurs that the data could not be saved,
"try again later"…

Now I can do "Save for later" - and this might work or not, and I can't
find a rule on that…
At the time writing this I can't force that error :(, but I had it twice
in the middle of the day and it only looks like this from dspace.log

2023-05-08 13:29:11,032 INFO 48146f53-5a43-4098-bffa-992f3c2c48a1
393a9963-875e-4af5-a097-18e38bf6b0e7
org.dspace.content.MetadataValueServiceImpl @
xxx::add_metadatavalue:metadata_value_id=3381
2023-05-08 13:29:11,034 INFO 48146f53-5a43-4098-bffa-992f3c2c48a1
393a9963-875e-4af5-a097-18e38bf6b0e7
org.dspace.content.MetadataValueServiceImpl @
xxx::delete_metadata_value: metadata_value_id=3381
2023-05-08 13:29:11,034 INFO 48146f53-5a43-4098-bffa-992f3c2c48a1
393a9963-875e-4af5-a097-18e38bf6b0e7
org.dspace.content.MetadataValueServiceImpl @
xxx::add_metadatavalue:metadata_value_id=3382
2023-05-08 13:29:11,036 INFO 48146f53-5a43-4098-bffa-992f3c2c48a1
393a9963-875e-4af5-a097-18e38bf6b0e7
org.dspace.content.MetadataValueServiceImpl @
xxx::delete_metadata_value: metadata_value_id=3348
2023-05-08 13:29:11,037 ERROR 48146f53-5a43-4098-bffa-992f3c2c48a1
393a9963-875e-4af5-a097-18e38bf6b0e7
org.dspace.app.rest.submit.SubmissionService @ [Assertion failed] - this
collection must not be empty: it must contain at least 1 element
java.lang.IllegalArgumentException: [Assertion failed] - this collection
must not be empty: it must contain at least 1 element
at org.springframework.util.Assert.notEmpty(Assert.java:470)
~[spring-core-5.3.20.jar:5.3.20]
at org.springframework.util.Assert.notEmpty(Assert.java:500)
~[spring-core-5.3.20.jar:5.3.20]
at
org.dspace.app.rest.submit.factory.impl.ItemMetadataValueReplacePatchOperation.replace(ItemMetadataValueReplacePatchOperation.java:59)
~[classes/:7.5]
at
org.dspace.app.rest.submit.factory.impl.ReplacePatchOperation.perform(ReplacePatchOperation.java:27)
~[classes/:7.5]
at
org.dspace.app.rest.submit.step.DescribeStep.doPatchProcessing(DescribeStep.java:164)
~[classes/:7.5]
at
org.dspace.app.rest.submit.SubmissionService.evaluatePatchToInprogressSubmission(SubmissionService.java:450)
[classes/:7.5]
at
org.dspace.app.rest.repository.WorkflowItemRestRepository.patch(WorkflowItemRestRepository.java:226)
[classes/:7.5]
at
org.dspace.app.rest.repository.WorkflowItemRestRepository.patch(WorkflowItemRestRepository.java:69)
[classes/:7.5]
at
org.dspace.app.rest.repository.WorkflowItemRestRepository$$FastClassBySpringCGLIB$$b4069ba9.invoke(<generated>)
[classes/:7.5]
at
org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
[spring-core-5.3.20.jar:5.3.20]
at
org.springframework.aop.framework.CglibAopProxy.invokeMethod(CglibAopProxy.java:386)
[spring-aop-5.3.20.jar:5.3.20]
at
org.springframework.aop.framework.CglibAopProxy.access$000(CglibAopProxy.java:85)
[spring-aop-5.3.20.jar:5.3.20]
at
org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:704)
[spring-aop-5.3.20.jar:5.3.20]
at
org.dspace.app.rest.repository.WorkflowItemRestRepository$$EnhancerBySpringCGLIB$$504637ea.patch(<generated>)
[classes/:7.5]
at
org.dspace.app.rest.repository.DSpaceRestRepository.patch(DSpaceRestRepository.java:444)
[classes/:7.5]
at
org.dspace.app.rest.repository.DSpaceRestRepository$$FastClassBySpringCGLIB$$615525f9.invoke(<generated>)
[classes/:7.5]
at
org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
[spring-core-5.3.20.jar:5.3.20]
at
org.springframework.aop.framework.CglibAopProxy.invokeMethod(CglibAopProxy.java:386)
[spring-aop-5.3.20.jar:5.3.20]
at
org.springframework.aop.framework.CglibAopProxy.access$000(CglibAopProxy.java:85)
[spring-aop-5.3.20.jar:5.3.20]
at
org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:704)
[spring-aop-5.3.20.jar:5.3.20]
at
org.dspace.app.rest.repository.WorkflowItemRestRepository$$EnhancerBySpringCGLIB$$504637ea.patch(<generated>)
[classes/:7.5]
at
org.dspace.app.rest.RestResourceController.patchInternal(RestResourceController.java:708)
[classes/:7.5]
at
org.dspace.app.rest.RestResourceController.patch(RestResourceController.java:662)
[classes/:7.5]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method) ~[?:?]
at
jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
~[?:?]



BTW, time to time there is 404 from an URL wich ich just /undefined .

Oh, and it has to work next Monday…

Michael


Reply all
Reply to author
Forward
0 new messages