Jump to content
Changes to the Jaspersoft community edition download ×

problem when using JasperManager.fillReport()


Recommended Posts

By: peter - pxiao

problem when using JasperManager.fillReport()

2003-07-31 23:54

Hi all,

 

I am using jasper 0.4.6. I have problem when runing JasperManager.fillReport(JasperReport, params, Connection) under linux 8. But when I try to running under windows, it works fine(without any

error) with the same binary code.. can somebody help pls(any ideas?)!

 

 

Exception message from linux:

 

2003-08-01 16:23:09,865 ERROR [org.jboss.web.localhost.Engine] ----- Root Cause -----

java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.

at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)

at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:125)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:140)

at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:62)

at dori.jasper.engine.fill.JRBaseFiller.<clinit>(JRBaseFiller.java:205)

at dori.jasper.engine.fill.JRFiller.fillReport(JRFiller.java:110)

at dori.jasper.engine.JasperFillManager.fillReport(JasperFillManager.java:219)

at dori.jasper.engine.JasperManager.fillReport(JasperManager.java:738)

 

 

thanks

 

Peter

 

 

 

 

By: elmar weber - elmar_weber

RE: problem when using JasperManager.fillRepo

2003-08-01 01:19

Hello,

 

this is a (common) problem with console applications under linux, either there is no active graphical display, or it has not been set for the java console app.

 

1. you set it manually, take a look at the following url of the apache project [1] on how to do it, or search via google [2] for your exception.

 

2. you use the headless parameter (thats that I've done to do some image manipulation in a servlet).

By using this option, you ensure that java emulates or knows that there is now active xserver:

 

I wrote:

 

export CATALINA_OPTS="-Djava.awt.headless=true"

 

in the startup scripts of the tomcat server.

 

You seem to use JBoss, write something similiar in the startup script of it.

 

 

hth,

Elmar

 

 

[1] http://java.apache.org/faq/fom-serve/cache/73.html

[2] http://www.google.de/search?q=java%20%22Can't%20connect%20to%20X11%20window%20server%20using%20':0.0'%20as%20the%20value%20of%20the%20DISPLAY%22

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...