Skip to content

[BUG] Cannot invoke "String.length()" because "spec" is null #962

@polastre

Description

@polastre

Description

This error is thrown at the end of my workflow, but I can't figure out why. I will try to create a simplified workflow.js to reproduce, but wanted to start by asking if anyone has ideas.

Environment

  • OS: Linux
  • Java: JDK 21

Steps to Reproduce

Run baremaps workflow execute --file=workflow.js

Error

[ERROR] 2025-09-23 00:23:49.602 [main] WorkflowExecutor - Error while executing the workflow
java.util.concurrent.CompletionException: org.apache.baremaps.workflow.WorkflowException: java.net.MalformedURLException: Cannot invoke "String.length()" because "spec" is null
        at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315) ~[?:?]
        at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320) ~[?:?]
        at java.base/java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:791) ~[?:?]
        at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?]
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
        at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: org.apache.baremaps.workflow.WorkflowException: java.net.MalformedURLException: Cannot invoke "String.length()" because "spec" is null
        at org.apache.baremaps.workflow.WorkflowExecutor.lambda$createStep$3(WorkflowExecutor.java:172) ~[baremaps-core-0.8.2.jar:0.8.2]
        at java.base/java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:787) ~[?:?]
        ... 4 more
Caused by: java.net.MalformedURLException: Cannot invoke "String.length()" because "spec" is null
        at java.base/java.net.URL.<init>(URL.java:806) ~[?:?]
        at java.base/java.net.URL.<init>(URL.java:654) ~[?:?]
        at java.base/java.net.URL.<init>(URL.java:590) ~[?:?]
        at org.apache.baremaps.tasks.DownloadUrl.execute(DownloadUrl.java:74) ~[baremaps-core-0.8.2.jar:0.8.2]
        at org.apache.baremaps.workflow.WorkflowExecutor.lambda$createStep$3(WorkflowExecutor.java:167) ~[baremaps-core-0.8.2.jar:0.8.2]
        at java.base/java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:787) ~[?:?]
        ... 4 more
Caused by: java.lang.NullPointerException: Cannot invoke "String.length()" because "spec" is null
        at java.base/java.net.URL.<init>(URL.java:712) ~[?:?]
        at java.base/java.net.URL.<init>(URL.java:654) ~[?:?]
        at java.base/java.net.URL.<init>(URL.java:590) ~[?:?]
        at org.apache.baremaps.tasks.DownloadUrl.execute(DownloadUrl.java:74) ~[baremaps-core-0.8.2.jar:0.8.2]
        at org.apache.baremaps.workflow.WorkflowExecutor.lambda$createStep$3(WorkflowExecutor.java:167) ~[baremaps-core-0.8.2.jar:0.8.2]
        at java.base/java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:787) ~[?:?]
        ... 4 more

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions