Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No metadata in generated images #53

Closed
anzdaddy opened this issue Sep 6, 2017 · 3 comments · Fixed by #305
Closed

No metadata in generated images #53

anzdaddy opened this issue Sep 6, 2017 · 3 comments · Fixed by #305

Comments

@anzdaddy
Copy link

anzdaddy commented Sep 6, 2017

The latest server (downloaded today) outputs images without the source metadata.

$ curl -s http://localhost:8080/plantuml/png/SyfFKj2rKt3CoKnELR1Io4ZDoSclg000 > test.png
$ plantuml -metadata test.png
------------------------
test.png

null
------------------------

The plantuml.com instance and older versions (not sure how old) work fine.

@arnaudroques
Copy link
Contributor

Which JDK/JRE are you using ?
When using OpenJDK, metadata are not generated (because an old Sun class is used for that which is not available on OpenJDK)
You can check your version either by:

  • java -version
  • java -jar plantuml.jar -version

Thanks!

@anzdaddy
Copy link
Author

anzdaddy commented Sep 6, 2017

Seems to be Oracle HotSpot (running on macOS Sierra 10.12.6 (16G29), fwiw):

$ catalina run
Using CATALINA_BASE:   /usr/local/Cellar/tomcat/8.5.20/libexec
Using CATALINA_HOME:   /usr/local/Cellar/tomcat/8.5.20/libexec
Using CATALINA_TMPDIR: /usr/local/Cellar/tomcat/8.5.20/libexec/temp
Using JRE_HOME:        /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home
Using CLASSPATH:       /usr/local/Cellar/tomcat/8.5.20/libexec/bin/bootstrap.jar:/usr/local/Cellar/tomcat/8.5.20/libexec/bin/tomcat-juli.jar
⋮
07-Sep-2017 06:59:34.745 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 1277 ms
[…repeat curl && plantuml from above…]
^C
⋮
$ /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin/java -version
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

@HeinrichAD
Copy link
Collaborator

The problem seems to be solved.
It tried to reproduce the issue with the following steps:

docker run -d -p 8080:8080 -e BASE_URL=plantuml plantuml/plantuml-server
curl -s http://localhost:8080/plantuml/png/SyfFKj2rKt3CoKnELR1Io4ZDoSclg000 -o test.png
curl -s -F "diagram=@test.png" http://localhost:8080/plantuml/metadata

The last command does the same as plantuml -metadata test.png only other the plantuml server instead of the java runtime file.

Output:

SyfFKj2rKt3CoKnELR1Io4ZDoSclg000

@startuml
Bob -> Alice : helloxx
@enduml

PlantUML version 1.2023.8(Sun May 21 08:38:00 UTC 2023)
(GPL source distribution)
Java Runtime: OpenJDK Runtime Environment
JVM: OpenJDK 64-Bit Server VM
Default Encoding: UTF-8
Language: en
Country: US

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants