Problem with java 1.8

+1 vote
asked Sep 14, 2014 in Bug by albert (3,520 points)
when I run:

java  -jar ./plantuml.jar html/inline_umlgraph_3.pu, I get the error message:

Error line 3 in file: ..\html\inline_umlgraph_3.pu
Some diagram description contains errors

The file inline_umlgraph_3.pu:
@startuml
class ArrayList
!ifdef SHOW_METHODS
ArrayList : int size()
ArrayList : void clear()
!endif
@enduml

Version information (plantuml.jar downloaded September 13), Java installed from jre-8u20-windows-x64.exe:

>java  -jar ./plantuml.jar -version
PlantUML version 8005beta (Sat Aug 23 18:23:53 CEST 2014)
(GPL source distribution)
Java(TM) SE Runtime Environment
Java HotSpot(TM) 64-Bit Server VM
1.8.0_20-b26
Windows 7

The environment variable GRAPHVIZ_DOT has not been set
Dot executable is c:\Program Files (x86)\Graphviz2.38\bin\dot.exe
Dot version: dot - graphviz version 2.38.0 (20140413.2041)
Installation seems OK. File generation OK

Same occurs when I install jre-8u20-windows-i586.exe

1 Answer

0 votes
answered Sep 14, 2014 by plantuml (295,000 points)

We've just tested the following example :

@startuml
class ArrayList
!ifdef SHOW_METHODS
ArrayList : int size()
ArrayList : void clear()
!endif
@enduml

With version 8005beta2, and it's work fine for us (using Java 1.6). (It's seems that you are not using the lastest beta)

It's very unlikely that this would be a Java 1.8 issue.

Could you try:

- to put inline_umlgraph_3.pu in the current directory
- to simplify your diagram to:

@startuml
class ArrayList
@enduml

 

- to add -v flag in your command line
- to send us the generated image PNG (they should be one).

Thanks,

commented Sep 21, 2014 by albert (3,520 points)
Sorry for the delay.

I Installed the jre8 (update 20) 64-bit and used example:
@startuml
!define SHOW_METHODS
class ArrayList
!ifdef SHOW_METHODS
ArrayList : int size()
ArrayList : void clear()
!endif
@enduml

When running with the plantuml.jar downloaded September 21 around 13.00 I get:
D:\>java -jar plantuml.jar -v inline_umlgraph_8.pu
(0.000 - 0.000 - 0.000(0) - 123 Mo) 120 Mo - PlantUML Version 8008beta1
(0.018 - 0.000 - 0.000(0) - 123 Mo) 120 Mo - GraphicsEnvironment.isHeadless() false
(0.025 - 0.000 - 0.000(0) - 123 Mo) 119 Mo - Setting current dir: .
(0.025 - 0.000 - 0.000(0) - 123 Mo) 119 Mo - Setting current dir: D:\
(0.026 - 0.000 - 0.000(0) - 123 Mo) 119 Mo - Using default charset
(0.029 - 0.000 - 0.000(0) - 123 Mo) 119 Mo - Setting current dir: D:\
(0.035 - 0.000 - 0.000(0) - 123 Mo) 119 Mo - Setting current dir: D:\
(0.035 - 0.000 - 0.000(0) - 123 Mo) 119 Mo - Reading file: inline_umlgraph_8.pu
(0.271 - 0.000 - 0.000(0) - 123 Mo) 103 Mo - Creating file: D:\inline_umlgraph_8.png
(0.466 - 0.000 - 0.000(0) - 123 Mo) 98 Mo - Creating image 102x69
(0.491 - 0.000 - 0.000(0) - 123 Mo) 95 Mo - Ok for com.sun.imageio.plugins.png.PNGMetadata
(0.593 - 0.000 - 0.000(0) - 123 Mo) 94 Mo - Number of image(s): 1
Error line 3 in file: D:\inline_umlgraph_8.pu
Some diagram description contains errors

The png File says:
@startuml
class ArrayList
!ifdef
 Syntax Error?

(looks like to happen with the 32-bit version as well)
commented Sep 23, 2014 by plantuml (295,000 points)
Hello,
Could you try with the last official release ?
It's very possible that this beta has a regression on preprocessor.

Thanks!
...