0

I'm scanning our software every night with the jQAssistant Maven plugin. If the Neo4J database is empty, everything is ok. But later, I get a lot of errors:

00:00:44.150 [WARNING] [0x14d108ce][myneo4jserver:7687][bolt-127303] Fatal error occurred in the pipeline
00:00:44.150 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
00:00:44.150 perform a shortestPath search after a cartesian product that might have the same start and end nodes for some
00:00:44.150 of the rows passed to shortestPath. If you would rather not experience this exception, and can accept the
00:00:44.150 possibility of missing results for those rows, disable this in the Neo4j configuration by setting
00:00:44.150 `cypher.forbid_shortestpath_common_nodes` to false. If you cannot accept missing results, and really want the
00:00:44.150 shortestPath between two common nodes, then re-write the query using a standard Cypher variable length pattern
00:00:44.150 expression followed by ordering by path length and limiting to one result.
00:00:44.150    at org.neo4j.driver.internal.util.ErrorUtil.newNeo4jError(ErrorUtil.java:85)
....
00:00:44.151 [WARNING] [0x14d108ce][myneo4jserver:7687][bolt-127303] Message ignored because of the previous fatal error. Channel will be closed. Message:
00:00:44.151 b07e
00:00:44.156 [WARNING] Cannot scan class '/foo/bar/adresse/api/validation/post/web/package-info.class'.
00:00:44.156 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
00:00:44.156 perform a shortestPath search after a cartesian product that might have the same start and end nodes for some
00:00:44.156 of the rows passed to shortestPath. If you would rather not experience this exception, and can accept the
00:00:44.156 possibility of missing results for those rows, disable this in the Neo4j configuration by setting
00:00:44.156 `cypher.forbid_shortestpath_common_nodes` to false. If you cannot accept missing results, and really want the
00:00:44.156 shortestPath between two common nodes, then re-write the query using a standard Cypher variable length pattern
00:00:44.156 expression followed by ordering by path length and limiting to one result.
00:00:44.156     at org.neo4j.driver.internal.util.Futures.blockingGet (Futures.java:143)
...
00:00:44.162 [WARNING] Cannot scan class '/foo/bar/adresse/api/validation/post/web/AddressValidationWebServiceClient.class'.
00:00:44.162 com.buschmais.xo.api.XOException: Cannot execute statement 'UNWIND $batch as entry MATCH (n) WHERE id(n)=entry['id'] SET n+=entry['n'] RETURN collect(id(n))', {batch=[{n={valid=false}, id=27127557}]}
00:00:44.162     at com.buschmais.xo.neo4j.remote.impl.datastore.StatementExecutor.execute (StatementExecutor.java:51)
...
00:00:44.166 Caused by: org.neo4j.driver.exceptions.ClientException: Cannot run more queries in this transaction, it has either experienced an fatal error or was explicitly terminated
00:00:44.166     at org.neo4j.driver.internal.async.UnmanagedTransaction.ensureCanRunQueries (UnmanagedTransaction.java:240)
...

Can someone give me a hint what is going wrong?

eerriicc
  • 1,124
  • 4
  • 17
  • 29
  • According to the stacktrace you're using a remote server for scanning. Which version of Neo4j is it? Does it happen with the embedded database as well? – Dirk Mahler Aug 25 '21 at 14:38
  • Yes, I'm using a remote server (version 3.5.28). The problem is that it's hard to reproduce with the embedded database, since it's recreated for every scanning. But I did test around 20 of our projects with a embedded database and didn't see any errors. I think the problem only arises when filling an existing external database repeatedly. – eerriicc Aug 26 '21 at 06:56
  • It seems this is related to dependency resolution for between classes. Can you provide a full stacktrace of the first exception (it should probably come from the Java plugin)? – Dirk Mahler Aug 26 '21 at 14:13
  • I just checked last night's scanning, everything went fine. I'm sorry, it might take some time until the error creeps up again... – eerriicc Aug 27 '21 at 06:01

1 Answers1

0

I now use a Jenkins pipeline to first clean the external JQAssistant database and then scan the software. This error hasn't occured since.

eerriicc
  • 1,124
  • 4
  • 17
  • 29