Update: I have found this post by helix84 which looks similar (the context is for OAI but the traceback looks about the same):
http://dspace.2283337.n4.nabble.com/problems-with-OAI-td4671531.html When I try running the following SQL on our DSpace 1.8 server (cut and paste from the above message), I get: # SELECT item.item_id FROM item WHERE NOT EXISTS (SELECT resource_id FROM handle WHERE handle.resource_id = item.item_id AND handle.resource_type_id = 2); item_id --------- 435 503 499 432 646 461 559 2627 2628 3844 5443 5899 (12 rows) We've been through by hand and bitstreams 435, 432 and 5899 result in "Not found on this server", while the remainder appear okay (at least via the webapp). Looks like our 1.8 server has some problem that is only showing up as an issue following the migration to 4.1 ? What do we need to do to fix up the existing 1.8 install ? Thanks, Patrick > Hi all, > > I’m attempting an upgrade from DSpace 1.8 directly to 4.1 on a new > server but am running into a problem. Along with the asset store and > DB, we are wanting to preserve our viewing stats. After migration, if I > run: > > /usr/local/dspace/bin/dspace stats-util -b > > then I am getting the following Java traceback. > > Exception: Document is missing mandatory uniqueKey field: uid > org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: > Document is missing mandatory uniqueKey field: uid > at > org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:424) > at > org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:180) > at > org.dspace.statistics.SolrLogger.reindexBitstreamHits(SolrLogger.java:1482) > at > org.dspace.statistics.util.StatisticsClient.main(StatisticsClient.java:97) > 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:225) > at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:77) > > This error message does not occur if I run “dspace stats-util -b” on our > DSpace 1.8 server. > > ——— > > A summary of the steps that I’m taking are: > > 1. Copying across /usr/local/dspace/solr/statistics/data to the new server. > 2. Doing a rsync of the asset store: > > rsync -av --exclude=.snapshot --exclude=log > /usr/local/dspace/assetstore/ newserver:/usr/local/dspace/assetstore/ > > 3. Exporting / importing the PSQL database from the old to new server. > 4. Applying DB schema database_schema_18-3.sql followed by > database_schema_3-4.sql > > 5. Running /usr/local/dspace/bin/dspace checker -l -p > 6. Starting tomcat on the new server and running: > > /usr/local/dspace/bin/dspace index-discovery > > Then I'm attempting to run "/usr/local/dspace/bin/dspace stats-util -b" > which is when the error message occurs. > > After Step 6, I have also tried: > > /usr/local/dspace/bin/dspace stats-util -o > /usr/local/dspace/bin/dspace stat-general > /usr/local/dspace/bin/dspace stat-initial > > but am still running into the above error message upon running > “stats-util -b”. > > If anyone could assist me with this it would be appreciated. > > With Thanks, > > Patrick Rynhart > > > > ------------------------------------------------------------------------------ > HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions > Find What Matters Most in Your Big Data with HPCC Systems > Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. > Leverages Graph Analysis for Fast Processing & Easy Data Exploration > http://p.sf.net/sfu/hpccsystems > ------------------------------------------------------------------------------ HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions Find What Matters Most in Your Big Data with HPCC Systems Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. Leverages Graph Analysis for Fast Processing & Easy Data Exploration http://p.sf.net/sfu/hpccsystems _______________________________________________ DSpace-tech mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

