javaneo4jcypherjqassistant

jQassistant assessment failing with multiple projects


I'm using jqassistant-maven-plugin version 1.10.1 with common Neo4j database and am trying to collate scanning from multiple Spring boot based java applications. I've disabled reset database so that I can collate scan information from multiple projects and identify API clients invoking API services from within other apps and see if there is any cyclic dependencies. When I do so the first maven build is working fine. But when I run the second application scan, it fails with the below error:

org.neo4j.driver.exceptions.DatabaseException: The shortest path algorithm does not work when the start and end nodes are the same. This can happen if you perform a shortestPath search after a cartesian product that might have the same start and end nodes for some of the rows passed to shortestPath. If you would rather not experience this exception, and can accept the possibility of missing results for those rows, disable this in the Neo4j configuration by setting cypher.forbid_shortestpath_common_nodes to false. If you cannot accept missing results, and really want the shortestPath between two common nodes, then re-write the query using a standard Cypher variable length pattern expression followed by ordering by path length and limiting to one result.

The package names of the class are different and there may be couple of classes that might be named similar but the fully qualified names should not create a name collision. Not sure what's causing this and how to resolve this. Any help would be appreciated.

EDIT The query that's failing is given below:

UNWIND $batch as entry 
CREATE (n:File:Directory:Package:Java) 
SET n=entry['n']   
RETURN collect({oldId:entry['id'], newId:id(n)}) as nodes', {batch=[{n={name=controller, file
Name=/com/mycompany/client/controller, fqn=com.mycompany.client.controller}, id=-9}]}

Unfortunately I don't have control on the query generated as its auto generated by the jqassistant-maven-plugin.


Solution

  • Thanks to @dirk-mahler. I was able to scan multiple projects with the latest version command line jqassistant 1.12.2. I was using an older version of the jqassistant maven plugin 1.10.1 and it was failing with some weird errors.