You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by "Gene B. Gragg" <gb...@uchicago.edu> on 2020/07/30 23:25:14 UTC

difficulties with apache-jena-3.16/log4j2.properties

Any attempt to invoke ANY of the shell scripts in  apache-jena-3.16.0/bin, for example, 'bin/sparql --version', yields:
Error: Could not find or load main class 1.jena.apache-jena-3.16.0.log4j2.properties
But if in the scripts I comment out the line:
LOGGING="${LOGGING:--Dlog4j.configurationFile=file:$JENA_HOME/log4j2.properties}"
there is no problem, and 'bin/sparql --version' correctly yields:
Jena:       VERSION: 3.16.0
Jena:       BUILD_DATE: 2020-07-09T16:13:45+0000

Note that the environment variable $JENA_HOME has been correctly set:
'echo $JENA_HOME' correctly yields '/Users/GeneGragg 1/jena/apache-jena-3.16.0',
and 'cd $JENA_HOME' correctly puts me in 'apache-jena-3.16.0 %'

Is it a problem that my home directory, /Users/GeneGragg 1/, contains a space?

(I am using macOS Catalina, and the zsh shell [but the same things happens if I use bsh])



Gene Gragg
University of Chicago
Professor (Oriental Institute, Linguistics, NELC)
Oriental Institute
1155 E. 58th St.
Chicago IL 60637
Tel: (773) 307-7486
Fax: (773) 702-9853

Re: difficulties with apache-jena-3.16/log4j2.properties

Posted by Andy Seaborne <an...@apache.org>.
Hi Gene,

Caveat: I'm not a mac user , nor zsh.

The scripts start :

#!/bin/sh

What is /bin/sh linked to on a mac?


JENA_HOME does not need to be set. The scripts should work it out 
themselves. Does this way work?

On a Mac, the script have to their own resolveLink for potential 
symbolic links - having to do it in script risk space problems.

On 31/07/2020 00:25, Gene B. Gragg wrote:
> Any attempt to invoke ANY of the shell scripts

The scripts are all the same, generated from a single template. The only 
difference is the executable "main" at the end of the script.

(avoiding trying to ship symbolic links)

> in  apache-jena-3.16.0/bin, for example, 'bin/sparql --version', yields:
> Error: Could not find or load main class 1.jena.apache-jena-3.16.0.log4j2.properties
> But if in the scripts I comment out the line:
> LOGGING="${LOGGING:--Dlog4j.configurationFile=file:$JENA_HOME/log4j2.properties}"
> there is no problem, and 'bin/sparql --version' correctly yields:

Could you please put that back and add just after the script has 
potentially manipulated it.:

# After "---- Setup"
echo "JENA_HOME='$JENA_HOME'"
echo "LOGGING='$LOGGING'"
exit

so we can see what JENA_HOME is set to.

> Jena:       VERSION: 3.16.0
> Jena:       BUILD_DATE: 2020-07-09T16:13:45+0000
> 
> Note that the environment variable $JENA_HOME has been correctly set:
> 'echo $JENA_HOME' correctly yields '/Users/GeneGragg 1/jena/apache-jena-3.16.0',
> and 'cd $JENA_HOME' correctly puts me in 'apache-jena-3.16.0 %'

What's the "%"?

cd $JENA_HOME

should not work (not that I use zsh or bsh)
because it's

cd /Users/GeneGragg 1/jena/apache-jena-3.16.0

i.e.
cd /Users/GeneGragg
and extra an arg to cd.

> Is it a problem that my home directory, /Users/GeneGragg 1/, contains a space?

Shouldn't be but.

     Andy

> 
> (I am using macOS Catalina, and the zsh shell [but the same things happens if I use bsh])
> 
> 
> 
> Gene Gragg
> University of Chicago
> Professor (Oriental Institute, Linguistics, NELC)
> Oriental Institute
> 1155 E. 58th St.
> Chicago IL 60637
> Tel: (773) 307-7486
> Fax: (773) 702-9853
>