Sourcetrail
Sourcetrail copied to clipboard
No graphs or edges only files after indexing of java gradle project
I created a java gradle project, and after indexing of the project all I see is files but no graphs/nodes/edges:

For debugging, I launched Sourcetrail from mac console and I see this error when it's trying to index the project:
00:34:18 | ERROR: Indexer - java.lang.IllegalStateException: invalid environment settings at org.eclipse.jdt.core.dom.ASTParser.getClasspath(ASTParser.java:265) at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:1211) at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:823) at com.sourcetrail.JavaIndexer.processFile(JavaIndexer.java:88) at com.sourcetrail.JavaIndexer.processFile(JavaIndexer.java:33)
Is there a way I can get something like this, where I see edges between fields, classes etc.
Hi @kumar-abhishek, thanks for reporting your issue. The first screenshot shows that your total indexing time was roughly 3 seconds. So it appears that this exception is thrown for each of your source files and that's why there are no symbols shown in the graph.
This is the first time we're hearing about this issue. Can you please tell us your OS version, Sourcetrail version and your JRE version?
If you want to debug this issue yourself, you could
- check out this folder,
- make changes to the code (maybe catch the exception and
astVisitorClient.logError()
what it says), - rebuild the maven project,
- copy the output
java-indexer-1.0.jar
to<path/to/Sourcetrail>/data/java/lib
- re-run the indexer for your project and see what it says.
I met the same issue in Mac OS. It turned out that it was caused by the removal of a JDK which was used by sourcetrail initially. In that case, some invalid lib paths were left in the JRE System Libraray
configuration section. I solved it by reinstalling sourcetrail completely, namely remove both ~/Library/Application\ Support/Sourcetrail
and /Applications/Sourcetrail.app