Hello,

I've found the solution in this 
thread: https://groups.google.com/g/dspace-tech/c/ioukme4el9o.
*NOTE: try this first in a development environment!*
My database comes from a dump of a 5.6 version and when performing this 
query:

SELECT count(*) from resourcepolicy where eperson_id is null and 
epersongroup_id is null;

I got thousands of rows so I have deleted them:

delete from resourcepolicy where eperson_id is null and epersongroup_id is 
null;

Reindexed:

dspace index-discovery

And it worked.

Hope this helps to anyone.

Regards,

Oriol

El dia dimecres, 18 de gener de 2023 a les 8:13:40 UTC+1, [email protected] 
va escriure:

> Hi Tim, 
>
> Sorry, I fotgot to say that I see no errors in the Javascript console. 
> I've tried to reindex Solr but I got this error after about 10 minutes 
> indexing:
>
> 2023-01-16 08:56:13,837 ERROR unknown unknown 
> org.dspace.scripts.handler.impl.CommandLineDSpaceRunnableHandler @ Cannot 
> invoke "org.dspace.eperson.EPerson.getID()" because the return value of 
> "org.dspace.authorize.ResourcePolicy.getEPerson()" is null
> java.lang.NullPointerException: Cannot invoke 
> "org.dspace.eperson.EPerson.getID()" because the return value of 
> "org.dspace.authorize.ResourcePolicy.getEPerson()" is null
> at 
> org.dspace.discovery.SolrServiceResourceRestrictionPlugin.additionalIndex(SolrServiceResourceRestrictionPlugin.java:95)
>  
> ~[dspace-api-7.4.jar:7.4]
> at 
> org.dspace.discovery.indexobject.IndexFactoryImpl.buildDocument(IndexFactoryImpl.java:67)
>  
> ~[dspace-api-7.4.jar:7.4]
> at 
> org.dspace.discovery.indexobject.InprogressSubmissionIndexFactoryImpl.buildDocument(InprogressSubmissionIndexFactoryImpl.java:46)
>  
> ~[dspace-api-7.4.jar:7.4]
> at 
> org.dspace.discovery.indexobject.WorkspaceItemIndexFactoryImpl.buildDocument(WorkspaceItemIndexFactoryImpl.java:63)
>  
> ~[dspace-api-7.4.jar:7.4]
> at 
> org.dspace.discovery.indexobject.WorkspaceItemIndexFactoryImpl.buildDocument(WorkspaceItemIndexFactoryImpl.java:30)
>  
> ~[dspace-api-7.4.jar:7.4]
> at org.dspace.discovery.SolrServiceImpl.update(SolrServiceImpl.java:165) 
> ~[dspace-api-7.4.jar:7.4]
> at 
> org.dspace.discovery.SolrServiceImpl.indexContent(SolrServiceImpl.java:155) 
> ~[dspace-api-7.4.jar:7.4]
> at 
> org.dspace.discovery.SolrServiceImpl.updateIndex(SolrServiceImpl.java:340) 
> ~[dspace-api-7.4.jar:7.4]
> at 
> org.dspace.discovery.SolrServiceImpl.updateIndex(SolrServiceImpl.java:327) 
> ~[dspace-api-7.4.jar:7.4]
> at 
> org.dspace.discovery.SolrServiceImpl.createIndex(SolrServiceImpl.java:295) 
> ~[dspace-api-7.4.jar:7.4]
> at org.dspace.discovery.IndexClient.internalRun(IndexClient.java:72) 
> ~[dspace-api-7.4.jar:7.4]
> at org.dspace.scripts.DSpaceRunnable.run(DSpaceRunnable.java:104) 
> [dspace-api-7.4.jar:7.4]
> at 
> org.dspace.app.launcher.ScriptLauncher.executeScript(ScriptLauncher.java:149) 
> [dspace-api-7.4.jar:7.4]
> at 
> org.dspace.app.launcher.ScriptLauncher.handleScript(ScriptLauncher.java:131) 
> [dspace-api-7.4.jar:7.4]
> at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:98) 
> [dspace-api-7.4.jar:7.4]
>
> I have to notice that I'm working with a database updated from a 5.6 
> version, with almost 30.000 items. 
>
> Also, I've turned on *Debug logging* and this is the call when I type 
> "contrib" in the input box:
>
> 2023-01-16 12:02:24,589 DEBUG b015278d-4b8c-47ca-b7af-76359bc98181 
> 867866ef-9be8-494b-a3ea-5f37edec8ee4 
> org.springframework.web.servlet.DispatcherServlet @ GET "
> */server/api/core/metadatafields/search/byFieldName?schema=&element=&qualifier=&query=contrib&exactName=&embed=schema*",
>  
> parameters={masked}
>
> If I execute this call on the browser I get no results while I should see 
> at least "dc.contributor":
> [image: 20230118_081130.png]
> Here's the result on the demo site REST API:
>
> https://api7.dspace.org/server/api/core/metadatafields/search/byFieldName?schema=&element=&qualifier=&query=contrib&exactName=&embed=schema
>
> Also, I've tried to console-debug the code in 
> https://github.com/DSpace/dspace-angular/blob/7a82b08ba7310da9a69a54b9f29080eea01d34df/src/app/item-page/edit-item-page/item-metadata/edit-in-place-field/edit-in-place-field.component.ts#L128
>
> [image: 20230118_081239.png]
>
> But it seems like there is no result from the API as there is only logged 
> the query:
> [image: 20230118_081314.png]
>
> Oriol
>
>
> El dia divendres, 13 de gener de 2023 a les 19:35:41 UTC+1, Tim Donohue va 
> escriure:
>
>> Hi,
>>
>> I'd recommend debugging this using our Troubleshooting guide.  While it's 
>> useful to look at the backend logs, it's also *necessary* to look at the 
>> UI's behavior in your browser's dev tools. Sometimes an error will only 
>> appear in your browser and not make it to the backend logs (this can happen 
>> when the UI is having communication issues with the backend or if the error 
>> is in the UI itself).  So, check for other possible errors at the UI level 
>> by following the troubleshooting guide:
>>
>> https://wiki.lyrasis.org/display/DSPACE/Troubleshoot+an+error#Troubleshootanerror-DSpace7.x(orabove)
>>
>> If you find additional errors, let us know on this list.  You could also 
>> try a full reindex of Solr (./dspace index-discovery -b) to see if that 
>> fixes things.
>>
>> Tim
>>
>> On Wednesday, January 11, 2023 at 7:27:34 AM UTC-6 [email protected] 
>> wrote:
>>
>>> Hi all,
>>>
>>> in DSpace 7.4, while adding new metadata to an existing item I'm not 
>>> getting any suggestions in the input box, is there any configuration step 
>>> I'm missing?
>>> [image: image.png]
>>>
>>> I see in *dspace.log* that there is this API call when I type something 
>>> in the input box: 
>>> GET /server/api/core/metadatafields/search/byFieldName  
>>> so I tried this with no results: 
>>> api/core/metadatafields/search/byFieldName?query=author . 
>>> The same API call in the DSpace 7 demo site returns 3 results: 
>>> https://api7.dspace.org/server/#api/core/metadatafields/search/byFieldName?query=author
>>>
>>> Also, in *solr.log* I see this call: 
>>> 2023-01-11 13:09:55.709 INFO (qtp359742806-22) [ x:search] 
>>> o.a.s.c.S.Request [search] webapp=/solr path=/select 
>>> params={q=*:*&fl=search.resourcetype,search.resourceid,search.uniqueid,database_status&start=0&fq=
>>> *fieldName_keyword:author**&fq=&wt=javabin&version=2} *hits=0* status=0 
>>> QTime=1
>>>
>>> Maybe there is a problem with SOLR?
>>>
>>> Thank you very much,
>>> Oriol
>>>
>>>
>>>
>>>

-- 
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/760ef3a0-a905-4f36-bc4c-1e5608dcbba3n%40googlegroups.com.

Reply via email to