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

getting a java exception trying to render a simple diagram. #69

Open
olymk2 opened this Issue Sep 6, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@olymk2

olymk2 commented Sep 6, 2017

Trying to render my first diagram and i have hit this error and unsure how to resolve ?

openjdk 9-Ubuntu
OpenJDK Runtime Environment (build 9-Ubuntu+0-9b161-1)
OpenJDK 64-Bit Server VM (build 9-Ubuntu+0-9b161-1, mixed mode)

Exception in thread "main" java.lang.IllegalAccessError: class net.sourceforge.plantuml.png.PngIOMetadata (in unnamed module @0x23941fb4) cannot access class com.sun.imageio.plugins.png.PNGMetadata (in module java.desktop) because module java.desktop does not export com.sun.imageio.plugins.png to unnamed module @0x23941fb4
	at net.sourceforge.plantuml.png.PngIOMetadata.writeWithMetadata(PngIOMetadata.java:60)
	at net.sourceforge.plantuml.png.PngIO.write(PngIO.java:86)
	at net.sourceforge.plantuml.png.PngIO.write(PngIO.java:80)
	at net.sourceforge.plantuml.ugraphic.g2d.UGraphicG2d.writeImageTOBEMOVED(UGraphicG2d.java:219)
	at net.sourceforge.plantuml.ugraphic.ImageBuilder.writeImageInternal(ImageBuilder.java:250)
	at net.sourceforge.plantuml.ugraphic.ImageBuilder.writeImageTOBEMOVED(ImageBuilder.java:172)
	at net.sourceforge.plantuml.sequencediagram.graphic.SequenceDiagramFileMakerPuma2.createOne(SequenceDiagramFileMakerPuma2.java:234)
	at net.sourceforge.plantuml.sequencediagram.SequenceDiagram.exportDiagramInternal(SequenceDiagram.java:225)
	at net.sourceforge.plantuml.UmlDiagram.exportDiagramNow(UmlDiagram.java:236)
	at net.sourceforge.plantuml.AbstractPSystem.exportDiagram(AbstractPSystem.java:134)
	at net.sourceforge.plantuml.SourceStringReader.outputImage(SourceStringReader.java:154)
	at net.sourceforge.plantuml.Pipe.managePipe(Pipe.java:95)
	at net.sourceforge.plantuml.Run.managePipe(Run.java:285)
	at net.sourceforge.plantuml.Run.main(Run.java:136)

@arnaudroques

This comment has been minimized.

Show comment
Hide comment
@arnaudroques

arnaudroques Sep 6, 2017

Contributor

Indeeed, the com.sun.imageio.plugins.png.PNGMetadata class does not exist on OpenJDK.

However, we have made a check on non-Oracle JDK, that should work even on OpenJDK.
(In that case, we simply don't put metadata in Png export)
This check is obviously buggy.

Could you try if you have a better result with last beta ?
https://www.dropbox.com/s/koo42q3d9gxw288/plantuml.jar?dl=0

Thanks!

Contributor

arnaudroques commented Sep 6, 2017

Indeeed, the com.sun.imageio.plugins.png.PNGMetadata class does not exist on OpenJDK.

However, we have made a check on non-Oracle JDK, that should work even on OpenJDK.
(In that case, we simply don't put metadata in Png export)
This check is obviously buggy.

Could you try if you have a better result with last beta ?
https://www.dropbox.com/s/koo42q3d9gxw288/plantuml.jar?dl=0

Thanks!

@olymk2

This comment has been minimized.

Show comment
Hide comment
@olymk2

olymk2 Sep 6, 2017

That's great just tested and I now have an image rendering in emacs, thanks for that :)

olymk2 commented Sep 6, 2017

That's great just tested and I now have an image rendering in emacs, thanks for that :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment