rasterizer class not found, DeviceCMYKColorSpace

Bug #1598610 reported by Steven Simpson
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
batik (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

$ lsb_release -rd
Description: Ubuntu 16.04 LTS
Release: 16.04

$ apt-cache policy libbatik-java
libbatik-java:
  Installed: 1.8-3ubuntu1
  Candidate: 1.8-3ubuntu1
  Version table:
 *** 1.8-3ubuntu1 500
        500 http://gb.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
        500 http://gb.archive.ubuntu.com/ubuntu xenial/universe i386 Packages
        100 /var/lib/dpkg/status

Command:

  /usr/bin/rasterizer -m image/png -w 30 -h 40 -d mokvino.png mokvino.svg

Fails with "java.lang.NoClassDefFoundError: org/apache/xmlgraphics/java2d/color/DeviceCMYKColorSpace". Full error message at end. The output file is created, but is empty; obviously, rasterized version of input SVG was expected. Note that [rasterizer] with no args does not produce the error.

Problem seems to be in /usr/bin/rasterizer:

  # We need FOP for PDF output
  if locate_jar fop; then
      find_jars fop xmlgraphics-commons
  fi

xmlgraphics-commons is the jar with the correct class, but the [locate_jar fop] condition is false on my system. I've fixed locally by putting a separate [find_jars xmlgraphics-commons] outside of the condition.

$ /usr/bin/rasterizer -m image/png -w 30 -h 40 -d mokvino.png mokvino.svg
[warning] /usr/bin/rasterizer: No java runtime was found
[warning] /usr/bin/rasterizer: No JAVA_CMD set for run_java, falling back to JAVA_CMD = java
About to transcode 1 SVG file(s)

Converting mokvino.svg to mokvino.png ... Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/xmlgraphics/java2d/color/DeviceCMYKColorSpace
        at org.apache.batik.bridge.SVGShapeElementBridge.createShapePainter(Unknown Source)
        at org.apache.batik.bridge.SVGRectElementBridge.createShapePainter(Unknown Source)
        at org.apache.batik.bridge.SVGShapeElementBridge.buildGraphicsNode(Unknown Source)
        at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
        at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
        at org.apache.batik.bridge.GVTBuilder.build(Unknown Source)
        at org.apache.batik.bridge.SVGUseElementBridge.buildCompositeGraphicsNode(Unknown Source)
        at org.apache.batik.bridge.SVGUseElementBridge.createGraphicsNode(Unknown Source)
        at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
        at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
        at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
        at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
        at org.apache.batik.bridge.GVTBuilder.build(Unknown Source)
        at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(Unknown Source)
        at org.apache.batik.transcoder.image.ImageTranscoder.transcode(Unknown Source)
        at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown Source)
        at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(Unknown Source)
        at org.apache.batik.apps.rasterizer.SVGConverter.transcode(Unknown Source)
        at org.apache.batik.apps.rasterizer.SVGConverter.execute(Unknown Source)
        at org.apache.batik.apps.rasterizer.Main.execute(Unknown Source)
        at org.apache.batik.apps.rasterizer.Main.main(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.apache.xmlgraphics.java2d.color.DeviceCMYKColorSpace
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 21 more

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: libbatik-java 1.8-3ubuntu1
ProcVersionSignature: Ubuntu 4.4.0-28.47-generic 4.4.13
Uname: Linux 4.4.0-28-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
CurrentDesktop: KDE
Date: Sun Jul 3 19:20:17 2016
InstallationDate: Installed on 2016-06-08 (25 days ago)
InstallationMedia: Kubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=en_GB:en
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
SourcePackage: batik
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Steven Simpson (simpsons) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in batik (Ubuntu):
status: New → Confirmed
Changed in batik (Ubuntu):
importance: Undecided → Medium
Revision history for this message
MichielBeijen (michiel-beijen) wrote :

This bug is fixed in debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=824113 in 1.8-4.

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.