Importing older statistics

36 views
Skip to first unread message

Poulter, Dale

unread,
Nov 27, 2024, 5:37:13 AM11/27/24
to DSpace Technical Support

Good morning,

 

We are trying to import older statistics to Dspace 7.6 but are getting a null pointer exeception when skipping dns lookup.  When we attempt to include dnslookup we also get a reflective access operation.  Since it is only  a warning I am assuming I can ignore for now and focus on the null exeception.  Has anyone encountered this issue?

 

 

 

 

./dspace stats-log-importer -v -s -i /apps/Temp/stats/test.txt

Writing to solr server at: server

Processing file: /apps/Temp/stats/test.txt

Line:20241031000025832,view_item,dedc3889-7207-45e7-b6a4-5bc6044a1d29,2024-10-31T00:00:25,anonymous,129.59.95.115

Exception: null

java.lang.NullPointerException

        at org.dspace.statistics.util.StatisticsImporter.load(StatisticsImporter.java:290)

        at org.dspace.statistics.util.StatisticsImporter.main(StatisticsImporter.java:516)

        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.base/java.lang.reflect.Method.invoke(Method.java:566)

        at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:277)

        at org.dspace.app.launcher.ScriptLauncher.handleScript(ScriptLauncher.java:133)

        at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:98)

-Dale

 

Vanderbilt

 

Dale Poulter
Director
, Library Technology and Assessment Services
Vanderbilt Libraries | Vanderbilt University
615-343-5388 | dale.p...@Vanderbilt.Edu | https://www.library.vanderbilt.edu

Pronouns: he/him/his

 

My working day may not be your working day. Please do not feel obliged to reply to this email outside of your normal working hours.

 

 

Alan Orth

unread,
Nov 28, 2024, 7:20:02 AM11/28/24
to Poulter, Dale, DSpace Technical Support

Dear Dale,

I've never used the DSpace Solr import/export scripts. I always had some issues with them somehow. A few years ago I discovered this excellent https://github.com/freedev/solr-import-export-json utility and I do all Solr work using that, including migrating from DSpace 6 to DSpace 7 earlier this year.

First, export from DSpace 6 Solr (adjust output file as needed, depending on size of stats):

$ ./run.sh -s http://localhost:8081/solr/statistics -a export -o /tmp/statistics.json -k uid

Then import into DSpace 7:

$ ./run.sh -s http://localhost:8983/solr/statistics -a import -o /tmp/statistics.json -k uid

You can even do things like limit the export to a certain range, for example 2023:

$ ./run.sh -s http://localhost:8081/solr/statistics -a export -o /tmp/statistics-2023.json -f 'time:[2023-01-01T00\:00\:00Z TO 2023-12-31T23\:59\:59Z]' -k uid

This is useful if you want to migrate stats up to a certain date before moving to DSpace 7, then import the remaining ones after moving the production server, for example.

Hope that gives you another solution,

Regards

--
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 dspace-tech...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/dspace-tech/BN0PR08MB7470433229FE082DB3D58FF1FE282%40BN0PR08MB7470.namprd08.prod.outlook.com.


--
Reply all
Reply to author
Forward
0 new messages