You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by bu...@apache.org on 2009/05/28 10:43:58 UTC
DO NOT REPLY [Bug 47277] New: Avoid java.awt.HeadlessException when
using WMF transcoder functionality
https://issues.apache.org/bugzilla/show_bug.cgi?id=47277
Summary: Avoid java.awt.HeadlessException when using WMF
transcoder functionality
Product: Batik
Version: 1.7
Platform: All
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: (RFE) Request For Extension
AssignedTo: batik-dev@xmlgraphics.apache.org
ReportedBy: gabriel.gajdos@ipdap.sk
I was using Batik with Jasper with some WMF images.
Everything was working perfectly in my Windows GUI environmenet.
But after deploying to server without available display GUI I got
java.awt.HeadlessException.
Setting -Djava.awt.headless=true was not sufficient.
I started small investigation and I identified the problem:
Toolkit.getDefaultToolkit().getScreenResolution().
I modified two classes (attached AbstractWMFReader and AbstractWMFPainter)
which use this call with a simple workaround.
1. only one call to this method is needed (subsequent calls can use final
static variable already declared).
2. If a HeadlessException is thrown, we assume (hardcoded) resolution 96
(current value from my GUI environment).
I think it is better to have this hardcoded output than thrown exception.
I tested this new classes and result was OK without thrown Exception.
I past my minor changes fot the case that someone else would appreciate
server-side functionality for reading WMF files.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org
DO NOT REPLY [Bug 47277] Avoid java.awt.HeadlessException when using
WMF transcoder functionality
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47277
Helder Magalhães <he...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
--- Comment #3 from Helder Magalhães <he...@gmail.com> 2009-11-29 03:31:53 UTC ---
(In reply to comment #0)
> Everything was working perfectly in my Windows GUI environmenet.
> But after deploying to server without available display GUI I got
> java.awt.HeadlessException.
> Setting -Djava.awt.headless=true was not sufficient.
I've also confirmed that this is already addressed in issue 42408. The other
patch is more complete in the sense that it allow configuring resolution
through transcoding hints.
I'm marking this issue as a duplicate of that bug, and invite you to help
testing that patch (currently the bug is marked "need info" as it wasn't yet
sufficiently tested).
(The patch I just attached was provided in the sense of easing the comparison
between this and the other bug.)
*** This bug has been marked as a duplicate of bug 42408 ***
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org
DO NOT REPLY [Bug 47277] Avoid java.awt.HeadlessException when using
WMF transcoder functionality
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47277
Helder Magalhães <he...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #23722|0 |1
is obsolete| |
--- Comment #2 from Helder Magalhães <he...@gmail.com> 2009-11-29 03:27:40 UTC ---
Created an attachment (id=24628)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=24628)
Propose fix
Hi Gabriel,
First of all, thanks for the fix. The suggested form for contributions is
through a patch, though. I've turned your raw file attachment into that. ;-)
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org
DO NOT REPLY [Bug 47277] Avoid java.awt.HeadlessException when using
WMF transcoder functionality
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47277
--- Comment #1 from Gabriel Gajdos <ga...@ipdap.sk> 2009-05-28 01:46:53 PST ---
Created an attachment (id=23722)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=23722)
Small changes for classes AbstractWMFReader and AbstractWMFPainter
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org