closed An error has occured : java.lang.UnsupportedOperationException

0 votes
asked May 16, 2021 in Bug by jp
closed May 17, 2021

An error has occured : java.lang.UnsupportedOperationException


Code:

@startuml require

partition "require(require_type req_type)" {

start

  switch (req_type?)

  case (EOF)

    if (notfound "%%EOF"then (y)

      :throw syntax_error(EOF_not_found);

      stop

    endif

    if (end of streamthen (y)

      stop

    endif

    if (there is no "**[EOL]**"then (y)

      stop

    endif

    :throw syntax_error(EOF_invalid);

    stop

  case (EOL)

    if (LF || CRLF || CRthen (y)

      stop

    endif

    :throw syntax_error(EOL_not_found);

    stop

  case (startxref)

    :ignore_if_present(any_whitespace_characters_except_EOL);

    if (there is no "startxref"then (y)

      :throw syntax_error(startxref_not_found);

    endif

    :ignore_if_present(any_whitespace_characters_except_EOL | comment);

    :require(EOL);

  endswitch

stop

}

@enduml

closed with the note: Fixed correctly
commented May 16, 2021 by jp

Error Message:

An error has occured : java.lang.UnsupportedException

Looks like I picked the wrong week to quit smoking.

Diagram size: 38 lines / 766 characters.

PlantUML (1.2021.6) cannot parse result from dot/GraphViz.

Please go to https://plantuml.com/graphviz-dot to check your GraphViz version.

JavaRuntime: Java(TM) SE Runtime Environment

JVM: Java HotSpot(TM) 64-Bit Server VM

Default Encoding: MS932

Language: ja

Country: JP

PLANTUML_LIMIT_SIZE: 4096

This may be caused by :

- a bug in PlantUML

- a problem in GraphViz

You should send this diagram and this image to plantuml@gmail.com or

post to https://plantuml.com/qa to solve this issue.

You can try to turn arround this issue by simplifing your diagram.

java.lang.UnsupportedOperationException

 net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry.getPointOut(FtileGeometry.java:82)

 net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.cond.FtileSwitchWithManyLinks$ConnectionVerticalBottom.getP1(FtileSwitchWithManyLinks.java:264)

 net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.cond.FileSwitchWithManyLinks$ConnectionVerticalBottom.drawU(FtileSwitchWithManyLinks.java:227)

 net.sourceforge.plantuml.graphic.UGraphicInterceptorUDrawable.draw(UGraphicInterceptorUDrawable.java:51)

 net.sourceforge.plantuml.activitydiagram3.ftile.FtileWithConnection.drawU(FtileWithConnection.java:72)

 net.sourceforge.plantuml.graphic.UGraphicInterceptorUDrawable.draw(UGraphicInterceptorUDrawable.java:51)

 net.sourceforge.plantuml.activitydiagram3.ftile.FtileAssemblySimple.drawU(FtileAssemblySimple.java:113)

 net.sourceforge.plantuml.activitydiagram3.ftile.FtileWithConnection.drawU(FtileWithConnection.java:70)

 net.sourceforge.plantuml.graphic.UGraphicInterceptorUDrawable.draw(UGraphicInterceptorUDrawable.java:51)

 net.sourceforge.plantuml.activitydiagram3.ftile.FtileMargedVertically.drawU(FtileMargedVertically.java:58)

 net.sourceforge.plantuml.graphic.UGraphicInterceptorUDrawable.draw(UGraphicInterceptorUDrawable.java:51)

 net.sourceforge.plantuml.activitydiagram3.ftile.FtileAssemblySimple.drawU(FtileAssemblySimple.java:112)

 net.sourceforge.plantuml.activitydiagram3.ftile.FtileWithConnection.drawU(FtileWithConnection.java:70)

 net.sourceforge.plantuml.graphic.UGraphicInterceptorUDrawable.draw(UGraphicInterceptorUDrawable.java:51)

 net.sourceforge.plantuml.activitydiagram3.ftile.FtileMarged.drawU(FtileMarged.java:109)

 net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileGroup.getInnerMinMax(FtileGroup.java:169)

 net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileGroup.getInnerDimensionSlow(FtileGroup.java:195)

 net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileGroup.getInnerDimension(FtileGroup.java:187)

 net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileGroup.calculateDimensionFile(FtileGroup.java:205)

 net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile.calculateDimension(AbstractFile.java:113)

 net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileGroup.drawU(FtileGroup.java:225)

 net.sourceforge.plantuml.activitydiagram3.ftile.TextBlockInterceptorUDrawable.drawU(TextBlockInterceptorUDrawable.java:56)

 net.sourceforge.plantuml.activitydiagram3.ftile.Swimlanes.drawU(Swimlanes.java:224)

 net.sourceforge.plantuml.ugraphic.comp.CompressionXorYBuilder.getPiecewiseAffineTransform(CompressionXorYBuilder.java:51)

 net.sourceforge.plantuml.ugraphic.comp.CompressionXorYBuilder.build(CompressionXorYBuilder.java:44)

 net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3.exportDiagramInternal(ActivityDiagram3.java:203)

 net.sourceforge.plantuml.UmlDiagram.exportDiagramNow(UmlDiagram.java:144)

 net.sourceforge.plantuml.AbstractPSystem.exportDiagram(AbstractPSystem.java:157)

 net.sourceforge.plantuml.SourceStringReader.outputImage(SourceStringReader.java:157)

 net.sourceforge.plantuml.Pipe.managePipe(Pipe.java:116)

 net.sourceforge.plantuml.Run.managePipe(Run.java:383)

 net.sourceforge.plantuml.Run.main(Run.java:184)


 Diagram source: (Use http://zxing.org/w/decode.jspx to decode the qrcode)

 [QRcode](omit)


Supplement

I'm using Visual Studio Code and extension "jebbs.plantuml".

1 Answer

0 votes
answered May 16, 2021 by plantuml (295,000 points)
commented May 28, 2021 by agrexgh

Same here.

And I tried your beta but I got same error like below.

 

Exception in thread "main" java.lang.UnsupportedOperationException: HTML
        at net.sourceforge.plantuml.ugraphic.ImageBuilder.createUGraphic(ImageBuilder.java:437)
        at net.sourceforge.plantuml.ugraphic.ImageBuilder.writeImageInternal(ImageBuilder.java:275)
        at net.sourceforge.plantuml.ugraphic.ImageBuilder.write(ImageBuilder.java:249)
        at net.sourceforge.plantuml.UmlDiagram.exportDiagramError(UmlDiagram.java:205)
        at net.sourceforge.plantuml.UmlDiagram.exportDiagramError(UmlDiagram.java:162)
        at net.sourceforge.plantuml.UmlDiagram.exportDiagramNow(UmlDiagram.java:155)
        at net.sourceforge.plantuml.AbstractPSystem.exportDiagram(AbstractPSystem.java:157)
        at net.sourceforge.plantuml.PSystemUtils.exportDiagramsSequence(PSystemUtils.java:201)
        at net.sourceforge.plantuml.PSystemUtils.exportDiagrams(PSystemUtils.java:86)
        at net.sourceforge.plantuml.SourceFileReaderAbstract.getGeneratedImages(SourceFileReaderAbstract.java:160)
        at net.sourceforge.plantuml.Run.manageFileInternal(Run.java:519)
        at net.sourceforge.plantuml.Run.processArgs(Run.java:403)
        at net.sourceforge.plantuml.Run.manageAllFiles(Run.java:370)
        at net.sourceforge.plantuml.Run.main(Run.java:198)

commented May 28, 2021 by plantuml (295,000 points)
Which option did you put on the command line ?

You should try to generate only PNG or SVG output. It looks like you are trying to generated HTML output, which is not working right now.
commented May 29, 2021 by agrexgh

I used -thtml option.

OK. I'm sorry, I didn't know this beta is for png and svg.

Thank you for responding me.

I'm looking for -thtml option working well.

...