Closed kaisbensalah closed 4 years ago
Interesting. I assume /usr/bin
is part of your PATH
environment variable, right? Can you execute the Graphviz commands such as dot
from the terminal?
@stefan-ka Yep. The dot command works fine for me.
This is weird. Works perfectly fine on my Ubuntu. Can you check your PATH
variable anyway? Does it contain /usr/bin
?
@stefan-ka Yep, it contains it.
Hmmm, I cannot reproduce this... Maybe a user/permission problem?
The error message means that the dot
executable cannot be found in any of the directories listed by your PATH
variable.
@kaisbe I also set up a Debian Linux and tested it with Eclipse 2019-12, and it works fine for me.
There must be an issue with your PATH
variable (separators always correct?) or the system user under which you run Eclipse cannot see the executable for permission reasons...
@stefan-ka OK. This is what's in PATH
variable:
/home/kais/.sdkman/candidates/sbt/current/bin:/home/kais/.sdkman/candidates/java/current/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
@stefan-ka
or the system user under which you run Eclipse cannot see the executable for permission reasons...
As a regular user (on the same session where I use Eclipse), This is what I get using ls /usr/bin | grep dot
:
dot
dot2gxl
dot_builtins
dotlockfile
dotty
gxl2dot
vimdot
This sounds very weird, since you were not able to reproduce the issue using the same version of Eclipse.
@kaisbe Really, very weird. Whats the output of ls -l /usr/bin | grep dot
?
Is the dot
file marked as executable? (x permission?)
@stefan-ka This is the output:
lrwxrwxrwx 1 root root 3 أفريل 8 2019 circo -> dot lrwxrwxrwx 1 root root 29 أفريل 8 2019 dot -> ../sbin/libgvc6-config-update lrwxrwxrwx 1 root root 6 أفريل 8 2019 dot2gxl -> gxl2gv -rwxr-xr-x 1 root root 18808 أفريل 8 2019 dot_builtins -rwxr-sr-x 1 root mail 18944 ديسمبر 3 2017 dotlockfile -rwxr-xr-x 1 root root 2085 أفريل 8 2019 dotty lrwxrwxrwx 1 root root 3 أفريل 8 2019 fdp -> dot lrwxrwxrwx 1 root root 6 أفريل 8 2019 gxl2dot -> gxl2gv lrwxrwxrwx 1 root root 3 أفريل 8 2019 neato -> dot lrwxrwxrwx 1 root root 3 أفريل 8 2019 osage -> dot lrwxrwxrwx 1 root root 3 أفريل 8 2019 patchwork -> dot lrwxrwxrwx 1 root root 3 أفريل 8 2019 sfdp -> dot lrwxrwxrwx 1 root root 3 أفريل 8 2019 twopi -> dot -rwxr-xr-x 1 root root 1082 أفريل 8 2019 vimdot
@kaisbe This is so weird, I'm running out of ideas... Can you run the following Java program within your Eclipse?
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
public class Test {
public static void main(String[] args) throws IOException {
Path path = Paths.get("/usr/bin");
System.out.println("directory exists: " + Files.exists(path));
System.out.println("Files named 'dot': ");
Files.list(path)
.filter(filePath -> "dot".equals(filePath.getFileName().toString()))
.filter(filePath -> Files.isRegularFile(filePath))
.filter(Files::isExecutable)
.forEach(filePath -> System.out.println(filePath.getFileName().toString()));
}
}
Do you get the following output?
directory exists: true
Files named 'dot':
dot
@stefan-ka The output that I'm getting is different:
directory exists: true Files named 'dot':
@kaisbe Okay, seems like the file cannot be found via Java. Weird. Or can you check if its one of the filters that remove it from the list? Do you get the same output if you remove the two lines filtering regular and executable files?
Or remove all three filter lines and check the output for the dot
file...
@stefan-ka I tried removing all the filters, and the program lists many files, but dot
isn't one of them.
@stefan-ka The JDK version is openjdk 11.0.6 2020-01-14.
@kaisbe Exactly the same JDK I used on the Debian test machine... Sorry, this is totally weird, but in this case it looks like some problem on your specific system and not with our code... Don't know why this file is not found via Java. Maybe just try to remove Graphviz and install it fresh? :) Sorry, I'm really running out of ideas what could be wrong :)
@stefan-ka OK. No problem. Sorry for this weird issue and thanks a lot for your elaboration. I'm closing this bug report for now, since my current environment is causing this problem. Cheers.
@kaisbe Sorry, I could not help... I hope you can solve it and find a way to use Context Mapper and the Context Map generator.
You could also try to use the generator as we do it in our "standalone" Java application, outside the Eclipse context: https://github.com/ContextMapper/context-mapper-standalone-example/blob/master/src/main/java/org/contextmapper/standalone/example/ContextMapGeneratorExample.java However, this way you have to write some lines of Java code. Or just clone the repository above and change the path to your CML file in the class linked above. But I really don't know if this helps, maybe still won't work if the executable cannot be found out of a Java app.
Describe the bug Whenever I try to generate graphical context map, I get the message "Graphviz has not been found on your system". Although graphviz is installed on my Debian Linux host - this what I obtain when I run
apt-file list graphviz
:To Reproduce Steps to reproduce the behavior:
Expected behavior Graphical context map gets generated.
IDE and Plugin (please complete the following information):