Running JVM in headless mode on AS400

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
spyderman03
Posts: 3
Joined: Fri Jan 25, 2008 7:10 pm

Running JVM in headless mode on AS400

Post by spyderman03 » Fri Jan 25, 2008 7:31 pm

I am trying to run a JFreeChart application on an AS400 system with WebSphere 6, JDK 1.4. I have tried several methods of setting the system to run in headless mode. In the past (on other unix systems) I had no problems simply putting the following line into my code:

Code: Select all

System.setProperty( "java.awt.headless", "true" );
When I try to run the application with this, I just get an error message saying that I am trying to access AWT without setting java.awt.headless=true or os400.awt.native=true. I then tried setting the os400.awt.native property to true, but still no change.

I then took advice from another thread to add the arguement -Djava.awt.headless=true to my JVM properties in Websphere. When trying to restart the application server, I get an error saying:

Code: Select all

Warning: Java property configuration java.awt.headless=true overrides conflicting Java property configuration os400.awt.native=false.
Unable to create Java Virtual Machine.
Has anyone encountered this problem before? Any thoughts or advice would be greatly appreciated.

Spyder

mhilpert
Posts: 497
Joined: Wed Apr 02, 2003 1:57 pm
Location: Germany

Re: Running JVM in headless mode on AS400

Post by mhilpert » Mon Jan 28, 2008 5:28 pm

spyderman03 wrote: I then took advice from another thread to add the arguement -Djava.awt.headless=true to my JVM properties in Websphere. When trying to restart the application server, I get an error saying:

Code: Select all

Warning: Java property configuration java.awt.headless=true overrides conflicting Java property configuration os400.awt.native=false.
Unable to create Java Virtual Machine.
Has anyone encountered this problem before? Any thoughts or advice would be greatly appreciated.

Spyder
What happens if you leave out the property os400.awt.native=false ?
Java 11, JFreeChart 1.0.15, JFreeSVG 4.0

spyderman03
Posts: 3
Joined: Fri Jan 25, 2008 7:10 pm

Re: Running JVM in headless mode on AS400

Post by spyderman03 » Mon Jan 28, 2008 6:51 pm

I am not actually setting the os400.awt.native property. By setting java.awt.headless=true, the os400.awt.native property should be automatically set to true. I did try manually setting the os400.awt.native property to true once, but that didn't help either.

bryanross
Posts: 1
Joined: Tue Feb 05, 2008 9:04 pm

Post by bryanross » Tue Feb 05, 2008 9:08 pm

I've developed some JSR-168 portlets using jfree charting and when the property java.awt.headless = true, I get the following error: java.lang.VerifyError: org/jfree/chart/renderer/AbstractRenderer 0000 0000

I am running WAS 6.0.2.23 with WebSphere Portal 6.0.1.1 on OS/400 v5r4.

Any ideas are appreciated.

jvia
Posts: 1
Joined: Wed Mar 19, 2008 6:00 pm
Location: Faverges, Haute-Savoie, FRANCE

Post by jvia » Wed Mar 19, 2008 6:04 pm

I'm using Webshere 5.1 on OS400 V5R2 and I've encountered the same error message : net.sf.jasperreports.engine.JRRuntimeException: java.lang.VerifyError: org/jfree/chart/renderer/AbstractRenderer 0000 0000.

I've changed JFreeChart jar file from 1.0.9 to 1.0.8a and...it works ! :D

Locked