Skip to content

Scanning fails when we pass as parameter -r ../cookbook/demo #85

@cmoulliard

Description

@cmoulliard

Issue

The CLI fails to process an application when we pass as parameter -r ../cookbook/demo and when we use a rule file with a rules's list

// from root of the project
❯ mvn -pl migration-cli quarkus:dev -Dquarkus.args="analyze ../applications/demo-spring-boot-todo-app -r ../cookbook/demo -o json"

Console's Error

2025-11-03 14:16:45,970 INFO  [dev.sno.ana.JdtLsClient] (ForkJoinPool.commonPool-worker-5) ==== CLIENT: --- Command params: ExecuteCommandParams [
  workDoneToken = null
  command = "io.konveyor.tackle.ruleEntry"
  arguments = List12 (
    {query=dummy.SpringApplication, project=java, location=4, analysisMode=source-only}
  )
].

2025-11-03 14:16:45,970 INFO  [dev.sno.ana.JdtLsClient] (ForkJoinPool.commonPool-worker-5) ==== CLIENT: --- Search Results found for rule: 000-springboot-annotation-notfound.
2025-11-03 14:16:45,971 INFO  [dev.sno.ana.JdtLsClient] (ForkJoinPool.commonPool-worker-5) ==== CLIENT: --- JSON response: []
2025-11-03 14:16:45,971 INFO  [dev.sno.ana.JdtLsClient] (ForkJoinPool.commonPool-worker-5) ==== CLIENT: SymbolInformation List is empty.
2025-11-03 14:16:45,971 INFO  [dev.sno.ana.JdtLsClient] (ForkJoinPool.commonPool-worker-5) ==== CLIENT: ----------------------
2025-11-03 14:16:45,971 INFO  [dev.sno.ana.JdtLsClient] (Quarkus Main Thread) ==== CLIENT: Sending the command 'io.konveyor.tackle.ruleEntry' ...
2025-11-03 14:16:45,972 WARN  [dev.sno.ana.uti.RuleUtils] (Quarkus Main Thread) Unknown location type '{}', defaulting to 0
2025-11-03 14:16:45,972 ERROR [dev.sno.com.AnalyzeCommand] (Quarkus Main Thread) ❌ Error: null
2025-11-03 14:16:45,975 INFO  [io.quarkus] (Quarkus Main Thread) migration-cli stopped in 0.002s

Investigation

  • The code parsing the folder containing the rules and the rule content works without any issue as we got from an example with 5 rules a List of 5 Rule
    public List<Rule> loadRules(Path rulesPath, String sourceTech, String targetTech) throws IOException {
        List<Rule> rules = parseRulesFromFolder(rulesPath); // OK
  • The error occurs when the following simple query pom.dependency is (gavs='org.springframework.boot:spring-boot-starter-web') is processed by QueryVisitor visitor = QueryUtils.parseAndVisit(rule.when().condition());

The current code is unable to process a rule using the jdt-ls scanner when the query try to search in a maven pom.xml file a dependency as code is not implemented within their bundle https://github.com/konveyor/java-analyzer-bundle AND our Poc don't run another language server or use builtin search capabilities.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions