Description
I get a bunch of unrelated noise from log4j when I run hash c0b79c5.
I am running from the bin directory of the repository after mvn clean install.
$ ./gremlin.sh -v log4j:WARN No appenders could be found for logger (com.jcabi.manifests.Manifests). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. gremlin 3.2.0-SNAPSHOT
Attachments
Issue Links
Activity
I still got the warning?
Ariels-MacBook-Pro-2:bin aweisberg$ pwd /Users/aweisberg/repos/incubator-tinkerpop/gremlin-console/target/apache-gremlin-console-3.2.0-SNAPSHOT-standalone/bin Ariels-MacBook-Pro-2:bin aweisberg$ ./gremlin.sh -v log4j:WARN No appenders could be found for logger (com.jcabi.manifests.Manifests). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. gremlin 3.2.0-SNAPSHOT Ariels-MacBook-Pro-2:bin aweisberg$
run as bin/gremlin.sh instead of being in the bin directory itself. i've always wanted this thing to work any way you run it, but someone with smarter shell scripting skills than me will have to figure that out
The DIR variable in the script already has the path of the script so you should just need to use a relative path from that to the configuration file. I tried it and I can even cat the generated path to get the config file, but I still get the log4j error.
GitHub user dkuppitz opened a pull request:
https://github.com/apache/tinkerpop/pull/444
TINKERPOP-1158 gremlin.sh -v emits log4j initialization errors
https://issues.apache.org/jira/browse/TINKERPOP-1158
Tweaked `gremlin.sh` so that it can be started from anywhere.
Removed all shell scripts that just forwarded the command to another script and added symbolic links instead.
VOTE: +1
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apache/tinkerpop TINKERPOP-1158
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/tinkerpop/pull/444.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #444
commit a6d84e4d8b7a29a86cc57f6171f77b2630098bc7
Author: Daniel Kuppitz <daniel_kuppitz@hotmail.com>
Date: 2016-09-28T20:13:56Z
Tweaked `gremlin.sh` so that it can be started from anywhere.
Removed all shell script that just forwarded the command to another script and added symlinks instead.
Github user spmallette commented on a diff in the pull request:
https://github.com/apache/tinkerpop/pull/444#discussion_r81105873
— Diff: bin/gremlin.sh —
@@ -1,22 +0,0 @@
-#!/bin/bash
— End diff –
The diff makes it look like the file was removed and then added back? Either way, any reason we don't have the apache license header here?
Github user spmallette commented on a diff in the pull request:
https://github.com/apache/tinkerpop/pull/444#discussion_r81105998
— Diff: gremlin-console/bin/gremlin.sh —
@@ -0,0 +1 @@
+../target/apache-tinkerpop-gremlin-console-3.1.5-SNAPSHOT-standalone/bin/gremlin.sh
— End diff –
same thing as the other comment - no license header
Github user spmallette commented on a diff in the pull request:
https://github.com/apache/tinkerpop/pull/444#discussion_r81107375
— Diff: docs/src/dev/developer/release.asciidoc —
@@ -75,11 +75,13 @@ might be high.
.. `mvn verify -DskipPerformanceTests=false`
. `bin/publish-docs.sh <username>` - note that under a release candidate the documentation is published as SNAPSHOT
. `mvn versions:set -DnewVersion=xx.yy.zz -DgenerateBackupPoms=false` to update the project files to reference a non-SNAPSHOT version
+. `pushd gremlin-console/bin; ln -fs ../target/apache-tinkerpop-gremlin-console-xx.yy.zz-standalone/bin/gremlin.sh gremlin.sh; popd`
. `git diff` and review the updated files (expect all `pom.xml` files and this README)
. `git commit -a -m "TinkerPop xx.yy.zz release"` and `git push`
. `git tag -a -m "TinkerPop xx.yy.zz release" xx.yy.zz` and `git push --tags`
. `mvn clean install`
. `mvn versions:set -DnewVersion=xx.yy.zz-SNAPSHOT -DgenerateBackupPoms=false` to go back to SNAPSHOT
+. `pushd gremlin-console/bin; ln -fs ../target/apache-tinkerpop-gremlin-console-xx.yy.zz-SNAPSHOT-standalone/bin/gremlin.sh gremlin.sh; popd`
— End diff –
You need similar comments down in the "PMC VOTE" section - that's where actual release occurs.
This section is just for a "release candidate" like an M1 or whatever.
Github user spmallette commented on the issue:
https://github.com/apache/tinkerpop/pull/444
Overall - i get:
```text
~/git/apache/incubator-tinkerpop$ bin/gremlin.sh
bin/gremlin.sh: line 54: CP: unbound variable
~/git/apache/incubator-tinkerpop$ cd gremlin-console
~/git/apache/incubator-tinkerpop/gremlin-console$ bin/gremlin.sh
bin/gremlin.sh: line 54: CP: unbound variable
~/git/apache/incubator-tinkerpop/gremlin-console$ cd target/stand
~/git/apache/incubator-tinkerpop/gremlin-console/target/apache-tinkerpop-gremlin-console-3.1.5-SNAPSHOT-standalone$ bin/gremlin.sh
bin/gremlin.sh: line 54: CP: unbound variable
```
Github user dkuppitz commented on a diff in the pull request:
https://github.com/apache/tinkerpop/pull/444#discussion_r81114584
— Diff: bin/gremlin.sh —
@@ -1,22 +0,0 @@
-#!/bin/bash
— End diff –
It's no longer a file, it's a symbolic link. GitHub only makes it look like a normal file.
Github user dkuppitz commented on a diff in the pull request:
https://github.com/apache/tinkerpop/pull/444#discussion_r81114609
— Diff: gremlin-console/bin/gremlin.sh —
@@ -0,0 +1 @@
+../target/apache-tinkerpop-gremlin-console-3.1.5-SNAPSHOT-standalone/bin/gremlin.sh
— End diff –
Same answer.
Github user dkuppitz commented on a diff in the pull request:
https://github.com/apache/tinkerpop/pull/444#discussion_r81114777
— Diff: docs/src/dev/developer/release.asciidoc —
@@ -75,11 +75,13 @@ might be high.
.. `mvn verify -DskipPerformanceTests=false`
. `bin/publish-docs.sh <username>` - note that under a release candidate the documentation is published as SNAPSHOT
. `mvn versions:set -DnewVersion=xx.yy.zz -DgenerateBackupPoms=false` to update the project files to reference a non-SNAPSHOT version
+. `pushd gremlin-console/bin; ln -fs ../target/apache-tinkerpop-gremlin-console-xx.yy.zz-standalone/bin/gremlin.sh gremlin.sh; popd`
. `git diff` and review the updated files (expect all `pom.xml` files and this README)
. `git commit -a -m "TinkerPop xx.yy.zz release"` and `git push`
. `git tag -a -m "TinkerPop xx.yy.zz release" xx.yy.zz` and `git push --tags`
. `mvn clean install`
. `mvn versions:set -DnewVersion=xx.yy.zz-SNAPSHOT -DgenerateBackupPoms=false` to go back to SNAPSHOT
+. `pushd gremlin-console/bin; ln -fs ../target/apache-tinkerpop-gremlin-console-xx.yy.zz-SNAPSHOT-standalone/bin/gremlin.sh gremlin.sh; popd`
— End diff –
This only needs to be done when we bump the version. The first commit happens after the version bump, hence it should all be in a good shape when the release is made.
Github user dkuppitz commented on the issue:
https://github.com/apache/tinkerpop/pull/444
I saw this error yesterday, but fixed it (after rebasing). Are you sure you've had the latest version for your test?
Github user dkuppitz commented on the issue:
https://github.com/apache/tinkerpop/pull/444
Sorry, I must have lost some changes when I made the last rebase. Unbound variable errors are fixed now.
Github user spmallette commented on a diff in the pull request:
https://github.com/apache/tinkerpop/pull/444#discussion_r81117737
— Diff: docs/src/dev/developer/release.asciidoc —
@@ -75,11 +75,13 @@ might be high.
.. `mvn verify -DskipPerformanceTests=false`
. `bin/publish-docs.sh <username>` - note that under a release candidate the documentation is published as SNAPSHOT
. `mvn versions:set -DnewVersion=xx.yy.zz -DgenerateBackupPoms=false` to update the project files to reference a non-SNAPSHOT version
+. `pushd gremlin-console/bin; ln -fs ../target/apache-tinkerpop-gremlin-console-xx.yy.zz-standalone/bin/gremlin.sh gremlin.sh; popd`
. `git diff` and review the updated files (expect all `pom.xml` files and this README)
. `git commit -a -m "TinkerPop xx.yy.zz release"` and `git push`
. `git tag -a -m "TinkerPop xx.yy.zz release" xx.yy.zz` and `git push --tags`
. `mvn clean install`
. `mvn versions:set -DnewVersion=xx.yy.zz-SNAPSHOT -DgenerateBackupPoms=false` to go back to SNAPSHOT
+. `pushd gremlin-console/bin; ln -fs ../target/apache-tinkerpop-gremlin-console-xx.yy.zz-SNAPSHOT-standalone/bin/gremlin.sh gremlin.sh; popd`
— End diff –
we bump versions in PMC VOTE:
and
While we need those lines where you currently have them, we almost never execute those steps that you updated (i.e. we haven't done a release candidate since 3.0.0)
Github user spmallette commented on the issue:
https://github.com/apache/tinkerpop/pull/444
ok - so "unbound variable" is gone as a problem, but:
```text
:~/git/apache/incubator-tinkerpop$ bin/gremlin.sh -v
log4j:WARN No appenders could be found for logger (com.jcabi.manifests.Manifests).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
gremlin 3.2.3-SNAPSHOT
~/git/apache/incubator-tinkerpop/gremlin-console$ bin/gremlin.sh -v
gremlin 3.2.3-SNAPSHOT
:~/git/apache/incubator-tinkerpop/gremlin-console/target/apache-tinkerpop-gremlin-console-3.2.3-SNAPSHOT-standalone$ bin/gremlin.sh -v
gremlin 3.2.3-SNAPSHOT
```
so just the gremlin.sh in root is "bad". imo, we should just drop that file anyway. we don't have a gremlin-server.sh in there nor do we have a associated `.bat`. not sure what that file is good for.
Github user robertdale commented on a diff in the pull request:
https://github.com/apache/tinkerpop/pull/444#discussion_r81139237
— Diff: gremlin-console/src/main/bin/gremlin.sh —
@@ -111,3 +115,5 @@ fi
- Start the JVM, execute the application, and return its exit code
exec $JAVA $JAVA_OPTIONS $MAIN_CLASS "$@"
+
+popd > /dev/null-
- End diff –
-
This will never be reached. Safe to remove.
Github user dkuppitz commented on a diff in the pull request:
https://github.com/apache/tinkerpop/pull/444#discussion_r81171446
— Diff: gremlin-console/src/main/bin/gremlin.sh —
@@ -111,3 +115,5 @@ fi
- Start the JVM, execute the application, and return its exit code
exec $JAVA $JAVA_OPTIONS $MAIN_CLASS "$@"
+
+popd > /dev/null-
- End diff –
-
Cool, I wasn't sure if that's true for all shells.
Github user dkuppitz commented on the issue:
https://github.com/apache/tinkerpop/pull/444
```
daniel@cube /projects/apache/tinkerpop (TINKERPOP-1158) gremlin.sh -v emits log4j initialization errors $ bin/gremlin.sh -v
gremlin 3.1.5-SNAPSHOT
daniel@cube /projects/apache/tinkerpop (TINKERPOP-1158) gremlin.sh -v emits log4j initialization errors $ cd gremlin-console/
daniel@cube /projects/apache/tinkerpop/gremlin-console (TINKERPOP-1158) gremlin.sh -v emits log4j initialization errors $ bin/gremlin.sh -v
gremlin 3.1.5-SNAPSHOT
daniel@cube /projects/apache/tinkerpop/gremlin-console (TINKERPOP-1158) gremlin.sh -v emits log4j initialization errors $ cd target/apache-tinkerpop-gremlin-console-3.1.5-SNAPSHOT-standalone/
daniel@cube /projects/apache/tinkerpop/gremlin-console/target/apache-tinkerpop-gremlin-console-3.1.5-SNAPSHOT-standalone (TINKERPOP-1158) gremlin.sh -v emits log4j initialization errors $ bin/gremlin.sh -v
gremlin 3.1.5-SNAPSHOT
```
Works for me from all directories. However, I'm also not sure why we have these 2 files / symbolic links at all. I wouldn't mind to drop them both.
Github user spmallette commented on the issue:
https://github.com/apache/tinkerpop/pull/444
i never use them, but marko says he always uses `gremlin/console/bin/gremlin.sh`.....oh - i might know what happened - let me retry
Github user spmallette commented on the issue:
https://github.com/apache/tinkerpop/pull/444
Re-tested - all good for me now
VOTE +1
Github user dkuppitz commented on the issue:
https://github.com/apache/tinkerpop/pull/444
@okram We could get rid of the additional release steps if we would remove the 2 extra `gremlin.sh` files. Any reason why you prefer those? If you're just too lazy to type out the `target` path, you could create a bash alias. Look, that's what I have in my `~/.bashrc`:
```
gremlin() {
args=$@
pushd /projects/apache/tinkerpop/gremlin-console/target/gremlin-console-standalone > /dev/null
if [ $? -eq 0 ]; then
bin/gremlin.sh ${args}
popd > /dev/null
else
echo "Gremlin Console binary does not exist."
fi
}
alias g=gremlin
```
And here's how it works:
```
daniel@cube ~ $ g -v
gremlin 3.1.5-SNAPSHOT
daniel@cube ~ $ g
\,,,/
(o o)
----oOOo(3)oOOo----
plugin activated: tinkerpop.server
plugin activated: tinkerpop.utilities
plugin activated: tinkerpop.tinkergraph
gremlin>
```
Github user okram commented on the issue:
https://github.com/apache/tinkerpop/pull/444
I get this:
```
~/software/tinkerpop bin/gremlin.sh
bin/gremlin.sh: line 25: syntax error near unexpected token `<<<'
```
Github user dkuppitz commented on the issue:
https://github.com/apache/tinkerpop/pull/444
This branch was rebased and force pushed. If you've had it checked out before, you'll likely have a merge conflict in your local version. Try to checkout a fresh copy:
```
git checkout master
git branch -D TINKERPOP-1158
git pull
git checkout TINKERPOP-1158
```
Github user spmallette commented on the issue:
https://github.com/apache/tinkerpop/pull/444
@okram can you please re-test?
i personally never use the "convenience" `gremlin.sh` files as i don't like my `ext/` not getting cleaned between builds. it wouldn't bother me if they were gone and we'd drop two extra steps out of the release process.
Github user okram commented on the issue:
https://github.com/apache/tinkerpop/pull/444
Already did. Told @dkuppitz what he wanted to know... I forget what he deduced from that.
Github user dkuppitz commented on the issue:
https://github.com/apache/tinkerpop/pull/444
The gist was that you could live without the 2 additional files, but your life would be affected by an everlasting sadness. Hence we concluded that we keep the symbolic links.
However, I still need one more vote to merge this PR.
Github user okram commented on the issue:
https://github.com/apache/tinkerpop/pull/444
I believe I'm a VOTE +0 as I use `bin/gremlin.sh` all the time.
Github user spmallette commented on the issue:
https://github.com/apache/tinkerpop/pull/444
@okram I think we're ok with with keeping the files since you use them. The real vote here is for whether or not `-v` (and gremlin.sh in general) works in `/target/`, `gremlin-console` and at the root of the repo. If those are all good for you and log4j problem isn't present, then you can +1
dah - gremlin.sh from the root stinks. you should be able to run the bin/gremlin.sh in gremlin-console without trouble. i prefer to use the one in that is in the staged distribution itself gremlin-console/target/stand after mvn clean install.
anyway, those options are both workarounds for the init problems we have with running it from root.