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

Adding flatlaf-jide-oss to classpath causes issues with jidesoft SortableTable under JDK11 #270

Closed
akuhtz opened this issue Mar 15, 2021 · 6 comments
Milestone

Comments

@akuhtz
Copy link

akuhtz commented Mar 15, 2021

Hello,

Adding flatlaf-jide-oss to classpath causes issues with jidesoft SortableTable under JDK11.
I get a java.lang.ClassNotFoundException: sun.swing.plaf.synth.SynthIcon when the sort arrows become visible.
It works fine under JDK8.

@DevCharly
Copy link
Collaborator

Could you please post the stack trace of the exception?

@akuhtz
Copy link
Author

akuhtz commented Mar 15, 2021

Sure.

java.lang.NoClassDefFoundError: sun/swing/plaf/synth/SynthIcon
	at com.jidesoft.plaf.basic.BasicPainter.paintSortableTableHeaderColumn(BasicPainter.java:928)
	at com.jidesoft.grid.SortableTableHeaderCellDecorator.paint(Unknown Source)
	at com.jidesoft.plaf.basic.BasicCellStyleTableHeaderUIDelegate.paintCell(Unknown Source)
	at com.jidesoft.plaf.basic.BasicCellStyleTableHeaderUIDelegate.paint(Unknown Source)
	at com.jidesoft.plaf.basic.BasicSortableTableHeaderUIDelegate.paint(Unknown Source)
	at com.jidesoft.plaf.windows.WindowsCellStyleTableHeaderUI.paint(Unknown Source)
	at java.desktop/javax.swing.plaf.ComponentUI.update(Unknown Source)
	at java.desktop/javax.swing.JComponent.paintComponent(Unknown Source)
	at com.jidesoft.grid.DraggingTableHeader.paintComponent(Unknown Source)
	at com.jidesoft.grid.SortableTableHeader.paintComponent(Unknown Source)
	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
	at java.desktop/javax.swing.JViewport.paint(Unknown Source)
	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
	at java.desktop/javax.swing.JLayeredPane.paint(Unknown Source)
	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
	at java.desktop/javax.swing.JComponent.paintToOffscreen(Unknown Source)
	at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBufferedImpl(Unknown Source)
	at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
	at java.desktop/javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
	at java.desktop/javax.swing.RepaintManager.paint(Unknown Source)
	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
	at java.desktop/java.awt.GraphicsCallback$PaintCallback.run(Unknown Source)
	at java.desktop/sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)
	at java.desktop/sun.awt.SunGraphicsCallback.runComponents(Unknown Source)
	at java.desktop/java.awt.Container.paint(Unknown Source)
	at java.desktop/java.awt.Window.paint(Unknown Source)
	at java.desktop/javax.swing.RepaintManager$4.run(Unknown Source)
	at java.desktop/javax.swing.RepaintManager$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
	at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
	at java.desktop/javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)
	at java.desktop/javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: sun.swing.plaf.synth.SynthIcon
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
	at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
	... 56 more

@DevCharly
Copy link
Collaborator

Seems that the JIDE version that you use is not compatible with Java 9+.

Class sun.swing.plaf.synth.SynthIcon does not exist in Java 9+.
It is now in package javax.swing.plaf.synth.

Seems the problem was fixed in JIDE OSS in this commit:
jidesoft/jide-oss@afac15d
So you need at least JIDE 3.7.1

@akuhtz
Copy link
Author

akuhtz commented Mar 15, 2021

Hmmmm I use JIDE 3.7.11 with the jide-common dependency that I thought is the same as jide-oss.
This pulled in the old jide-oss version. I excluded jide-oss from flatlaf-jide-oss and now it works!
Thank you very much for pointing me in the right direction.

DevCharly added a commit that referenced this issue Mar 19, 2021
…:jide-oss:3.6.18` to avoid problems when another JIDE library should be used (issue #270)
@DevCharly
Copy link
Collaborator

Was not aware that JIDE OSS is contained in various libraries.

To avoid this kind of problems, I've removed the dependency on com.jidesoft:jide-oss:3.6.18 from the generated Maven POM.
So starting with the next release of FlatLaf, it should be no longer necessary to exclude com.jidesoft:jide-oss in your build script.

@DevCharly DevCharly added this to the 1.1 milestone Mar 19, 2021
@DevCharly
Copy link
Collaborator

I've built and published latest jide-oss version to Maven Central:
https://search.maven.org/artifact/com.formdev/jide-oss

<dependency>
  <groupId>com.formdev</groupId>
  <artifactId>jide-oss</artifactId>
  <version>3.7.11.1</version>
</dependency>

This was built on GitHub Actions using Gradle.
Project is here: https://github.com/JFormDesigner/jide-oss

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