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.