Sometimes it can happen that PDFsam Basic doesn’t start and there is no error message or anything that could help you understand what is the issue.

First thing to do …

Is to make sure a Java Runtime version 8 or above is correctly installed on your machine (Java 8 is a requirement given PDFsam Basic is written in Java). We do all sorts of checks during the installation process and during the startup of the application to make sure we inform the user if Java 8 is missing but there might be some exotic case we missed, so first thing try upgrading Java to its latest version.

Second thing to do …

If that didn’t solve the issue you can try running PDFsam Basic using a startup script we provide in the bin subdirectory. You will find two files called for Linux systems and pdfsam.bat for Windows systems, run/double-click the one for your system, a shell/Command Prompt window will open, PDFsam Basic will try to start and a number of debug messages will show up in the shell window. Take a look at those messages and see if there is some enlightening information that can explain what is the issue.

If none of the above worked, just drop us an email attaching the not-so-enlightening debug messages in your shell window, we will try to figure out what is happening.

19 Replies to “How to debug PDFsam Basic if it doesn’t start”
  1. I can’t start the program, I am including the message below. I verified the java and is installed… could you please help me? Thank you.
    Here is the message I received:
    [email protected]:~$ pdfsam


    JAVA: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java/bin/java

    JAVA_OPTS: -Xmx256m

    CLASSPATH: /usr/share/pdfsam/pdfsam-1.1.4.jar:/usr/share/pdfsam/lib/dom4j.jar:/usr/share/pdfsam/lib/emp4j-1.0.1.jar:/usr/share/pdfsam/lib/itext.jar:/usr/share/pdfsam/lib/jaxen.jar:/usr/share/pdfsam/lib/log4j-1.2.jar:/usr/share/pdfsam/lib/looks.jar:/usr/share/pdfsam/lib/pdfsam-console-2.0.6e.jar:/usr/share/pdfsam/lib/pdfsam-jcmdline-1.0.3.jar:/usr/share/pdfsam/lib/pdfsam-langpack.jar


    /usr/bin/pdfsam: 63: /usr/bin/pdfsam: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java/bin/java: not found
    [email protected]:~$ ^C
    [email protected]:~$

  2. Alright, so I took the courage and… edited the /usr/bin/pdfsam
    I commented a line, because I figured out there is an inexistent subdirectory in the error path, then the program started! Here is the edit — you will recognize the commented line, I only post the modified section:

    # Setup the JVM
    if [ “x$JAVA” = “x” ]; then
    if [ “x$JAVA_HOME” != “x” ]; then
    # JAVA=”$JAVA_HOME/bin/java”

    I hope I did right… Thank you.

  3. Hello,

    PDFsam was working well but today I tried using it and it instantly opened and closed and if I try to launch via a terminal I get the following message :
    Exception in thread “main” java.lang.NoClassDefFoundError: javafx/scene/layout/HBox
    at java.base/java.lang.ClassLoader.defineClass1(Native Method)
    at java.base/java.lang.ClassLoader.defineClass(
    at java.base/
    at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(
    at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(
    at java.base/java.lang.ClassLoader.loadClass(
    Caused by: java.lang.ClassNotFoundException: javafx.scene.layout.HBox
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(
    at java.base/java.lang.ClassLoader.loadClass(
    … 10 more

    I checked with synaptic (I am on ubuntu) and JRE 8 is installed.

    Best regards,

  4. Hmm, unfortunately this is not helpful – I can see some Java exceptions, it’s Ubuntu 18.04.01 LTS with all possible updates installed (I’ll send you guys a screenshot). Tnx anyhow, keep up the good work (I know it works on Windows 😉 )!

  5. Hello,
    i do have exactly the same problem, with the same messages when launching from a terminal. … I know it works under Win 10. But not under Ubuntu 18.04.1 LTS…
    I have tried to execute but with no success.
    Thanks for your help and regards.

  6. The program starts normally but it gave me error after we execute a command (e.q. merge):

    INFO [12:33:16]: Starting PDFsam
    INFO [12:33:17]: Configuring Sejda 3.2.38
    INFO [12:33:18]: Started in 2 seconds
    INFO [12:33:28]: laporan akhir penelitian pdd.pdf loaded
    INFO [12:33:38]: aab format – paper 3 – variance components and genetic parameters estimation.pdf loaded
    INFO [12:33:46]: Starting task ([email protected]) execution.
    WARN [12:33:47]: New fonts found, font cache will be re-built
    WARN [12:33:47]: Building on-disk font cache, this may take a while
    ERROR [12:33:47]: Unexpected error
    java.lang.NoClassDefFoundError: Could not initialize class org.sejda.sambox.pdmodel.font.PDType1Font
    at org.sejda.impl.sambox.util.FontUtils.(
    at org.sejda.impl.sambox.component.PDDocumentHandler.close(
    at org.sejda.common.ComponentsUtility.nullSafeClose(
    at org.sejda.common.ComponentsUtility.nullSafeCloseQuietly(
    at org.sejda.impl.sambox.MergeTask.closeResources(
    at org.sejda.impl.sambox.MergeTask.after(
    at org.sejda.core.service.DefaultTaskExecutionService.actualExecution(
    at org.sejda.core.service.DefaultTaskExecutionService.execute(
    at org.sejda.core.service.DefaultTaskExecutionService.execute(
    at org.pdfsam.task.TaskExecutionController.lambda$request$0(
    at java.util.concurrent.ThreadPoolExecutor.runWorker(
    at java.util.concurrent.ThreadPoolExecutor$

  7. I am using PDFsam Basic 4.0.0. and it is showing following error

    Error occurred during initialization of VM
    java.lang.IllegalArgumentException: Null charset name
    at java.nio.charset.Charset.lookup(java.base/Unknown Source)
    at java.nio.charset.Charset.defaultCharset(java.base/Unknown Source)
    at java.lang.StringCoding.decode(java.base/Unknown Source)
    at java.lang.String.(java.base/Unknown Source)
    at java.lang.String.(java.base/Unknown Source)
    at java.lang.System.initProperties(java.base/Native Method)
    at java.lang.System.initPhase1(java.base/Unknown Source)

  8. I’ve been using pdfsam basic for years on fedora. It’s been great. Latest has been v3.3.7, works great.
    Just installed v4.0.1 from the downloaded file. Oracle java is jdk1.8.0_112 and running pdfsam creates lots of errors and no hs_err_log after briefly displaying a startup small graphic window (screenshot available). Openjdk v1.8.0_201is also available. This gives the same small graphic and an hs_err_log file.

  9. PDF SAM Basic is not starting 🙁 here is report from bat file, please help! 🙂
    # A fatal error has been detected by the Java Runtime Environment:
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007fff3e244a10, pid=11800, tid=9212
    # JRE version: OpenJDK Runtime Environment (11.0.3+7) (build 11.0.3+7)
    # Java VM: OpenJDK 64-Bit Server VM (11.0.3+7, mixed mode, tiered, compressed oops, g1 gc, windows-amd64)
    # Problematic frame:
    # V [jvm.dll+0x104a10]
    # No core dump will be written. Minidumps are not enabled by default on client versions of Windows
    # An error report file with more information is saved as:
    # C:\Users\apawl\AppData\Local\Temp\\hs_err_pid11800.log
    # If you would like to submit a bug report, please visit:
    Press any key to continue . . .

  10. Windows 7 – pdfsam basic 4.0.4 – java.212

    Exception in thread “WindowsNativeRunloopThread” java.lang.NoSuchMethodError:
    at Method)
    at Method)
    at java.base/ Source)
    Exception in thread “WindowsNativeRunloopThread” java.lang.NoSuchMethodError:
    at Method)
    at Method)
    at java.base/ Source)
    Exception in thread “JavaFX Application Thread” java.lang.NullPointerException
    at com.sun.prism.d3d.D3DPipeline.getAdapterOrdinal(
    at Method)
    at java.base/ Source)

  11. I just updated PDF Sam yesterday to the new version since it was 6 months I did not updated and now this new error it appears:

    Exception in thread “main” java.lang.NoClassDefFoundError: org/pdfsam/injector/Injector
    at org.pdfsam.basic.App.main(
    Caused by: java.lang.ClassNotFoundException: org.pdfsam.injector.Injector
    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)
    … 1 more
    Premere un tasto per continuare . . .

Leave a Reply

Your email address will not be published.