Repository navigation
[BUG] Administrator UI crashes when the latest element on clipboard is an image #196
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
Describe the bug
Logging in to the Admin causes java.lang.IllegalAccessError if the latest element in clipboard is an image.
To Reproduce
Setup steps (if required). Example:
- Copy any image to clipboard
- Googling an image and selecting
Copy Imageis sufficient
- Googling an image and selecting
- Launch the OIE Admin
- I have used Ballista
- Observe the
java.lang.IllegalAccessErrorin Ballista console
Expected behavior
The user is logged in to the Administrator.
Actual behavior
Login fails with the UI error message There was an error connecting to the server at the specified address. Please verify that the server is up and running., and the exception is printed in the terminal window where Ballista was started.
java.lang.IllegalAccessError: class com.sun.media.imageioimpl.plugins.pnm.PNMImageWriter (in unnamed module @0x6adbc9d) cannot access class sun.security.action.GetPropertyAction (in module java.base) because module java.base does not export sun.security.action to unnamed module @0x6adbc9d
at com.sun.media.imageioimpl.plugins.pnm.PNMImageWriter.<clinit>(PNMImageWriter.java:82)
at com.sun.media.imageioimpl.plugins.pnm.PNMImageWriterSpi.createWriterInstance(PNMImageWriterSpi.java:91)
at java.desktop/javax.imageio.spi.ImageWriterSpi.createWriterInstance(ImageWriterSpi.java:351)
at java.desktop/javax.imageio.ImageIO$ImageWriterIterator.next(ImageIO.java:849)
at java.desktop/javax.imageio.ImageIO$ImageWriterIterator.next(ImageIO.java:833)
at java.desktop/sun.awt.X11.XDataTransferer.getPlatformMappingsForFlavor(XDataTransferer.java:412)
at java.desktop/sun.awt.datatransfer.DesktopDatatransferServiceImpl.getPlatformMappingsForFlavor(DesktopDatatransferServiceImpl.java:87)
at java.datatransfer/java.awt.datatransfer.SystemFlavorMap.flavorToNativeLookup(SystemFlavorMap.java:447)
at java.datatransfer/java.awt.datatransfer.SystemFlavorMap.getNativesForFlavor(SystemFlavorMap.java:561)
at java.desktop/sun.awt.datatransfer.DataTransferer.getFlavorsForFormats(DataTransferer.java:459)
at java.desktop/sun.awt.datatransfer.ClipboardTransferable.<init>(ClipboardTransferable.java:88)
at java.desktop/sun.awt.X11.XClipboard.getContents(XClipboard.java:108)
at com.mirth.connect.client.ui.actions.PasteAction.isEnabled(PasteAction.java:41)
at java.desktop/javax.swing.AbstractAction.setEnabledFromAction(AbstractAction.java:106)
at java.desktop/javax.swing.AbstractButton.configurePropertiesFromAction(AbstractButton.java:1136)
at java.desktop/javax.swing.JMenuItem.configurePropertiesFromAction(JMenuItem.java:376)
at java.desktop/javax.swing.AbstractButton.setAction(AbstractButton.java:1078)
at java.desktop/javax.swing.JPopupMenu.add(JPopupMenu.java:329)
at com.mirth.connect.client.ui.components.MirthSyntaxTextArea.<init>(MirthSyntaxTextArea.java:80)
at com.mirth.connect.client.ui.components.MirthSyntaxTextArea.<init>(MirthSyntaxTextArea.java:53)
at com.mirth.connect.client.ui.EditMessageDialog.initComponents(EditMessageDialog.java:437)
at com.mirth.connect.client.ui.EditMessageDialog.<init>(EditMessageDialog.java:71)
at com.mirth.connect.client.ui.Frame.setupFrame(Frame.java:549)
at com.mirth.connect.client.ui.Mirth.<init>(Mirth.java:66)
at com.mirth.connect.client.ui.LoginPanel$8.handleSuccess(LoginPanel.java:566)
at com.mirth.connect.client.ui.LoginPanel$8.doInBackground(LoginPanel.java:455)
at com.mirth.connect.client.ui.LoginPanel$8.doInBackground(LoginPanel.java:424)
at java.desktop/javax.swing.SwingWorker$1.call(SwingWorker.java:304)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.desktop/javax.swing.SwingWorker.run(SwingWorker.java:343)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
Environment (please complete the following information):
- OS:
Manjaro Linux 25.0.10 - Java Distribution/Version:
17.0.16.fx-zulu - Connect Version:
4.5.2 - Desktop Environment:
KDE Plasma 6.3.6 - Display:
wayland
Workaround(s)
Manually adding --add-opens=java.base/sun.security.action=ALL-UNNAMED to the vmoptions in Ballista.
This needs to be added to the client-side Java's arguments.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working

Activity
ChristopherSchultz commentedon Apr 1, 2026
The solution is not to add
--add-opens=...to the command-line options for the client, but instead to upgrade the old janky pre-release version of JAI that shipped with Mirth Connect and still ships with OIE.The other option would be to ignore (and log) exceptions when checking to see whether the clipboard contains an applicable type of data to paste, and just say "nope".
fix: handle clipboard Error when image is in clipboard (OpenIntegrati…
fix: handle clipboard Error when image is in clipboard (OpenIntegrati…
fix: handle clipboard Error when image is in clipboard (OpenIntegrati…
fix: handle clipboard Error when image is in clipboard (#196)