RE: Problems with graphics on Tomcat 5.5.9 OK!!! BUT.....
I know the best way to set up this is by using -Djava.awt.headless=true but I had been tryin almost everything. The problem is my server is a remote rack server so it doesn´t have any display hw and as the -Djava... option seems desn´t work for me i am trying to use the Xvfb. By the way, could it be ok reboot the server in level 5?, does it have sense? Mauricio Fernández A. Ingeniero de Sistemas U. Autónoma de Manizales -Mensaje original- De: David Delbecq [mailto:[EMAIL PROTECTED] Enviado el: martes, 11 octubre, 2005 16:50 Para: Tomcat Users List Asunto: Re: Problems with graphics on Tomcat 5.5.9 OK!!! BUT. Hello, if, like i suppose from your various errors, jfreechart require awt/swing api and do draw on it, you need to run the tomcat server inside a X server, not only do you need to have fonts installed and corresponding X libraries (like your link suggest was problem), you also need to to have X server running and DISPLAY envirronement variable set accordingly. I would first suggest you start tomcat with CATALINA_OPT="-Djava.awt.headless=true" If, like i suppose will be the case, you get HeadlessExceptions when running like this, this mean you definitly need to run tomcat server inside a X environment. regards David Delbecq Mauricio Fernandez A. a écrit : >Thanks for your help > >Now I have reinstalled the XFree86 completly including the Xvfb and I can >start it (XVfb), to test if it is running I execute a xclock and I don´t get >any error, so I think it is running ok > >However, now, when I try to get the jsp wich must show a graphic I get >another different error: > > >java.lang.NoClassDefFoundError > org.jfree.chart.ChartFactory.createBarChart3D(ChartFactory.java:764) > com.Prueba.comandos.Graficador2.crearBarChart3DVertical(Graficador2.java:19 >6) > org.apache.jsp.jsp.grafica_jsp._jspService(org.apache.jsp.jsp.grafica_jsp:1 >67) > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > > > >And in another web app in the same server the error is: > > >java.lang.NoClassDefFoundError > java.lang.Class.forName0(Native Method) > java.lang.Class.forName(Class.java:164) > java.awt.Toolkit$2.run(Toolkit.java:821) > java.security.AccessController.doPrivileged(Native Method) > java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804) > com.actelion.control.Graficador.asignarBackground(Graficador.java:97) > > com.actelion.control.Graficador.crearBarChartVertical(Graficador.java:524) > org.apache.jsp.jsp.graficaVisitasMedicasEspecialidadCategoria_jsp._jspServi >ce(org.apache.jsp.jsp.graficaVisitasMedicasEspecialidadCategoria_jsp:198) > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > > > >So having in mind that before Xvfb Installation the error was: > >http://www.jfree.org/phpBB2/viewtopic.php?t=14319 > >I think I am just with another different problem. > >Can somebody understand this? > >Thanks > >Mauricio Fernandez > > > > > >>> >>> >>> > >Hi Mauricio, > >I had the same problem. The solution is as follows: > >1. Download and install a virtual frame buffer > Where to find and how to install: > http://testdrive.mapinfo.com/TECHSUPP/MIPROD.NSF/0/a832a07452b9a0e385256f >8000760f68?OpenDocument > >2. Do not forget to create a script to start xvfb - you will find the script >under the link above > >3. Edit the startup.sh or catalina.sh as follows: > >#export DISPLAY >export DISPLAY=:0.0 >export CATALINA_OPTS="-Djava.awt.headless=false" > >4. Start xvfb > >5. Restart Tomcat > > > >Mit freundlichem Gruß / kind regards > >Aliye Edao > > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problems with graphics on Tomcat 5.5.9 OK!!! BUT.....
Thanks for your help Now I have reinstalled the XFree86 completly including the Xvfb and I can start it (XVfb), to test if it is running I execute a xclock and I don´t get any error, so I think it is running ok However, now, when I try to get the jsp wich must show a graphic I get another different error: java.lang.NoClassDefFoundError org.jfree.chart.ChartFactory.createBarChart3D(ChartFactory.java:764) com.Prueba.comandos.Graficador2.crearBarChart3DVertical(Graficador2.java:19 6) org.apache.jsp.jsp.grafica_jsp._jspService(org.apache.jsp.jsp.grafica_jsp:1 67) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) And in another web app in the same server the error is: java.lang.NoClassDefFoundError java.lang.Class.forName0(Native Method) java.lang.Class.forName(Class.java:164) java.awt.Toolkit$2.run(Toolkit.java:821) java.security.AccessController.doPrivileged(Native Method) java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804) com.actelion.control.Graficador.asignarBackground(Graficador.java:97) com.actelion.control.Graficador.crearBarChartVertical(Graficador.java:524) org.apache.jsp.jsp.graficaVisitasMedicasEspecialidadCategoria_jsp._jspServi ce(org.apache.jsp.jsp.graficaVisitasMedicasEspecialidadCategoria_jsp:198) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) So having in mind that before Xvfb Installation the error was: http://www.jfree.org/phpBB2/viewtopic.php?t=14319 I think I am just with another different problem. Can somebody understand this? Thanks Mauricio Fernandez >> >> >> Hi Mauricio, I had the same problem. The solution is as follows: 1. Download and install a virtual frame buffer Where to find and how to install: http://testdrive.mapinfo.com/TECHSUPP/MIPROD.NSF/0/a832a07452b9a0e385256f 8000760f68?OpenDocument 2. Do not forget to create a script to start xvfb - you will find the script under the link above 3. Edit the startup.sh or catalina.sh as follows: #export DISPLAY export DISPLAY=:0.0 export CATALINA_OPTS="-Djava.awt.headless=false" 4. Start xvfb 5. Restart Tomcat Mit freundlichem Gruß / kind regards Aliye Edao - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Newbee question on servlet and html - Really frustated with this problem.
Did you define your servlet in your WEB-INF/web.xml? Mauricio Fernandez -Mensaje original- De: Developer Developer [mailto:[EMAIL PROTECTED] Enviado el: martes, 11 octubre, 2005 5:23 Para: tomcat-user@jakarta.apache.org Asunto: Newbee question on servlet and html - Really frustated with this problem. does anybody know how to fix this problem. Invocation of servlet prompts a messagebox posing a questions " do you want to save this ?" instead of executing it and returing the output in the html document. :( On 10/10/05, Developer Developer <[EMAIL PROTECTED]> wrote: > > I wrote my first html and servlet and deployed it on tomcat 5.5. The html > works okay when I call it from the browser. The servlet too works okay > when > I call its doget() method by invoking it from the browser. EG:. > http://localhost:8080/VBeer/BeerSelect > However, when i try to invoke the servlet from an html form I get a > message > box - (file download security warning) - Do you want to save this file ? > It has a > funny number suffixed to the my servlet name. > > > Not sure what is happening. > Here is my HTML code snippet. > > > > Beer selecton Page > > > > Select Beer Characteristics > > Thanks ! > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: silent install of Tomcat
Maybe you can try with the .zip distribution if your so is Windows or .tar.gz if Linux or whatever you want/need from http://jakarta.apache.org/site/downloads/downloads_tomcat-5.cgi If you don´t know which one download read the README http://apache.org.es/jakarta/tomcat-5/v5.5.12/README.html Mauricio Fernandez -Mensaje original- De: krux mania [mailto:[EMAIL PROTECTED] Enviado el: lunes, 10 octubre, 2005 19:37 Para: tomcat-user@jakarta.apache.org Asunto: silent install of Tomcat Hi, I need to install tomcat 5.0.28 silently for my application. Can this be done. If this issue has been previously discussed please send me a pointer to the message. thanks, vivek - Yahoo! Music Unlimited - Access over 1 million songs. Try it free. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problems with graphics on Tomcat 5.5.9
You can see that here, after click on "Graficar": The web test app can be found here http://www.actesoft.com:8080/Prueba/jsp/ and the wanted result after click on "Graficar" is something like this http://www.actesoft.com/ejGrafico/ (static page) Mauricio Fernandez -Mensaje original- De: Viorel Dragomir [mailto:[EMAIL PROTECTED] Enviado el: lunes, 10 octubre, 2005 15:53 Para: Tomcat Users List Asunto: Re: Problems with graphics on Tomcat 5.5.9 What exception ? [ If it's not confidential. :) ] Viorel Dragomir . .. --- - Original Message - From: Mauricio Fernandez A. To: Tomcat Users List Sent: Monday, October 10, 2005 14:42 Subject: RE: Problems with graphics on Tomcat 5.5.9 Trying again to make the graphics appear in my web app, I did a test web app and I had been trying to start the Tomcat with -Djava.awt.headless=true option as I read in some forums #export CATALINA_OPTS="-Djava.awt.headless=true" #/usr/java/jakarta-tomcat/bin/startup.sh But they do not appear either The web test app can be found here http://www.actesoft.com:8080/Prueba/jsp/ and the wanted result after click on "Graficar" is something like this http://www.actesoft.com/ejGrafico/ (static page) Also I have try to insert in the Graficador.class constructor the next System.set/getProperties lines public Graficador(String Path){ super(); this.contexto = Path; this.background = null; //System.setProperty returns the current value before assignment String vrPropiedad = System.setProperty("java.awt.headless", "true"); // Log the before assignment value to a log file to debug logger.debug("BEFORE = java.awt.headless = " + vrPropiedad); //and log the after assignmet value to a log file too vrPropiedad = System.getProperty("java.awt.headless"); logger.debug("NOW = java.awt.headless = " + vrPropiedad); } And these are the log file lines the app write 2005-10-10 11:18:15,996 [-t] INFO [index.jsp] - Loading form 2005-10-10 11:18:15,999 [-t] INFO [index.jsp] - Form OK ! 2005-10-10 11:18:24,710 [-t] DEBUG [grafica.jsp] - loading page: grafica.jsp 2005-10-10 11:18:24,716 [-t] DEBUG [grafica.jsp] - Creating object: Graficador 2005-10-10 11:18:24,746 [-t] DEBUG [Graficador] - BEFORE = java.awt.headless = true <-- It is True! 2005-10-10 11:18:24,746 [-t] DEBUG [Graficador] - NOW = java.awt.headless = true <-- It is True! 2005-10-10 11:18:24,747 [-t] DEBUG [grafica.jsp] - Creating Category 1 ... OK 2005-10-10 11:18:24,747 [-t] DEBUG [grafica.jsp] - Creating Category 2 ... OK 2005-10-10 11:18:24,748 [-t] DEBUG [grafica.jsp] - Creating Category 3 ... OK 2005-10-10 11:18:24,748 [-t] DEBUG [grafica.jsp] - Giving the control to a Graficador Object, it must make the chart 2005-10-10 11:18:24,769 [-t] DEBUG [Graficador] - Starting chart creation ... 2005-10-10 11:18:24,788 [-t] DEBUG [Graficador] - Data process OK 2005-10-10 11:18:25,548 [-t] DEBUG [Graficador] - Creating Chart OK 2005-10-10 11:18:25,549 [-t] DEBUG [Graficador] - Making a PNG image from Chart And here the app trhows an exception Any idea is always welcome, thanks. Mauricio Fernandez - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problems with graphics on Tomcat 5.5.9
Trying again to make the graphics appear in my web app, I did a test web app and I had been trying to start the Tomcat with -Djava.awt.headless=true option as I read in some forums #export CATALINA_OPTS="-Djava.awt.headless=true" #/usr/java/jakarta-tomcat/bin/startup.sh But they do not appear either The web test app can be found here http://www.actesoft.com:8080/Prueba/jsp/ and the wanted result after click on "Graficar" is something like this http://www.actesoft.com/ejGrafico/ (static page) Also I have try to insert in the Graficador.class constructor the next System.set/getProperties lines public Graficador(String Path){ super(); this.contexto = Path; this.background = null; //System.setProperty returns the current value before assignment String vrPropiedad = System.setProperty("java.awt.headless", "true"); // Log the before assignment value to a log file to debug logger.debug("BEFORE = java.awt.headless = " + vrPropiedad); //and log the after assignmet value to a log file too vrPropiedad = System.getProperty("java.awt.headless"); logger.debug("NOW = java.awt.headless = " + vrPropiedad); } And these are the log file lines the app write 2005-10-10 11:18:15,996 [-t] INFO [index.jsp] - Loading form 2005-10-10 11:18:15,999 [-t] INFO [index.jsp] - Form OK ! 2005-10-10 11:18:24,710 [-t] DEBUG [grafica.jsp] - loading page: grafica.jsp 2005-10-10 11:18:24,716 [-t] DEBUG [grafica.jsp] - Creating object: Graficador 2005-10-10 11:18:24,746 [-t] DEBUG [Graficador] - BEFORE = java.awt.headless = true <-- It is True! 2005-10-10 11:18:24,746 [-t] DEBUG [Graficador] - NOW = java.awt.headless = true <-- It is True! 2005-10-10 11:18:24,747 [-t] DEBUG [grafica.jsp] - Creating Category 1 ... OK 2005-10-10 11:18:24,747 [-t] DEBUG [grafica.jsp] - Creating Category 2 ... OK 2005-10-10 11:18:24,748 [-t] DEBUG [grafica.jsp] - Creating Category 3 ... OK 2005-10-10 11:18:24,748 [-t] DEBUG [grafica.jsp] - Giving the control to a Graficador Object, it must make the chart 2005-10-10 11:18:24,769 [-t] DEBUG [Graficador] - Starting chart creation ... 2005-10-10 11:18:24,788 [-t] DEBUG [Graficador] - Data process OK 2005-10-10 11:18:25,548 [-t] DEBUG [Graficador] - Creating Chart OK 2005-10-10 11:18:25,549 [-t] DEBUG [Graficador] - Making a PNG image from Chart And here the app trhows an exception Any idea is always welcome, thanks. Mauricio Fernandez - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problems with graphics on Tomcat 5.5.9
Do you refer to X11R6? I have a /usr/X11R6 dir in my server but when I do #rpm -q X11 package X11 is not installed #rpm -q X11R6 package X11R6 is not installed And when i do #whereis X11 X11: /usr/bin/X11 /etc/X11 /usr/lib/X11 /usr/include/X11 So I don´t understand what is about the X11 libs. any idea? thanks! MauricioF -Mensaje original- De: Brian Cook [mailto:[EMAIL PROTECTED] Enviado el: viernes, 07 octubre, 2005 22:20 Para: Tomcat Users List Asunto: Re: Problems with graphics on Tomcat 5.5.9 You need to install the X11 libs for X. The Java Advanced Imaging API calls the X libs on Linux to get font and scaling data. You can try setting the JVM java.awt.headless" property to true. This will work for some instances. But installing the X libs installed on your server is a more reliable option. To set your java.awt.headless as true use the following line. System.setProperty("java.awt.headless", "true"); System.setProperty("java.awt.headless", "true"); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problems with graphics on Tomcat 5.5.9
Hello I have a web App with some jsp´s showing graphics generated by jfreechart, in my windows dev station it works fine but in my linux production server it was working fine to some days ago and now it doesn´t. I have Tomcat 5.5.9, JDK 1.5.0_04, Red Hat Linux on a rack Now i obtain a ServletException generated by this reason (sorry to send the trace but I want to be specific): java.lang.NoClassDefFoundError sun.java2d.SunGraphicsEnvironment.addDirFonts(SunGraphicsEnvironment.java:7 22) sun.java2d.SunGraphicsEnvironment.registerFontsInDir(SunGraphicsEnvironment .java:602) sun.java2d.SunGraphicsEnvironment.access$200(SunGraphicsEnvironment.java:58 ) sun.java2d.SunGraphicsEnvironment$1.run(SunGraphicsEnvironment.java:174) java.security.AccessController.doPrivileged(Native Method) sun.java2d.SunGraphicsEnvironment.(SunGraphicsEnvironment.java:94) sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:164) sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce ssorImpl.java:39) sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru ctorAccessorImpl.java:27) java.lang.reflect.Constructor.newInstance(Constructor.java:494) java.lang.Class.newInstance0(Class.java:350) java.lang.Class.newInstance(Class.java:303) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironmen t.java:68) java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1141) org.jfree.chart.JFreeChart.createBufferedImage(JFreeChart.java:1243) org.jfree.chart.JFreeChart.createBufferedImage(JFreeChart.java:1223) org.jfree.chart.ChartUtilities.writeChartAsPNG(ChartUtilities.java:173) org.jfree.chart.ChartUtilities.saveChartAsPNG(ChartUtilities.java:328) org.jfree.chart.ChartUtilities.saveChartAsPNG(ChartUtilities.java:299) com.Prueba.comandos.Graficador2.crearBarChart3DVertical(Graficador2.java:21 1) org.apache.jsp.jsp.grafica_jsp._jspService(org.apache.jsp.jsp.grafica_jsp:1 67) Thanks MauricioF - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]