pdfsam won't run, has missing and conflicting dependencies

Bug #1887142 reported by Thomas Schweikle
44
This bug affects 6 people
Affects Status Importance Assigned to Milestone
libhibernate-validator-java (Debian)
New
Unknown
libhibernate-validator-java (Ubuntu)
Fix Released
Undecided
Unassigned
Focal
New
Undecided
Unassigned
libsejda-java (Ubuntu)
Fix Released
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned
pdfsam (Debian)
Fix Released
Unknown
pdfsam (Ubuntu)
Fix Released
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
pdfsam fails to work due missing and conflicting dependencies.

On Focal and Groovy libhibernate-validator-java has a runtime dependency on libel-api-java and an implementation of el-api. Both are usually provided when running under Java EE. On Java SE the application must take care of providing them - and pdfsam is missing these dependencies.

The usual implementation of el-api on Maven projects is from Glassfish, but that has not yet been packaged. libtomcat9-embed-java also provides one such implementation in tomcat9-embed-el.jar which can be used instead.

Also during build time pdfsam must create links of the jar files it needs for runtime: tomcat9-embed-el.jar and classmate.jar (a new dependency from libhibernate-validator-java) are missing from this list.

Only on Focal:
* libsejda-java 3.2.84-1 depends on libgeronimo-validation-1.0-spec-java
* libhibernate-validator-java depends on libgeronimo-validation-1.1-spec-java

A Java application must has either 1.0 or 1.1 spec on its classpath, never both as they are incompatible. To fix this libsejda-java in Focal should be updated to 3.2.84-2 so everything depends on the 1.1 spec (ie. libgeronimo-validation-1.1-spec-java).

[Test Case]
1) On Focal and Groovy, install pdfsam and run it
$ sudo apt get install -y pdfsam
$ pdfsam
2) Split a PDF

Expected result:
For the action to execute correctly.

Actual result:
The console shows a java stacktrace such as
ERROR 15:56:04.873 org.pdfsam.UncaughtExceptionLogger[JavaFX Application Thread] Unexpected error
org.sejda.eventstudio.exception.EventStudioException: Reflective method invocation exception
...

[Regression Potential]
* libseja-java backport:
Moving from 1.0 to 1.1 spec might cause regressions on packages that depend on libsejda-java as now el-api (and its implementation) must be available on the classpath (default on Java EE). At this time the only package that depends on libsejda-java is pdfsam.
Ubuntu users consuming libsejda-java directly can regress if something else in their dependency chain currently relies on spec 1.0 - they would need to update these dependencies to also use spec 1.1.

* New dependency on libtomcat9-embed-java (as an el-api provider):
The most common implementation of el-api is from Glassfish, so using tomcat9 to provide this might introduce problems if it deviates from the spec (unlikely, as tomcat is also a Java EE provider).

[Other Info]

[Original Report]
pdfsam does not produce an output file because of various java-exceptions.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: pdfsam 4.0.4-1
ProcVersionSignature: Ubuntu 5.4.0-40.44-generic 5.4.44
Uname: Linux 5.4.0-40-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.3
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: XFCE
Date: Fri Jul 10 11:46:14 2020
InstallationDate: Installed on 2019-09-09 (304 days ago)
InstallationMedia: Xubuntu 19.04 "Disco Dingo" - Release amd64 (20190416)
PackageArchitecture: all
SourcePackage: pdfsam
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Thomas Schweikle (tps) wrote :
Changed in pdfsam (Debian):
status: Unknown → Confirmed
Changed in libhibernate-validator-java (Debian):
status: Unknown → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in libhibernate-validator-java (Ubuntu):
status: New → Confirmed
Changed in pdfsam (Ubuntu):
status: New → Confirmed
summary: - pdfsam does not produce output
+ libhibernate-validator-java should be kept at 4.3.4-1
Revision history for this message
Thomas Schweikle (tps) wrote : Re: libhibernate-validator-java should be kept at 4.3.4-1

Works with Java from Oracle, does not work with OpenJava.

Changed in libspring-java (Debian):
status: Unknown → Confirmed
description: updated
tags: added: groovy
description: updated
summary: - libhibernate-validator-java should be kept at 4.3.4-1
+ libhibernate-validator-java should be backported to 4.3.4-1~18.04.1
description: updated
Revision history for this message
Tiago Stürmer Daitx (tdaitx) wrote : Re: libhibernate-validator-java should be backported to 4.3.4-1~18.04.1

Backporting libhibernate-validator-java didn't work as expected. While the 4.3.4-1 deb binary from Focal (when it was still devel) works fine, it no longer builds as it depended on jboss-logging 3.3. The newer jboss-logging 3.4 does not provide the same classes and it has too many reverse (build) dependencies to be feasible to downgrade.

Going the other way and updating libsejda-java to rely on libgeronimo-validation-1.1-spec-java requires some new dependencies (see debian bug 942507):
* libel-api-java
* an el-api implementation, usually Glassfish, but it is not yet packaged, thus tomcat9-jasper-el.jar can be used
* libhibernate-validator-java >= 5.3.6-2 (as 5.3.6-1 is missing some runtime dependencies)

The first 2 dependencies come from libhibernate-validator-java 5.3.6, but they are expected to be automatically provided by the Java EE environment and don't show up as actual dependencies. Since pdfsam run Java SE it must provide them.

description: updated
summary: - libhibernate-validator-java should be backported to 4.3.4-1~18.04.1
+ pdfsam won't run, has missing and conflicting dependencies
no longer affects: libspring-java (Ubuntu)
no longer affects: libspring-java (Debian)
Changed in libhibernate-validator-java (Ubuntu):
status: Confirmed → Fix Released
Changed in libsejda-java (Ubuntu):
status: New → Fix Released
Changed in pdfsam (Ubuntu Focal):
status: New → Confirmed
description: updated
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pdfsam - 4.0.4-1ubuntu1

---------------
pdfsam (4.0.4-1ubuntu1) groovy; urgency=medium

  * Add dependency on el-api and libtomcat9-java, require newer
    libsejda-java and libhibernate-validator-java. (LP: #1887142)

 -- Tiago Stürmer Daitx <email address hidden> Wed, 23 Sep 2020 00:40:25 +0000

Changed in pdfsam (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Robie Basak (racb) wrote :

> Moving from 1.0 to 1.1 spec might cause regressions on packages that depend on libsejda-java as now el-api (and its implementation) must be available on the classpath (default on Java EE). At this time the only package that depends on libsejda-java is pdfsam.

Is it possible that any Ubuntu users consume libsejda-java directly, and thus would be regressed by bumping it to to the 1.1 spec?

description: updated
Revision history for this message
Tiago Stürmer Daitx (tdaitx) wrote :

> Is it possible that any Ubuntu users consume libsejda-java directly, and thus would be regressed by bumping it to to the 1.1 spec?

Thanks for catching this. I updated the regression to include:
 Ubuntu users consuming libsejda-java directly can
 regress if something else in their dependency chain
 currently relies on spec 1.0 - they would need to
 update these dependencies to also use spec 1.1.

I don't know how I could/should evaluate how bad this is compared to having a non-working package such as pdfsam, so I would appreciate any feedback related to the SRU process on such decisions (maybe just having the regressions described is good enough?).

Revision history for this message
Robie Basak (racb) wrote :

> I don't know how I could/should evaluate how bad this is compared to having a non-working package such as pdfsam, so I would appreciate any feedback related to the SRU process on such decisions (maybe just having the regressions described is good enough?).

Just whatever best effort you can manage. I don't think there's any specific objective measure that can be used. Thank you for noting this in the bug description. I think describing these are important because if a user does get regressed, it does help that they can find out that we considered their case when making a decision.

In this case I think that given no such user is known and no other packages in the archive use libsejda-data the likelyhood of regression in this manner is unlikely, so bumping this is the least worst option to fix pdfsam (which surely has many more direct users).

Changed in libsejda-java (Ubuntu Focal):
status: New → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
Robie Basak (racb) wrote : Please test proposed package

Hello Thomas, or anyone else affected,

Accepted libsejda-java into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/libsejda-java/3.2.84-2~20.04 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in pdfsam (Ubuntu Focal):
status: Confirmed → Fix Committed
Revision history for this message
Robie Basak (racb) wrote :

Hello Thomas, or anyone else affected,

Accepted pdfsam into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/pdfsam/4.0.4-1ubuntu2~20.04 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Tiago Stürmer Daitx (tdaitx) wrote :

Verified pdfsam 4.0.4-1ubuntu2~20.04 and libsejda-java 3.2.84-2~20.04 from focal-proposed.

I confirm that PDFSam now works for splitting and merging PDF files.

pdfsam:
  Installed: 4.0.4-1ubuntu2~20.04
  Candidate: 4.0.4-1ubuntu2~20.04
  Version table:
 *** 4.0.4-1ubuntu2~20.04 400
        400 http://localhost:9999/ubuntu focal-proposed/universe amd64 Packages
        100 /var/lib/dpkg/status
     4.0.4-1 500
        500 http://localhost:9999/ubuntu focal/universe amd64 Packages
libsejda-java:
  Installed: 3.2.84-2~20.04
  Candidate: 3.2.84-2~20.04
  Version table:
 *** 3.2.84-2~20.04 400
        400 http://localhost:9999/ubuntu focal-proposed/universe amd64 Packages
        100 /var/lib/dpkg/status
     3.2.84-1 500
        500 http://localhost:9999/ubuntu focal/universe amd64 Packages

tags: added: verification-done-focal
removed: verification-needed verification-needed-focal
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pdfsam - 4.0.4-1ubuntu2~20.04

---------------
pdfsam (4.0.4-1ubuntu2~20.04) focal; urgency=medium

  * Backport from Groovy.

pdfsam (4.0.4-1ubuntu2) groovy; urgency=medium

  * Add dependency on libtomcat9-embed-java and require newer
    libsejda-java and libhibernate-validator-java. (LP: #1887142)

 -- Tiago Stürmer Daitx <email address hidden> Wed, 23 Sep 2020 03:52:16 +0000

Changed in pdfsam (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libsejda-java - 3.2.84-2~20.04

---------------
libsejda-java (3.2.84-2~20.04) focal; urgency=medium

  * Backport from Groovy.
  * Fix incompatibility with libhibernate-validator-java by also
    building against libgeronimo-validation-1.1-spec-java. LP: #1887142.

libsejda-java (3.2.84-2) unstable; urgency=medium

  * Team upload.
  * Depend on libgeronimo-validation-1.1-spec-java
    instead of libgeronimo-validation-1.0-spec-java
  * Standards-Version updated to 4.5.0
  * Switch to debhelper level 12

 -- Tiago Stürmer Daitx <email address hidden> Thu, 17 Sep 2020 02:11:44 +0000

Changed in libsejda-java (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for pdfsam has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

tags: added: fr-740
Revision history for this message
corrado venturini (corradoventu) wrote :

works fine for me on Groovy
corrado@corrado-x2-gg-1009:~$ apt policy pdfsam
pdfsam:
  Installed: 4.0.4-1ubuntu2
  Candidate: 4.0.4-1ubuntu2
  Version table:
 *** 4.0.4-1ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu groovy/universe amd64 Packages
        500 http://archive.ubuntu.com/ubuntu groovy/universe i386 Packages
        100 /var/lib/dpkg/status
corrado@corrado-x2-gg-1009:~$

Changed in pdfsam (Debian):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.