RE: Problems with graphics on Tomcat 5.5.9 OK!!! BUT.....

2005-10-11 Thread Mauricio Fernandez A.
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]



Re: Problems with graphics on Tomcat 5.5.9 OK!!! BUT.....

2005-10-11 Thread David Delbecq
David Delbecq a écrit :

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

Sorry, it's CATALINA_OPTS  (with the *S*)

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



Re: Problems with graphics on Tomcat 5.5.9 OK!!! BUT.....

2005-10-11 Thread David Delbecq
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]



Re: Problems with graphics on Tomcat 5.5.9

2005-10-11 Thread Amadeo Alonso

Cabe suponer que has mirado la linea 211 de tu'Graficador2.java'?, ...
parece corresponder a lo primero escrito por ti y, frecuentemente, esto da 
una pista.
Parece involucrar un problema de Acceso de Java -muy pijotero siempre-, ¿es 
todo accesible?.



Graficar = = >  java.lang.NoClassDefFoundError:
..
java.security.AccessController.doPrivileged(Native Method)
.
com.Prueba.comandos.Graficador2.crearBarChart3DVertical(Graficador2.java:211).luckamadeo- Original Message -From: "Mauricio Fernandez A." <[EMAIL PROTECTED]>To: "Tomcat Users List" 
Sent: Monday, October 10, 2005 3:06 PMSubject: 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 herehttp://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 F
ernandez 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 webapp> 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 herehttp://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 befo
re 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]
karta.apache.org>>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Problems with graphics on Tomcat 5.5.9

2005-10-10 Thread Mauricio Fernandez A.
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

2005-10-10 Thread Viorel Dragomir
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]

RE: Problems with graphics on Tomcat 5.5.9

2005-10-10 Thread Mauricio Fernandez A.

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]



[OT] RE: Problems with graphics on Tomcat 5.5.9

2005-10-07 Thread David N. Smith
Completely OT, but:

If you're going to search for X11 packages with rpm, use rpm -qa | grep [package
name or part].

I believe rpm -q [package name] is very limited and only tries to find a package
named exactly as you enter it.

--David

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



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Problems with graphics on Tomcat 5.5.9

2005-10-07 Thread Mauricio Fernandez A.
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]



Re: Problems with graphics on Tomcat 5.5.9

2005-10-07 Thread Brian Cook


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");

Mauricio Fernandez A. wrote:


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]


 




--
Brian Cook
Digital Services Analyst
Print Time Inc.
[EMAIL PROTECTED]
913.345.8900 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: Problems with graphics on Tomcat 5.5.9 [255835:132365]

2005-10-07 Thread RTE - Meridian Club
Many thanks for your email. This is an automated response acknowledging receipt.

Please be advised that Badge mailing commences beginning of October 2005.

Should your message require a response we will respond shortly.

Regards
Meridian Club


> -Original Message-
> From: "Mauricio Fernandez A." <[EMAIL PROTECTED]>
> Received: 10/7/2005 7:14 PM
> To: "" 
> Subject: 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]
> 
> 
> 

--
Meridian Club
Unit 5, Caxton Centre
Porters Wood
St Albans
Herts
UNITED KINGDOM
AL3 6XT

Tel: +44 1727 738855
Fax: +44 1700 578955
email: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]