Il giorno mer 14 gen 2026 alle ore 17:33 David Gibbs via JAVA400-L <
java400-l@xxxxxxxxxxxxxxxxxx> ha scritto:
On Tue, Jan 13, 2026 at 5:38 PM Marco Facchinetti <
marco.facchinetti@xxxxxxxxx> wrote:
1 - Setting up user.dir skips the function in error (because there is no
need to read parms to complete JVM setup).
Not sure how you're identifying that ... Java apparently needs a user.dir
value that isn't being set properly by default on our production system.
This is where the error happens (Sources are in
/QOpenSys/QIBM/ProdData/JavaVM/jdk11/64bit/lib/src.zip):
/**
* If systemProperties is unset, then create a new one based on the values
* provided by the virtual machine.
*/
@SuppressWarnings("nls")
private static void ensureProperties(boolean isInitialization) {
Properties jclProps = new Properties(); <<< Line 417 (at
java/lang/System.ensureProperties (java.base@11/System.java:417))
initProperties(jclProps);
Properties initializedProperties = new Properties();
if (osEncoding != null) {
initializedProperties.put("os.encoding", osEncoding); //$NON-NLS-1$
}
initializedProperties.put("ibm.system.encoding", platformEncoding);
//$NON-NLS-1$
initializedProperties.put("java.specification.name", "Java Platform API
Specification"); //$NON-NLS-1$ //$NON-NLS-2$
initializedProperties.put("com.ibm.oti.configuration", "scar");
//$NON-NLS-1$
/* Enables openj9 JFR tests. */
initializedProperties.put("org.eclipse.openj9.jfr.isJFREnabled", "true");
//$NON-NLS-1$ //$NON-NLS-2$
/* TODO disable JFR JCL APIs until JFR natives are implemented. */
initializedProperties.put("jfr.unsupported.vm", "true"); //$NON-NLS-1$
//$NON-NLS-2$
String[] list = getPropertyList();
for (int i = 0; i < list.length; i += 2) {
String key = list[i];
if (key == null) {
break;
}
initializedProperties.put(key, list[i+1]);
}
for (Map.Entry<?, ?> entry : jclProps.entrySet()) {
initializedProperties.putIfAbsent(entry.getKey(), entry.getValue());
}
/* java.lang.VersionProps.init() eventually calls into System.setProperty()
where propertiesInitialized needs to be true */
propertiesInitialized = true;
/* VersionProps.init requires systemProperties to be set */
systemProperties = initializedProperties;
java.lang.VersionProps.init();
String javaRuntimeVersion =
initializedProperties.getProperty("java.runtime.version"); //$NON-NLS-1$
if (null != javaRuntimeVersion) {
String fullVersion = initializedProperties.getProperty("java.fullversion");
//$NON-NLS-1$
if (null != fullVersion) {
initializedProperties.put("java.fullversion", (javaRuntimeVersion + "\n" +
fullVersion)); //$NON-NLS-1$ //$NON-NLS-2$
}
rasInitializeVersion(javaRuntimeVersion);
}
lineSeparator = initializedProperties.getProperty("line.separator", "\n");
//$NON-NLS-1$
if (isInitialization) {
VM.saveAndRemoveProperties(initializedProperties);
}
/* create systemProperties from properties Map */
systemProperties = initializedProperties;
/* Preload system property jdk.serialFilter to prevent later modification */
jdk.internal.util.StaticProperty.jdkSerialFilter();
}
That's why I suspect is somehow connected to a CCSID problem:
Some parameters and return values require conversion between the job CCSID
and the CCSID that
Java uses for byte arrays. The file.encoding Java property is used by RPG
to obtain the CCSID
that Java uses. Ensure that the file.encoding property is set correctly for
your job CCSID. You can
allow Java to set the property implicitly using attributes of your job, or
you can set the property
explicitly using one of the mechanisms above. For example, you could add
'-Dfile.encoding=ISO8859_1'
or '-Dfile.encoding=Cp948' to your QIBM_RPG_JAVA_PROPERTIES environment
variable.
I still don't know why this is happening.
2 - Your job it's a pre-start job implementing IWS requests (RPG side)
and
IWS handles ASCII
Well that's the whole point of IWS ... it handles invoking RPG from a web
request and translates between ASCII / Unicode and EBCDIC.
Correct, better say Unicode and EBCDIC
As I mentioned before, both our systems (prod & dev) run exclusively on
CCSID 37.
The system value QCCSID is 37, as is the job CCSID.
Ok but what I mean is that adding user.dir it's a workaround, not an answer
to you question.
david
Best regards
--
This is the Java Programming on and around the IBM i (JAVA400-L) mailing
list
To post a message email: JAVA400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/java400-l.
As an Amazon Associate we earn from qualifying purchases.