× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I am leaving the JVM version as shipped by not overriding properties in
a systemdefault.properties file, so an iteration of the java properties
class reveals a raft of entries like -

java.vm.version=1.4
java.runtime.version=1.4.2_16-b05
java.class.version=48.0
os.version=V5R4M0
java.specification.version=1.4
java.vm.specification.version=1.0
java.specification.vendor=Sun Microsystems Inc.
java.vm.info=build JDK-1.4, native threads, jitc_de
java.version=1.4.2

Since java.awt.headless=true presently breaks existing production code
then I have resorted to offloading the request to a server job via a
data queue.

Peter

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Friday, 5 June 2009 9:46 a.m.
To: RPG programming on the IBM i / System i
Subject: Re: java.awt.headless rears it's ugly head

hi Peter,

Thanks for doing the research. I had not realized that this only
happens when you use the native AWT libraries.

Good to know.

What version of the JVM are you testing this with?


Peter Connell wrote:
Scott,

I can only comment on the issue as it presented itself to me. I had
not
encountered it before.
The RPG/java app had been in test for a week when testers reported
failure of other existing code.
I narrowed it down as follows.

1. Remove /qibm/userdata/java400/systemDefault.properties.
2. call qp2shell '/QOpensys/bin/ls'
3. Run any RPG that will create a JVM by running a simple class.
4. call qp2shell '/QOpensys/bin/ls'

All is well.

Now create /qibm/userdata/java400/systemDefault.properties
Add an entry for java.awt.headless=true or os400.awt.native=true
OR
Load the property via ADDENVVAR ENVVAR(QIBM_RPG_JAVA_PROPERTIES)
VALUE('-Djava.awt.headless=true;')

Repeat steps 2+ above and the last call to qp2shell will throw CPFB9C7

Peter

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Friday, 5 June 2009 4:09 a.m.
To: RPG programming on the IBM i / System i
Subject: Re: java.awt.headless rears it's ugly head

Hi Peter,

Peter Connell wrote:
Everything works fine until a totally unrelated task runs the
QP2SHELL
program subsequently in the same job which immediately throws the
error
CPFB9C7 - i5/OS PASE already running in this job.

Shouldn't this happen with any Java code running via RPG? You make
it
sound like this only happens if you use the headless property, but I
don't think that's true.

The issue is that only one copy of PASE can be active at a time. Java

runs in PASE, and therefore any Java code at all (irrespective of the
headless property) should cause this to fail.

Or am I mistaken?



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.