Jump to content
We've recently updated our Privacy Statement, available here ×

How use jasper without X server ???


Recommended Posts

By: remi - rpeyret

How use jasper without X server ???

2003-02-06 04:58

I just finished to develop my application and it works fine on my own NT and linux server. But I want to install it on a platform and I have got this error :

 

Can't connect to X11 window server using 'localhost:0.0' as the value of the DISPLAY variable

 

I try several things, export DISPLAY, setenv DISPLAY but it doesn't work. I can't launch Xbvf or xhost + because these commands are unknown.

 

Is there any other way ???

 

 

 

 

By: remi - rpeyret

RE: How use jasper without X server ???

2003-02-06 09:37

the solution is to install Xvbf on the server

 

Great !

 

 

 

 

By: Mark Rhodes - mrhodes2

RE: How use jasper without X server ???

2003-02-07 15:47

Could you help be a little more specific. I too must run xserver on my linux redhat 8.0 server. I'd like to not do so. I've looked for Xvbf on sourceforge and google and can't locatate it. Or I am jave JVM 1.4.1_01 and would use the headless graphics option you speak of, but I can't find any reference to it on java.sun.com website.

 

 

 

 

By: remi - rpeyret

RE: How use jasper without X server ???

2003-02-06 06:08

The installed jdk is 1.3.1

and the version of tomcat 3.3.

 

I have to use these :(

 

 

 

 

By: Rajan Karunakaran - rkaran

RE: How use jasper without X server ???

2003-02-08 08:31

That is okay. What you have to do is create a web page or jsp page which will provide the user with the ability to enter parameters via a form. On clicking the submit button of the form, the page should call the servlet that wraps JasperReports. All development can be done on a Windows box and then move the jar file to the webapps directory of Tomcat. You can either include the JasperReports jar files along with your application's class file or you can put the JasperReports jar files into Tomcat's common library file directories (the ones where you would put in your JDBC files, etc.). This way you don't need to have X running on the Linux server

 

 

 

 

By: Rajan Karunakaran - rkaran

RE: How use jasper without X server ???

2003-02-08 08:35

A note:

 

I don't know what kind of app you are developing, but the method I discussed above assumes that you are going to output to HTML. But you can also set the mime-type of the HTTP response to excel, pdf, etc. and stream a .xls or .pdf file back to the browser, which will then recognise the mime-type and open the report in the appropriate application.

 

 

 

 

By: Rick Sperko - rsperko

RE: How use jasper without X server ???

2003-02-18 09:23

I was able to get JasperReports working using PJA (Pure Java AWT) and JDK 1.3.1. The arguments I passed to the JVM were: -Xbootclasspath/a:/pajlibdir/pja.jar -Dawt.toolkit=com.eteks.awt.PJAToolkit -Djava.awt.graphicsenv=com.eteks.java2d.PJAGraphicsEnvironment

 

 

 

 

 

By: Boris Klug - bklug

RE: How use jasper without X server ???

2003-02-19 05:20

To use the headless support in JDK 1.4.1 all you have to do is setting the java system property java.awt.headless to true, e.g. with "java -Djava.awt.headless=true theclass".

 

We use JasperReports in web apps (with appserver Enhydra) on a Linux 2.4.18 box based on SuSE 8 with jdk 1.4.1 and it works fine.

 

Find more information about headless support on the Sun webpages: http://java.sun.com/j2se/1.4/docs/guide/awt/AWTChanges.html#headless

 

 

 

 

 

 

By: Steven Blough - stevenblough

RE: How use jasper without X server ???

2003-02-06 05:47

have you tried to use jvm1.4 headless graphics?

 

 

 

 

By: Gregory A. Swarthout - gswarthout

RE: How use jasper without X server ???

2003-05-15 12:58

Using the headless graphics option eliminates the error caused by not having X server, but there is a new error in its place. I get a ClassDefNotFound error, which I see from the forums is directly related to the X server issue.

 

What I haven't seen is the solution to this error. Does anyone have one?

 

Greg

 

 

 

 

By: Harry LeBlanc - harryleblanc

RE: How use jasper without X server ???

2003-10-31 15:20

I'm having this problem too. I'm running jboss on redhat with a jvm of 1.3.1 -- if I upgrade to 1.4.1 and use the -D options outlined in this thread, does that suffice? Or do I need to install some other package to "fake" an X system? I'm actually running X on the server, is there a way to point at it?

Thanks,

Harry

 

 

 

 

By: Fred Welland - fwelland

RE: How use jasper without X server ???

2003-10-31 18:51

I am sure this has been mentioned many times before but Xvfb works great (for Jasper and other Java2d/AWT things) when running on a headless X/UNIX system and JDK 1.4x is not available.

 

Here are some relevant links:

http://java.sun.com/products/java-media/2D/forDevelopers/java2dfaq.html#xvfb

http://ferret.wrc.noaa.gov/Ferret/FAQ/graphics/Solaris_Xvfb.html

http://developers.sun.com/solaris/articles/solaris_graphics.html#3

http://chartworks.com/support/server/XvfbonUnix.html

http://developer.java.sun.com/developer/bugParade/bugs/4281163.html

 

 

 

 

 

 

 

By: Alexander Wallace - aows

RE: How use jasper without X server ???

2003-10-31 15:37

use the java argument

 

-Djava.awt.headless=true

 

 

 

 

By: Glen Fafara - intrinsicsys

RE: How use jasper without X server ???

2003-11-11 06:21

Where do I specify -Djava.awt.headless=true?

I am working is a Tomcat/servlet environment and my servlet produces my JasperReport directly to a file.

 

Thanks

Glen

 

 

 

 

By: juan david vergara perez - jvergara

RE: How use jasper without X server ???

2003-05-15 13:16

try to use these options

 

-Djava.awt.headless=true and

-Dsun.java2d.fontpath=/usr/j2sdk1.4.1_02/jre/lib/fonts

 

 

 

 

By: Who Cares - mp0691

RE: How use jasper without X server ???

2003-11-01 17:01

solution for 1.3.1

/usr/local/jdk1.3.1_04/jre/bin/java -Xbootclasspath/a:/home/gci/jars/pja/pja.jar -Dawt.toolkit=com.eteks.awt.PJAToolkit -Djava.awt.graphicsenv=com.eteks.java2d.PJAGraphicsEnvironment -cp the_rest_of_your_jars

 

pja can be downloaded from <a href="http://www.eteks.com/pja/en/">http://www.eteks.com/pja/en/</a>

 

 

 

 

By: Carmen Padilla Tejeda - mcptnix

RE: How use jasper without X server ???

2003-11-05 12:52

I'm having this problem too. I'm running jrun on redhat 8 with a jvm of 1.4.0 of IBM and use the -D options outlined in this thread, does that suffice?

I get a error

JasperReports encountered this error :

java.lang.NoClassDefFoundError

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

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

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

at dori.jasper.engine.JasperRunManager.runReportToPdf(JasperRunManager.java:281)

 

......

I need to install some other package to "fake" an X system? I'm actually running X on the server(SUN), is there a way to point at it?

Thanks,

Carmen P

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