[Dspace-tech] problem initializing statistics v 1.5.1

13 views
Skip to first unread message

Stephen Wilkinson

unread,
Aug 25, 2015, 11:23:21 AM8/25/15
to dspac...@lists.sourceforge.net

Hello all, I’m setting up a dspace server using v1.5.1, with tomcat and postgresql as the backend.

Dspace seems to be functioning properly but I’m getting an error when trying to initialize the statistics.

 

As the user dspace I tried to run [dspace]/bin/stat-initial; first I got a permission denied error which I fixed by making the files in the bin dir executable but I now get JAVA errors.  I’d appreciate it If anyone can point me in the right direction (pretty new to both dspace and linux btw).

 

The error I get is below where /apps/dspace is the install dir and dspace.log and checker.log which are mentioned in the error are in /apps/dspace/log.

 

[dspace@LIB-DspaceProduction ~]$ /apps/dspace/bin/stat-initial

log4j:ERROR setFile(null,true) call failed.

java.io.FileNotFoundException: /dspace.log (Permission denied)

        at java.io.FileOutputStream.openAppend(Native Method)

        at java.io.FileOutputStream.<init>(FileOutputStream.java:177)

        at java.io.FileOutputStream.<init>(FileOutputStream.java:102)

        at org.apache.log4j.FileAppender.setFile(FileAppender.java:289)

        at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:167)

        at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:163)

        at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:256)

        at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:220)

        at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:150)

        at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:163)

        at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:425)

        at org.apache.log4j.xml.DOMConfigurator.parseRoot(DOMConfigurator.java:394)

        at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:829)

        at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:712)

        at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:618)

        at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:470)

        at org.apache.log4j.LogManager.<clinit>(LogManager.java:122)

        at org.apache.log4j.Logger.getLogger(Logger.java:117)

        at org.dspace.core.ConfigurationManager.<clinit>(ConfigurationManager.java:88)

        at org.dspace.app.statistics.CreateStatReport.<clinit>(CreateStatReport.java:90)

log4j:ERROR setFile(null,true) call failed.

java.io.FileNotFoundException: /dspace.log (Permission denied)

        at java.io.FileOutputStream.openAppend(Native Method)

        at java.io.FileOutputStream.<init>(FileOutputStream.java:177)

        at java.io.FileOutputStream.<init>(FileOutputStream.java:102)

        at org.apache.log4j.FileAppender.setFile(FileAppender.java:289)

        at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:167)

        at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:163)

        at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:256)

        at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:132)

        at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:96)

        at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:654)

        at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:612)

        at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:509)

        at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:415)

        at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:441)

        at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:470)

        at org.dspace.core.ConfigurationManager.loadConfig(ConfigurationManager.java:703)

        at org.dspace.core.ConfigurationManager.getProperty(ConfigurationManager.java:135)

        at org.dspace.app.statistics.CreateStatReport.<clinit>(CreateStatReport.java:90)

log4j:ERROR setFile(null,true) call failed.

java.io.FileNotFoundException: /checker.log (Permission denied)

        at java.io.FileOutputStream.openAppend(Native Method)

        at java.io.FileOutputStream.<init>(FileOutputStream.java:177)

        at java.io.FileOutputStream.<init>(FileOutputStream.java:102)

        at org.apache.log4j.FileAppender.setFile(FileAppender.java:289)

        at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:167)

        at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:163)

        at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:256)

        at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:132)

        at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:96)

        at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:654)

        at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:612)

        at org.apache.log4j.PropertyConfigurator.parseCatsAndRenderers(PropertyConfigurator.java:533)

        at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:417)

        at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:441)

        at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:470)

        at org.dspace.core.ConfigurationManager.loadConfig(ConfigurationManager.java:703)

        at org.dspace.core.ConfigurationManager.getProperty(ConfigurationManager.java:135)

        at org.dspace.app.statistics.CreateStatReport.<clinit>(CreateStatReport.java:90)

 

Thank you

Stephen

 

Stephen Wilkinson

System Support Technician

Information Technology Services

McLaughlin Library

University of Guelph

GUELPH, ON.  N1G 2W1

519-824-4120 X 53939

swil...@uoguelph.ca

 

Stephen Wilkinson

unread,
Aug 25, 2015, 11:23:23 AM8/25/15
to Kim Shepherd, dspac...@lists.sourceforge.net

Hi Kim and thank you,

From dspace.cfg

 dspace.dir=/apps/dspace

Log.dir = ${dspace.dir)/log (the default)

And all files in /apps/dspace are owned by dspace:dspace which I think is the tomcat user as well (I know that dspace is the owner of the complete tomcat directory as well).

I believe that answers most of what you asked.

I guess I can try hard-coding the log dir instead of relying on a variable.

 

Thanks again

 

From: Kim Shepherd [mailto:ki...@waikato.ac.nz]
Sent: November 17, 2008 4:46 PM
To: Stephen Wilkinson
Subject: RE: [Dspace-tech] problem initializing statistics v 1.5.1

 

Hi Stephen,

 

Have a look at [dspace]/config/dspace.cfg and make sure that log.dir is set to the right path (I think the default should be ${dspace.dir)/log, and that your tomcat/dspace user has access to write to it.

It looks as though it’s searching for /dspace.log instead of /apps/dspace/log/dspace.log

 

I have a feeling that log4j.properties has your log directory correct, but dspace.cfg doesn’t.

 

Cheers,

 

Kim

Kim Shepherd

unread,
Aug 25, 2015, 11:23:24 AM8/25/15
to Stephen Wilkinson, dspac...@lists.sourceforge.net

Hi Stephen, perhaps check [dspace]/config/log4j.properties then. I presume logs are being written correctly?

Stephen Wilkinson

unread,
Aug 25, 2015, 11:23:25 AM8/25/15
to ki...@waikato.ac.nz, dspac...@lists.sourceforge.net

Hi Kim that's a tougher file to read but it is the one created by the build
I've never edited it nor the template it says to edit. I'll look more deeply at it in the am
dspace.log seems to be updating properly.
Thanks again
Stephen


From: Kim Shepherd
To: Stephen Wilkinson
Cc: dspac...@lists.sourceforge.net
Sent: Mon Nov 17 17:09:50 2008

Claudia Jürgen

unread,
Aug 25, 2015, 11:23:26 AM8/25/15
to Stephen Wilkinson, dspac...@lists.sourceforge.net
Hi Stephen,

if you're using the xmlui you might be affected by this bug:

http://sourceforge.net/tracker/index.php?func=detail&aid=2137425&group_id=19984&atid=119984

Hope that helps

Claudia Jürgen


Stephen Wilkinson schrieb:
> <mailto:swil...@uoguelph.ca> swil...@uoguelph.ca
>
>
>
>
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> DSpace-tech mailing list
> DSpac...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech

Stephen Wilkinson

unread,
Aug 25, 2015, 11:23:30 AM8/25/15
to Claudia...@ub.uni-dortmund.de, dspac...@lists.sourceforge.net
Thanks Claudia I am using xmlui
Stephen

Stephen Wilkinson

unread,
Aug 25, 2015, 11:23:31 AM8/25/15
to dspac...@lists.sourceforge.net, Wayne Johnston, Jeff Walker
Hello all and thanks again, I created a dspace.log and checker.log right
off of /
And ran stat-initial again, this now completes without errors. Does
anyone know if this will cause me grief latter on? I am using the xmlui
interface.

-----Original Message-----
From: Claudia Jürgen [mailto:Claudia...@ub.uni-dortmund.de]
Sent: November 18, 2008 2:54 AM
To: Stephen Wilkinson
Cc: dspac...@lists.sourceforge.net
Subject: Re: [Dspace-tech] problem initializing statistics v 1.5.1

Claudia Jürgen

unread,
Aug 25, 2015, 11:23:33 AM8/25/15
to Stephen Wilkinson, dspac...@lists.sourceforge.net
Hi Stephen,

the best thing would be to change
org.dspace.app.statistics.CreateStatReport to use the report.dir instead
of the log.dir for the output. This will work with both UI's.

If you're only working with the XMLUI you might change
org.dspace.app.statistics.StatisticsLoader to use the log.dir instead of
the report.dir.

Hope that helps

Claudia





Stephen Wilkinson schrieb:

Stephen Wilkinson

unread,
Aug 25, 2015, 11:23:42 AM8/25/15
to Claudia Jürgen, dspac...@lists.sourceforge.net
Thank you Claudia, I'll see if I can find a new jar file.

Snowy greetings
Stephen

-----Original Message-----
From: Claudia Jürgen [mailto:Claudia...@ub.uni-dortmund.de]
Sent: November 19, 2008 2:49 AM
To: Stephen Wilkinson
Subject: Re: [Dspace-tech] problem initializing statistics v 1.5.1

Hi Stephen,

as you're not using the source release, these classes are in the
dspace-api jar pulled from the repository.

Sunny greetings

Claudia


Stephen Wilkinson schrieb:
> Hi Claudia thanks ever so much for trying, I don't seem to have the same
> directory structure as you at all. I have [dspace-source]/dspace (no
> dspace-api) there is a src/main under that but all it contains
> is/config/build.xml; Lots of other */src/main/ as well but I don't see
the
> files anywhere.
> I've attached the directory listing I have if you're interested, they
> wouldn't be in .jar files would they?
>
> Thanks again
> Stephen
>
> -----Original Message-----
> From: Claudia Jürgen [mailto:Claudia...@ub.uni-dortmund.de]
> Sent: November 18, 2008 11:38 AM
> To: Stephen Wilkinson
> Subject: Re: [Dspace-tech] problem initializing statistics v 1.5.1
>
> Hi Stephen
>
> they are in
> [dspace-source]/dspace-api/src/main/java/org/dspace/app/statistics
>
> Claudia
>
>
> Stephen Wilkinson schrieb:
>> Thanks Claudia, I seem to be having a problem finding these files, can
> you
>> please tell me where they are located.
Reply all
Reply to author
Forward
0 new messages