Tried to upgrade plugin based on Database tools to intellij 2020.2.2 - weird exception

Answered

Hello

I've created a plugin that is based on the sql and database tools on the enterprise edition. I tried upgrading to 2020.2.2 but I get an exception during build and when running in the ide.

The build exception occurs during task ":buildSearchableOptions" (only 'once', a rebuild does not cause this):

Caused by: java.lang.ClassNotFoundException: com.intellij.database.settings.DatabaseParameterPatternProvider PluginClassLoader[PluginDescriptor(name=Java SQL Libraries, id=com.intellij.frameworks.java.sql, path=/Users/wemu/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIU/2020.2.2/de98c5e0347e6db5744d7829715edcdd69efffec/ideaIU-2020.2.2/plugins/javaSqlApis, version=202.7319.50)] com.intellij.ide.plugins.cl.PluginClassLoader@102622f5
        at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:95)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
        ... 79 more
2020-10-01 23:18:14,935 [   8777]  ERROR - nsions.impl.ExtensionPointImpl - IntelliJ IDEA 2020.2.2  Build #IU-202.7319.50
2020-10-01 23:18:14,935 [   8777]  ERROR - nsions.impl.ExtensionPointImpl - JDK: 11.0.8; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
2020-10-01 23:18:14,935 [   8777]  ERROR - nsions.impl.ExtensionPointImpl - OS: Mac OS X
2020-10-01 23:18:14,935 [   8777]  ERROR - nsions.impl.ExtensionPointImpl - Last Action: 
Searchable options index builder completed

A similar error shows up when running the plugin:

com.intellij.diagnostic.PluginException: While loading class com.intellij.frameworks.java.sql.JdbiParameterPatternProvider: com/intellij/database/settings/DatabaseParameterPatternProvider [Plugin: com.intellij.frameworks.java.sql]
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(PluginClassLoader.java:261)
...
Caused by: java.lang.NoClassDefFoundError: com/intellij/database/settings/DatabaseParameterPatternProvider
...
Caused by: java.lang.ClassNotFoundException: com.intellij.database.settings.DatabaseParameterPatternProvider PluginClassLoader[PluginDescriptor(name=Java SQL Libraries, id=com.intellij.frameworks.java.sql, path=/Users/wemu/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIU/2020.2.2/de98c5e0347e6db5744d7829715edcdd69efffec/ideaIU-2020.2.2/plugins/javaSqlApis, version=202.7319.50)] com.intellij.ide.plugins.cl.PluginClassLoader@1905a8ad
...

I've attached a stripped down version of the plugin / gradle build.

Upload id: 2020_10_01_WVNfiz54SE1ZPY1k (file: pdb-datasource-importer-stripped.zip)

 

Is this a version conflict or a bug or an easy fix for this?

 

thanks a lot!

 

 

 

 

 

3 comments
Comment actions Permalink

Update: I've been able to get rid of the exception by removing the version from the setPlugins statement of the intellij task - so it seems to use the bundled version of the ultimate edition:

intellij {
    version = "2020.2.2"
    type = "IU"
    setPlugins("com.intellij.database")
}

 

0
Comment actions Permalink

Indeed you should always use bundled plugin when available.

1

Please sign in to leave a comment.