Trying to include Archimate-PlantUML but getting IllegalStateException

0 votes
asked Oct 22, 2019 in Bug by Vinay B

I'm not sure why but all of a sudden I started getting an IllegalStateException getting thrown from SourceStringReader when I try to generate my Archimate diagram.  It was previously working for me and I changed nothing.  Now whenever I have !include https://raw.githubusercontent.com/ebbypeter/Archimate-PlantUML/master/Archimate.puml in my source it throws an IllegalState error.  If I take it out everything behaves normal.

1 Answer

0 votes
answered Oct 23, 2019 by plantuml (295,760 points)

Thanks for the report.

However, can you give a simple but non working example ?

The following one is working for us:

@startuml
!include https://raw.githubusercontent.com/ebbypeter/Archimate-PlantUML/master/Archimate.puml
rectangle GO #lightgreen
rectangle STOP #red
rectangle WAIT #orange
@enduml

http://www.plantuml.com/plantuml/uml/LScngiCW58VnFK_X9VEDUxTCfT2IG5Cwg_cZWXxbUAJqxTin7R_lznV9fRv31P7QJbgpUKq-IkYsDx0h922PNCaQrhuh1AndTY5c8_XVao5vtAuwc_OZK-qv3GmdXdo2EYzgJD47yGpG0UxRiggHiH_USxviQYpyBGmV

commented Oct 23, 2019 by Vinay B

Version: 1.2019.11

@startuml
!include https://raw.githubusercontent.com/ebbypeter/Archimate-PlantUML/master/Archimate.puml
title Test Case Linkage
@enduml

Even something as simple as this breaks for me in when I try to build through Java.  If I take out the include it will atleast build.

ArrayList<String> sourceLines = new ArrayList<>();

sourceLines.add("@startuml\n");

sourceLines.add("!include https://raw.githubusercontent.com/ebbypeter/Archimate-PlantUML/master/Archimate.puml\n");

sourceLines.add("title Test Case Linkage\n");

sourceLines.add("@enduml");

String source = "";

for (String line: sourceLines) {

  source += line;

}

System.out.println(source);

SourceStringReader reader = new SourceStringReader(source);

Exception in thread "main" java.lang.IllegalStateException

at net.sourceforge.plantuml.SourceStringReader.<init>(SourceStringReader.java:61)

at net.sourceforge.plantuml.SourceStringReader.<init>(SourceStringReader.java:53)

at org.example.plugin.Main.main(Main.java:69)

commented Oct 23, 2019 by Vinay B
Actually ...resolved the problem, I realized gradle got broken because one of my packages installed java13 and messed up gradle.  Once I uninstalled everything got fixed.
...