Hi Francis
Here is something I used quite a while ago that worked:
http://wiki.lib.sun.ac.za/index.php/SUNScholar/Asset_Statistics/Old_Versions
Regards
hg
*Hilton Gibson*
Ubuntu Linux Systems Administrator
JS Gericke Library
Room 1025D
Stellenbosch University
Private Bag X5036
Stellenbosch
7599
South Africa
Tel: +27 21 808 4100 | Cell: +27 84 646 4758
http://scholar.sun.ac.za
http://bit.ly/goodir
http://library.sun.ac.za
http://za.linkedin.com/in/hiltongibson
On 24 January 2014 17:23, Brouns, Francis <[email protected]> wrote:
> Hi all,
>
> we are in the process of upgrading our Dspace 1.8.3 server to Dspace 3.2
> and also want to switch to the new statistics module based on Solr. That
> means that we need to convert the old logs and import those into Solr. It
> seems that a full path needs to be specified for the location of the input
> log files and the output. When using relative paths the -m switch does not
> work. In dspace 1.8.3 a nullpointer exception is returned in the console.
> When running stats-log-converter from dspace 3.2, the console does not
> report any errors. Console reports that it is loading dspace.cfg and
> log4j.properties and then list some of the log files.
> However, the dspace log file reports for every file the same file access
> problem. That seems to be because the filename of the -o parameter is joint
> with the file name of the log, resulting in an invalid path.
>
> The problem is that it does not convert all files. We never have changed
> log4j.properties, but nevertheless we have a mix of log files appended with
> numbers and files appended with a date. The current 3.2 log4j.properties
> uses a DailyFileAppender with log4j.appender.A1.DatePattern=yyyy-MM-dd.
> Nevertheless it only seems to read the log files that have a number
> appended.
>
> I have two questions
> How can I get it to convert all log files? Other than copying them all
> into a new file. That file would be very large.
>
> When do I need to use the -n parameter? The logs stem from before Dspace
> 1.5.2 and from Dspace 1.8.x.
>
> This is running on a Linux (SLES) server, Sun java 1.6
>
>
> For your information I copy below the output of the console and the log
> file
>
> best wishes, Francis
>
> ======= dspace 1.8.3 ==============
> When running the same from dspace183 console returns a Nullpointer
> tomcat@lnx:/dspace/dspace183/bin> ./dspace stats-log-converter -i
> ../log/dspace.log.9 -o ../log/solr5.log -m -n
> dspace.log.9
> About to convert '/dspace/dspace183/bin/../log/dspace.log.9' to
> '../log/solr5.login/../log/dspace.log.9'
> Exception: null
> java.lang.NullPointerException
> at
> org.dspace.statistics.util.ClassicDSpaceLogConverter.convert(ClassicDSpaceLogConverter.java:234)
> at
> org.dspace.statistics.util.ClassicDSpaceLogConverter.main(ClassicDSpaceLogConverter.java:365)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:183)
>
> the dspace log file reports similar errors as in dspace 3.2, a file access
> problem
> ================ dspace 3.2 ==============
>
> Console log when running stats-log-converter from dspace3.2
> tomcat@lnx:/dspace/dspace32/bin> ./dspace stats-log-converter -i
> ../log/dspace.log.9 -o ../log/solr4.log -m
> INFO [main] (DSpaceKernelInit.java:52) - Created new kernel:
> DSpaceKernel:org.dspace:name=ee3fea82-9d3a-4cf1-b506-03fbbe162223,type=DSpaceKernel:lastLoad=null:loadTime=0:running=false:kernel=null
> INFO [main] (ConfigurationManager.java:1224) - Loading from classloader:
> file:/dspace/dspace32/config/dspace.cfg
> INFO [main] (ConfigurationManager.java:1224) - Using dspace provided log
> configuration (log.init.config)
> INFO [main] (ConfigurationManager.java:1224) - Loading:
> /dspace/dspace32/config/log4j.properties
> dspace.log.9
> dspace.log.95
> dspace.log.91
> dspace.log.93
> dspace.log.94
> dspace.log.98
> dspace.log.92
> dspace.log.99
> dspace.log.96
> dspace.log.90
> dspace.log.97
>
>
> extract from dspace.log for dspace 3.2
> 2014-01-24 14:47:33,603 ERROR
> org.dspace.statistics.util.ClassicDSpaceLogConverter @ File access problem
> java.io.FileNotFoundException: solr.logbin/../log/dspace.log.91 (No such
> file or directory)
> at java.io.FileOutputStream.open(Native Method)
> at java.io.FileOutputStream.<init>(FileOutputStream.java:194)
> at java.io.FileOutputStream.<init>(FileOutputStream.java:84)
> at java.io.FileWriter.<init>(FileWriter.java:46)
> at
> org.dspace.statistics.util.ClassicDSpaceLogConverter.convert(ClassicDSpaceLogConverter.java:106)
> at
> org.dspace.statistics.util.ClassicDSpaceLogConverter.main(ClassicDSpaceLogConverter.java:365)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:183
> ==================
>
> Deze e-mail is uitsluitend bestemd voor de geadresseerde(n). Verstrekking
> aan en gebruik door anderen is niet toegestaan. Open Universiteit sluit
> iedere aansprakelijkheid uit die voortvloeit uit elektronische verzending.
> Aan de inhoud van deze e-mail en/of eventueel toegevoegde bijlagen kunnen
> geen rechten worden ontleend.
>
> This e-mail is intended exclusively for the addressee(s), and may not be
> passed on to, or made available for use by any person other than the
> addressee(s). Open Universiteit rules out any and every liability resulting
> from any electronic transmission. No rights may be derived from the
> contents of this message.
>
>
> ------------------------------------------------------------------------------
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> _______________________________________________
> 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
>
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
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