Getting java.lang.ClassFormatError while initializing custom Form


I created a custom GUI form for my intellij plugin. I am trying to load this form in ModuleWizardStep. But when I try to instantiate the Object, I get the folloing exception. Any idea what might be causing this exception. Please note that I have custom code within the java class that corresponds to the form, but I have not touched/modified the generated code section within this file

When I try to run the following code, I get exception below

new InitializrProjectDetailsForm()


java.lang.ClassFormatError: Duplicate method name "$$$getFont$$$" with signature "(Ljava.lang.String;IILjava.awt.Font;)Ljava.awt.Font;" in class file in/oneton/idea/spring/assistant/plugin/initializr/metadata/io/spring/initializr/util/InitializrProjectDetailsForm

Any help is appreciated

Comment actions Permalink


This issue is happening only when I chose the following option from settings.

Settings -> GUI Designer

And set Generate GUI into -> Java source file


Now I have changed the value of Generate GUI into -> Binary class files & the error is gone


Comment actions Permalink

My IntelliJ version

IntelliJ IDEA 2017.3.4 (Community Edition)
Build #IC-173.4548.28, built on January 30, 2018
JRE: 1.8.0_152-release-1024-b11 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.4.0-34-generic
Comment actions Permalink

Also, the intellij version I'm using to test my plugin is 2017.2

i.e my plugin development is in IntelliJ IDEA 2017.3.4 (Community Edition) & plugin runtime(while testing) is  2017.2

Comment actions Permalink

Hi Ashok

Are you using gradle-intellij-plugin for plugin development?

I see this problem only when using gradle-intellij-plugin.. but if I use the traditional way (adding Intellij sdk), then this problem  does not appear.

I have custom settings in the Settings and that is where it happens when the custom setting item is selected


Please sign in to leave a comment.