History-Research-Environment / HRE--History-Research-Environment

Main repo for HRE code
https://historyresearchenvironment.org/
GNU Affero General Public License v3.0
32 stars 6 forks source link

Installation problem #34

Closed MichaelErichsen closed 6 years ago

MichaelErichsen commented 6 years ago

The log displays the following:

Root exception: java.nio.file.NoSuchFileException: c:\temp\hre-log.0.0.txt.lck

This is due to that HRE by default tries to create a log file in the directory c:\temp

MichaelErichsen commented 6 years ago

The solution will be to change this to the installation directory. This will happen in next build.

MichaelErichsen commented 6 years ago

A workaround is to create a directory called c:/temp until the fix is ready.

HREferg commented 6 years ago

Aha! The old C:/temp/ issue – confirm that creating a C:/temp folder fixes things – a whole lot of different things now evident.

Don

From: Michael Erichsen notifications@github.com Sent: Sunday, June 24, 2018 1:51 AM To: History-Research-Environment/HRE--History-Research-Environment HRE--History-Research-Environment@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [History-Research-Environment/HRE--History-Research-Environment] Installation problem (#34)

The log displays the following:

Root exception: java.nio.file.NoSuchFileException: c:\temp\hre-log.0.0.txt.lck

This is due to that HRE by default tries to create a log file in the directory c:\temp

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/History-Research-Environment/HRE--History-Research-Environment/issues/34 , or mute the thread https://github.com/notifications/unsubscribe-auth/AZq_wJEOTGo2Lm6wBbOHs6HmhEOYDDMYks5t_mPsgaJpZM4U01kq .

HREferg commented 6 years ago

Believe it would be better to set the log file into c:/Users/username/HRE/…. And whatever the equivalent is in the Mac and Linux worlds.

Don

richard-damon commented 6 years ago

You probably want to use the environment variables to get the base home directory path $USERPROFILE on Windows and $HOME on *nix including OS/X

It might have been moved to someplace else when they configured the system.

MichaelErichsen commented 6 years ago

@HREferg: This is indeed a known error. I have built v0.1 from the ground up, while migrating features from the mock up. Along the way some things have been hardcoded, which now surface, as you are starting to test. @richard-damon: We don't need to fiddle with more environment variables than JAVA_HOME. There are two standard locations that will always work:

Both will always work. The lazy programmer just needs to avoid hardcoding other locations. HRE already has a preferences setting for the log location, which users can modify in the preferences panels. I need to put the initial default in one of these as noted above.

MichaelErichsen commented 6 years ago

org.historyresearchenvironment.client.HreLogger changed from String logFilePath = preferences.get("LOGFILEPATH", "c:\temp\"); to String logFilePath = preferences.get("LOGFILEPATH", ".//");

MichaelErichsen commented 6 years ago

This has now been fixed in build 0.1.0.201806241508, which adds a sample database in the execution root and points to it and also by default puts the log there.