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

getting below error when using from jenkins with openjdk11 #1

Closed
codeHack99 opened this issue Jun 29, 2022 · 1 comment
Closed

getting below error when using from jenkins with openjdk11 #1

codeHack99 opened this issue Jun 29, 2022 · 1 comment

Comments

@codeHack99
Copy link

added in pom.xml as plugin and ran as verify

Exception in thread "main" java.lang.InternalError: java.lang.reflect.InvocationTargetException
at java.desktop/sun.font.FontManagerFactory$1.run(FontManagerFactory.java:87)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
at java.desktop/sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:75)
at java.desktop/sun.font.SunFontManager.getInstance(SunFontManager.java:248)
at java.desktop/sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:266)
at java.desktop/sun.swing.SwingUtilities2.getFontMetrics(SwingUtilities2.java:1242)
at java.desktop/javax.swing.JComponent.getFontMetrics(JComponent.java:1691)
at java.desktop/javax.swing.text.PlainView.calculateLongestLine(PlainView.java:783)
at java.desktop/javax.swing.text.PlainView.updateMetrics(PlainView.java:332)
at java.desktop/javax.swing.text.PlainView.updateDamage(PlainView.java:670)
at java.desktop/javax.swing.text.PlainView.insertUpdate(PlainView.java:591)
at java.desktop/javax.swing.text.FieldView.insertUpdate(FieldView.java:294)
at java.desktop/javax.swing.plaf.basic.BasicTextUI$RootView.insertUpdate(BasicTextUI.java:1714)
at java.desktop/javax.swing.plaf.basic.BasicTextUI$UpdateHandler.insertUpdate(BasicTextUI.java:1981)
at java.desktop/javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:226)
at java.desktop/javax.swing.text.AbstractDocument.handleInsertString(AbstractDocument.java:780)
at java.desktop/javax.swing.text.AbstractDocument.insertString(AbstractDocument.java:739)
at java.desktop/javax.swing.text.PlainDocument.insertString(PlainDocument.java:131)
at java.desktop/javax.swing.text.AbstractDocument.replace(AbstractDocument.java:698)
at java.desktop/javax.swing.text.JTextComponent.setText(JTextComponent.java:1729)
at org.apache.jmeter.gui.NamePanel._setName(NamePanel.java:106)
at org.apache.jmeter.gui.NamePanel.(NamePanel.java:48)
at org.apache.jmeter.gui.AbstractJMeterGuiComponent.(AbstractJMeterGuiComponent.java:92)
at org.apache.jmeter.visualizers.gui.AbstractListenerGui.(AbstractListenerGui.java:31)
at org.apache.jmeter.visualizers.gui.AbstractVisualizer.(AbstractVisualizer.java:124)
at kg.apc.jmeter.graphs.AbstractGraphPanelVisualizer.(AbstractGraphPanelVisualizer.java:102)
at org.jmeterplugins.tools.FilterResults.(FilterResults.java:35)
at kg.apc.cmdtools.FilterResultsTool.(FilterResultsTool.java:26)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at java.base/java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:128)
at java.base/jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:347)
at java.base/java.lang.Class.newInstance(Class.java:645)
at kg.apc.cmdtools.PluginsCMD.getToolInstance(PluginsCMD.java:128)
at kg.apc.cmdtools.PluginsCMD.processParams(PluginsCMD.java:50)
at kg.apc.cmdtools.PluginsCMD.processParams(PluginsCMD.java:21)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at kg.apc.cmd.UniversalRunner.main(UniversalRunner.java:117)
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
at java.desktop/sun.font.FontManagerFactory$1.run(FontManagerFactory.java:85)
... 42 more
Caused by: java.lang.NullPointerException: Cannot load from short array because "sun.awt.FontConfiguration.head" is null
at java.desktop/sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1262)
at java.desktop/sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:224)
at java.desktop/sun.awt.FontConfiguration.init(FontConfiguration.java:106)
at java.desktop/sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:706)
at java.desktop/sun.font.SunFontManager$2.run(SunFontManager.java:358)
at java.desktop/sun.font.SunFontManager$2.run(SunFontManager.java:315)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
at java.desktop/sun.font.SunFontManager.(SunFontManager.java:315)
at java.desktop/sun.awt.FcFontManager.(FcFontManager.java:35)
at java.desktop/sun.awt.X11FontManager.(X11FontManager.java:56)

[ERROR] Failed to execute goal io.github.vdaburon:jmeter-graph-tool-maven-plugin:1.0:create-graph (create-graphs) on project octoperf-test: Execution create-graphs of goal io.github.vdaburon:jmeter-graph-tool-maven-plugin:1.0:create-graph failed: org.apache.maven.plugin.MojoExecutionException: Unable to execute mojo: Command execution failed. Process exited with an error: 1

@vdaburon
Copy link
Owner

vdaburon commented Jul 1, 2022

Hi,
The JDK 11 need to add Fontconfig to enable OpenJDK to discover and use fonts.
https://blog.adoptopenjdk.net/2021/01/prerequisites-for-font-support-in-adoptopenjdk/
or
https://stackoverflow.com/questions/65509533/npe-from-sun-awt-fontconfiguration-getversion-using-apache-fop-jdk-11-on-linux-s

It's not a maven plugin trouble but a jdk 11 bad configuration.

I close this issue because i can't change the code to avoid this error with jdk11.

@vdaburon vdaburon closed this as completed Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants