qjebbs / vscode-plantuml

Rich PlantUML support for Visual Studio Code.
MIT License
1.1k stars 161 forks source link

Problem with multiple entities / classes #604

Open mattiamerlini opened 2 days ago

mattiamerlini commented 2 days ago

Error occured only on MacOs with latest Os, Vs Code, Java JDK and extension up-to-date. When previewing / exporting multiple entities or classes, an exception is raised. Copying the same code in planttext everything works. Using same extension on Windows with same entities works fine.

The code:

@startuml Yap Euro
title Yap Euro 
entity Prodotti {
    * id
    --
    nome_cn
    nome_it
    prezzo_acq
    prezzo_ven
}
entity Vendite {
    * id
    --
    data_vendita
    metodo_pagamento
    email
    --
    * rif_prodotto
}
Prodotti ||--o{ Vendite
@enduml

The exception:

Error found in diagram Yap Euro
java.io.IOException: Cannot run program "/opt/local/bin/dot": error=2, No such file or directory
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1170)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1089)
at java.base/java.lang.Runtime.exec(Runtime.java:681)
at net.sourceforge.plantuml.dot.ProcessRunner$MainThread.startThreads(ProcessRunner.java:201)
at net.sourceforge.plantuml.dot.ProcessRunner$MainThread.runJob(ProcessRunner.java:161)
at net.sourceforge.plantuml.api.TimeoutExecutor$MyThread.run(TimeoutExecutor.java:117)
Caused by: java.io.IOException: error=2, No such file or directory
at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
at java.base/java.lang.ProcessImpl.(ProcessImpl.java:295)
at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:225)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1126)
... 5 more
java.io.IOException: Cannot run program "/opt/local/bin/dot": error=2, No such file or directory
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1170)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1089)
at java.base/java.lang.Runtime.exec(Runtime.java:681)
at net.sourceforge.plantuml.dot.ProcessRunner$MainThread.startThreads(ProcessRunner.java:201)
at net.sourceforge.plantuml.dot.ProcessRunner$MainThread.runJob(ProcessRunner.java:161)
at net.sourceforge.plantuml.api.TimeoutExecutor$MyThread.run(TimeoutExecutor.java:117)
Caused by: java.io.IOException: error=2, No such file or directory
at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
at java.base/java.lang.ProcessImpl.(ProcessImpl.java:295)
at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:225)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1126)
... 5 more

If I remove the second entity everything works. Same issue with classes diagrams.

The-Lum commented 2 days ago

Hi @mattiamerlini

You can test your plantuml configuration with:

@startuml
version
@enduml

Then:

Locally:

Or use a plantuml server: Either you can configure a plantuml server on the plugin configuration.

If that can help, Regards, Th.