hsqldb - "Could not load properties from file" on ubuntu - hsqldb

I'm trying to run hsqldb on ubuntu. I changed the runServer.bat to runServer.sh.
original runServer.bat:
cd ..\data
#java -classpath ../lib/hsqldb.jar org.hsqldb.server.Server %1 %2 %3 %4 %5 %6 %7 %8 %9
my runServer.sh:
java -classpath /home/msk5804/portal/hsqldb-2.2.5/hsqldb/lib/hsqldb.jar org.hsqldb.server.Server %1 %2 %3 %4 %5 %6 %7 %8 %9
I originally kept the cd ../data but that caused problems.
So instead I put the server.properties file in the bin directory as the runServer.sh.
However, org.hsqldb.server.Server still can't find the server.properties file.
Any ideas?

The server.properties file should be located in the home directory of the user that starts the server. The command to start the server is issued from this directory. This is detailed in the Guide:
http://hsqldb.org/doc/2.0/guide/unix-chapt.html#unix_cat_setup-sect

Related

Apache HTTP Server Docker Image - Cleaner configuration in Dockerfile wanted

I have this Dockerfile that does extra configuration of the official Apache HTTP Server Docker image. Is there a cleaner way to do this inside a Dockerfile? I'm very unfamiliar with Apache HTTP Server configuration and was just about able to cobble this together. (The reason for enabling mod_rewrite is because I use it in a .htaccess file in the htdocs folder)
ARG BUILD_DIR=/usr/src/app
FROM node:10.13.0-alpine as build
ARG BUILD_DIR
WORKDIR $BUILD_DIR
COPY package.json .
RUN npm install
COPY src src
COPY public public
RUN npm run build
FROM httpd:2.4.37-alpine
ARG BUILD_DIR
ENV SERVER_CONTAINER_NAME=server
COPY --from=build $BUILD_DIR/build htdocs
RUN sed -i 's,#\(LoadModule rewrite_module modules/mod_rewrite.so\),\1,g' conf/httpd.conf \
&& sed -i -e '/<Directory "\/usr\/local\/apache2\/htdocs">/,/<\/Directory>/{s/AllowOverride None/AllowOverride All/}' conf/httpd.conf \
&& sed -i 's,#\(LoadModule proxy_module modules/mod_proxy.so\),\1,g' conf/httpd.conf \
&& sed -i 's,#\(LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so\),\1,g' conf/httpd.conf \
&& echo 'ProxyRequests off' >> conf/httpd.conf \
&& echo 'ProxyPass /ws ws://${SERVER_CONTAINER_NAME}:8080/ws interpolate' >> conf/httpd.conf
It might be cleaner to keep the modified versions of those config files outside of the image, and then copy them into the container during the build.
Alternatively, you could put all the shell commands in a script. During the build, COPY the script into the container. At the end of the script add something like this:
exec /usr/sbin/apache2ctl -f /etc/apache2/apache2.conf -DFOREGROUND
to start your server. Then have docker invoke the script as
CMD [ "/MyScript.sh" ]

Difference between &> and > in Hive

Can anyone tell me what is the difference betwwen &> and > in hive?
When to use which one?
For my work, hive -f Script.hql > output.xls works and hive -f Script.hql &> output.xlsx works?
This is not specific to hive but rather a feature in your shell. command > file redirects stdout to a file and command &> file redirects both stderr and stdout to the same file.
See also Redirect stderr and stdout in a Bash script

Configuring Intellij IDEA to use Kdiff3 as merge program

I would like to know the correct parameters to be passed to Kdiff3 from Intellij IDEA's external diff tools menu in order to use Kdiff3 for merging.
At some point, the correct parameters were:
%2 %1 %3 -o %4
See the accepted answer for current values.
The parameters are:
%3 %2 %1 -o %4
Parameters %2 and %1 are interchangeable. %1 is for local changes and %2 are the changes in the base branch.
Considering kdiff3 documentation
Merging 3 files:
kdiff3 file1 file2 file3 -m
kdiff3 file1 file2 file3 -o outputfile
Note that file1 will be treated as base of file2 and file3.
For Intellij, %3 is the base version. %1 are the changes in the branch you are rebasing, %2 are the changes in the new base branch.
Intellij 2016.2 Ultimate edition
With Android Studio 3.0 Canary 1 (which is based on IntelliJ 2017.1) these values work for me:
external diff parameters: %3 %1 %2
external merge parameters: %3 %1 %2 -o %4

Cannot install package using composer in NetBeans

I'm using symfony2.1 on XAMPP, with NetBeans 7.3 as the IDE. And I want to install friendofsymfony/rest-bundle package by adding these line on require section
"friendsofsymfony/rest-bundle": "0.11.0",
And then I right click on project, then Composer > Update
What I get on output window is
D:\xampp\php\php.exe C:\ProgramData\Composer\bin\composer --ansi --no-interaction update
# This file must be saved with Unix line endings, or cygwin will choke
DIR=`dirname "$0"`;
DIRECTORY=$(cd "${DIR}" && pwd)
if command -v 'cygpath' >/dev/null 2>&1; then
DIRECTORY=`cygpath -m $DIRECTORY`;
fi
PHAR="$(echo $DIRECTORY | sed 's/ /\ /g')/composer.phar"
php "${PHAR}" $*
Done.
And the package is not installed.
Am I doing it right? How to install the package correctly using Composer on NetBeans?
Do you use Windows?
Tools -> PHP -> Composer -> Composer: select the composer.phar file!
Then try again.

bundle not found via ssh

If I ssh into my VPS as the deployment user and run bundle -v I get Bundler version 1.1.5 as expected.
If I run ssh deployment#123.123.123.123 bundle -v, then I see bash: bundle: command not found
Why isn't bundle being shown running commands via ssh?
More Info
$ cat ~/.bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
if [ -d "${RBENV_ROOT}" ]; then
export PATH="${RBENV_ROOT}/bin:${PATH}"
eval "$(rbenv init -)"
fi
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
When you run:
ssh deployment#123.123.123.123
You get a login shell on the remote host, which means that your shell will run (...for bash...) .bash_profile or .profile or equivalent AS WELL AS your per-shell initialization file.
When you run:
ssh deployment#123.123.123.123 some_command
This does not start a login shell, so it only runs the per-shell initialization file (e.g., .bashrc).
The problem you've described typically means that you need something in your .profile file (typically an environment variable setting) for everything to work.