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 pdfsam.sh 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.

14 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
    =========================================================================

    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”
    JAVA=”$JAVA_HOME”
    else
    JAVA=”java”
    fi
    fi

    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(ClassLoader.java:1009)
    at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
    at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:801)
    at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:699)
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:622)
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:580)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
    at org.pdfsam.community.App.main(App.java:34)
    Caused by: java.lang.ClassNotFoundException: javafx.scene.layout.HBox
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
    … 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 pdfsam.sh 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.(FontUtils.java:74)
    at org.sejda.impl.sambox.component.PDDocumentHandler.close(PDDocumentHandler.java:231)
    at org.sejda.common.ComponentsUtility.nullSafeClose(ComponentsUtility.java:63)
    at org.sejda.common.ComponentsUtility.nullSafeCloseQuietly(ComponentsUtility.java:49)
    at org.sejda.impl.sambox.MergeTask.closeResources(MergeTask.java:232)
    at org.sejda.impl.sambox.MergeTask.after(MergeTask.java:237)
    at org.sejda.core.service.DefaultTaskExecutionService.actualExecution(DefaultTaskExecutionService.java:151)
    at org.sejda.core.service.DefaultTaskExecutionService.execute(DefaultTaskExecutionService.java:71)
    at org.sejda.core.service.DefaultTaskExecutionService.execute(DefaultTaskExecutionService.java:58)
    at org.pdfsam.task.TaskExecutionController.lambda$request$0(TaskExecutionController.java:87)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

  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 pdfsam-4.0.1-linux.zip 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:
    # https://github.com/AdoptOpenJDK/openjdk-build/issues
    #
    Press any key to continue . . .

Leave a Reply

Your email address will not be published. Required fields are marked *

mode_edit
account_circle
email