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

An error has occured : java.lang.NoClassDefFoundError: sun/font/GlyphLayout$GVData #1546

Closed
yongchuncao opened this issue May 19, 2023 · 2 comments · Fixed by #1549
Closed
Labels
🐞 bug Something isn't working

Comments

@yongchuncao
Copy link

The site https://kroki.io/ draws the plantuml class diagram and reports an error:
UML:

class Test{}

Error:

An error has occured : java.lang.NoClassDefFoundError: sun/font/GlyphLayout$GVData
I have to warn you, I've heard relationships based on intense experiences never work.
 
Diagram size: 4 lines / 32 characters.
 
PlantUML (1.2023.6) cannot parse result from dot/GraphViz.
 
Please go to https://plantuml.com/graphviz-dot to check your GraphViz version.
 
Java Runtime: null
JVM: Substrate VM
Default Encoding: UTF-8
Language: null
Country: null
 
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
[email protected]
or
post to
https://plantuml.com/qa
to solve this issue.
You can try to turn around this issue by simplifing your diagram.
 
java.lang.NoClassDefFoundError: sun/font/GlyphLayout$GVData
org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.functions.JNIFunctions.FindClass(JNIFunctions.java:343)
[email protected]/sun.font.SunLayoutEngine.shape(SunLayoutEngine.java)
[email protected]/sun.font.SunLayoutEngine.layout(SunLayoutEngine.java:172)
[email protected]/sun.font.GlyphLayout$EngineRecord.layout(GlyphLayout.java:669)
[email protected]/sun.font.GlyphLayout.layout(GlyphLayout.java:459)
[email protected]/sun.font.ExtendedTextSourceLabel.createGV(ExtendedTextSourceLabel.java:329)
[email protected]/sun.font.ExtendedTextSourceLabel.getGV(ExtendedTextSourceLabel.java:315)
[email protected]/sun.font.ExtendedTextSourceLabel.createLogicalBounds(ExtendedTextSourceLabel.java:225)
[email protected]/sun.font.ExtendedTextSourceLabel.getAdvance(ExtendedTextSourceLabel.java:134)
[email protected]/java.awt.font.TextLine.init(TextLine.java:281)
[email protected]/java.awt.font.TextLine.<init>(TextLine.java:129)
[email protected]/java.awt.font.TextLine.fastCreateTextLine(TextLine.java:978)
[email protected]/java.awt.font.TextLayout.fastInit(TextLayout.java:611)
[email protected]/java.awt.font.TextLayout.<init>(TextLayout.java:392)
net.sourceforge.plantuml.klimt.font.UFontContext.createTextLayout(UFontContext.java:53)
net.sourceforge.plantuml.klimt.drawing.svg.DriverCenteredCharacterSvg.draw(DriverCenteredCharacterSvg.java:60)
net.sourceforge.plantuml.klimt.drawing.svg.DriverCenteredCharacterSvg.draw(DriverCenteredCharacterSvg.java:48)
net.sourceforge.plantuml.klimt.drawing.AbstractUGraphic.draw(AbstractUGraphic.java:144)
net.sourceforge.plantuml.klimt.shape.CircledCharacter.drawU(CircledCharacter.java:73)
net.sourceforge.plantuml.klimt.shape.TextBlockMarged.drawU(TextBlockMarged.java:85)
net.sourceforge.plantuml.svek.HeaderLayout.drawU(HeaderLayout.java:99)
net.sourceforge.plantuml.svek.image.EntityImageClassHeader.drawU(EntityImageClassHeader.java:244)
net.sourceforge.plantuml.svek.image.EntityImageClass.drawInternal(EntityImageClass.java:233)
net.sourceforge.plantuml.svek.image.EntityImageClass.drawU(EntityImageClass.java:154)
net.sourceforge.plantuml.svek.EntityImageDegenerated.drawU(EntityImageDegenerated.java:85)
net.atmp.ImageBuilder.writeImageInternal(ImageBuilder.java:306)
net.atmp.ImageBuilder.write(ImageBuilder.java:256)
net.sourceforge.plantuml.svek.CucaDiagramFileMakerSvek.createFileInternal(CucaDiagramFileMakerSvek.java:130)
net.sourceforge.plantuml.svek.CucaDiagramFileMakerSvek.createFile(CucaDiagramFileMakerSvek.java:70)
net.atmp.CucaDiagram.exportDiagramInternal(CucaDiagram.java:435)
net.sourceforge.plantuml.classdiagram.ClassDiagram.exportDiagramInternal(ClassDiagram.java:84)
net.sourceforge.plantuml.UmlDiagram.exportDiagramNow(UmlDiagram.java:142)
net.sourceforge.plantuml.AbstractPSystem.exportDiagram(AbstractPSystem.java:198)
net.sourceforge.plantuml.SourceStringReader.outputImage(SourceStringReader.java:165)
net.sourceforge.plantuml.Pipe.generateDiagram(Pipe.java:103)
net.sourceforge.plantuml.Pipe.managePipe(Pipe.java:94)
net.sourceforge.plantuml.Run.managePipe(Run.java:357)
net.sourceforge.plantuml.Run.main(Run.java:184)
@ggrossetie
Copy link
Member

Thanks for your report!
We've recently switched to a native image and it seems that this dynamic call was not included in the native image.

@ggrossetie
Copy link
Member

Fixed and deployed:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants