Page MenuHomeSolus

PDFsam error "Reflective method invocation exception"
Closed, ResolvedPublic

Description

PDFsam works fine in principle, but after each task execution like merge or split I get a "Reflective method invocation exception" as below (after merge test).
The task has been done as expected, but afterwards I can't start any other task, need to close and re-open the application.

In the below logs I see an error about jfxmediamissing (2nd "Caused by..."), although the Solus package openjdk-11 is supposed to contain openjfx-11. But if I search my file system, I can only find openjfx-8 files.

Is there possibly something wrong with openjfx in the openjdk-11 package or is this an issue with the PDFsam build?

INFO   [20:37:32]: Task (org.sejda.impl.sambox.MergeTask@35dee07) executed in 0 seconds
ERROR  [20:37:32]: Unexpected error
org.pdfsam.eventstudio.exception.EventStudioException: Reflective method invocation exception
at org.pdfsam.eventstudio.Listeners$ReflectiveListenerWrapper.onEvent(Listeners.java:251)
at org.pdfsam.eventstudio.Station.doBroadcast(Station.java:94)
at org.pdfsam.eventstudio.Station.broadcast(Station.java:80)
at org.pdfsam.eventstudio.DefaultEventStudio.broadcast(DefaultEventStudio.java:208)
at org.pdfsam.task.TaskExecutionController$TaskEventBroadcaster.lambda$onEvent$0(TaskExecutionController.java:101)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:277)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.reflect.InvocationTargetException: null
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.pdfsam.eventstudio.Listeners$ReflectiveListenerWrapper.onEvent(Listeners.java:244)
... 11 common frames omitted
Caused by: java.lang.UnsatisfiedLinkError: no jfxmedia in java.library.path: [/usr/java/packages/lib, /usr/lib64, /lib64, /lib, /usr/lib]
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2670)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:830)
at java.base/java.lang.System.loadLibrary(System.java:1873)
at javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:150)
at javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:62)
at javafx.media/com.sun.media.jfxmediaimpl.NativeMediaManager.lambda$new$0(NativeMediaManager.java:137)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.media/com.sun.media.jfxmediaimpl.NativeMediaManager.<init>(NativeMediaManager.java:107)
at javafx.media/com.sun.media.jfxmediaimpl.NativeMediaManager$NativeMediaManagerInitializer.<clinit>(NativeMediaManager.java:78)
at javafx.media/com.sun.media.jfxmediaimpl.NativeMediaManager.getDefaultInstance(NativeMediaManager.java:90)
at javafx.media/com.sun.media.jfxmedia.MediaManager.canPlayProtocol(MediaManager.java:78)
at javafx.media/com.sun.media.jfxmedia.locator.Locator.<init>(Locator.java:239)
at javafx.media/com.sun.media.jfxmediaimpl.NativeMediaAudioClip.<init>(NativeMediaAudioClip.java:53)
at javafx.media/com.sun.media.jfxmediaimpl.NativeMediaAudioClip.load(NativeMediaAudioClip.java:63)
at javafx.media/com.sun.media.jfxmediaimpl.AudioClipProvider.load(AudioClipProvider.java:66)
at javafx.media/com.sun.media.jfxmedia.AudioClip.load(AudioClip.java:135)
at javafx.media/javafx.scene.media.AudioClip.<init>(AudioClip.java:83)
at org.pdfsam.sound.PlaySoundController.playSound(PlaySoundController.java:70)
at org.pdfsam.sound.PlaySoundController.playCompleted(PlaySoundController.java:65)
... 16 common frames omitted

Revisions and Commits

Related Objects

Event Timeline

joebonrichie triaged this task as Needs More Info priority.Dec 16 2021, 9:28 PM
joebonrichie edited projects, added Software; removed Lacks Project.
joebonrichie added a subscriber: joebonrichie.

I just updated pdfsam to 4.2.9 and managed to split a pdf okay without issues. Can you try to install the latest version and see if that helps by running:
sudo eopkg it https://packages.getsol.us/unstable/p/pdfsam/pdfsam-4.2.9-7-1-x86_64.eopkg

For reference: openjfx is integrated within our openjdk-11 package but they are split packages for openjdk8.

Thanks @joebonrichie for your quick response.
I tried the updated version, but no difference. I can split or merge documents once, but after executing the first split the message icon on the top right turns red.

grafik.png (59×250 px, 1 KB)

If I want to split another document, in most cases I can't just select another one and start the split again because the Start button keeps greyed-out. So I have to restart the app after each task.

grafik.png (69×374 px, 4 KB)

As I was testing this now by repeating the same task multiple times, I found that sometimes I only get the error message but can still continue to work without restart (Start button reverts to green). The strange thing is that it sometimes works even using the same document. I have not found any reason why it sometimes works and most times not.
One other thing which I observed now is that the order of the task boxed on the home screen varies with each start. Sometimes the "Split" is first and other times the "Merge".

I'm not sure anymore if the jxfmedia error has anything to do with this problem or can be ignored, as it is also shown in the few cases where it all works.

@palto42 from what i can tell jfxmedia is responsible for emitting a ding sound after the action has completed and shouldn't otherwise affect functionality but could be the cause of the issue. Thanks to your detailed explanation I was able to replicate your issue and it seems to be resolved with D12494.

joebonrichie raised the priority of this task from Needs More Info to Normal.Dec 17 2021, 8:09 PM

@joebonrichie Thanks a lot for your effort, will test as soon as the updated openjdk-11 package with D12494 is available.