|
-----Original Message-----java.lang.IllegalArgumentException.<init>(IllegalArgumentException.java:36)
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-
bounces@xxxxxxxxxxxx] On Behalf Of Clapham, Paul
Sent: Thursday, December 03, 2009 1:07 PM
To: Java Programming on and around the iSeries / AS400
Subject: RE: QSYSObjectPathName -- Length is not valid???
I removed "-Djava.compiler=jitc" from my startup command. Problem still
occurs. I put in the Trace commands, but where should I look for the trace
output? It isn't in my stderr or stdout.
PC2
-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-
bounces@xxxxxxxxxxxx] On Behalf Of Gary L Peskin
Sent: December 3, 2009 10:23
To: 'Java Programming on and around the iSeries / AS400'
Subject: RE: QSYSObjectPathName -- Length is not valid???
Can you try it again with the Trace turned on?
Gary
-----Original Message-----long.
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-
bounces@xxxxxxxxxxxx] On Behalf Of Clapham, Paul
Sent: Thursday, December 03, 2009 10:12 AM
To: Java Programming on and around the iSeries / AS400
Subject: RE: QSYSObjectPathName -- Length is not valid???
Here's the line of code which threw that exception:
QSYSObjectPathName fileName = new QSYSObjectPathName("MDBLLIB007",
"BLPEDI94", "MAVERIK", "MBR");
PC2
-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-
bounces@xxxxxxxxxxxx] On Behalf Of Gary L Peskin
Sent: December 3, 2009 10:04
To: 'Java Programming on and around the iSeries / AS400'
Subject: RE: QSYSObjectPathName -- Length is not valid???
Hi, Paul --
From the error message and stack trace, it looks like you're calling(String, String, String) constructor with a second argument of
the
"/QSYS.LIB/MDBLLIB007.LIB/BLPEDI94.FILE/MAVERIK.MBR" rather than just
MDBLLIB007. This is why it's complaining that the object name is too
Check earlier in the stack trace to see where you're calling the(ie
constructor from and if the second argument could somehow get messed
up
assigned to the entire path name instead of just the object name) in amethod
multithreaded environment. In particular, check to see if the second
argument is supplied by a class or instance field rather than from a
variable.three arguments.
You might want to turn on tracing as well via a call to
Trace.setTraceDiagnosticOn(true);
Trace.setTraceOn(true);
It would also be good to put some kind of logging of
System.err.println call in your code just before you call the
QSYSObjectPathName constructor and print out the value of each of the
trace:
HTH,
Gary
-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-
bounces@xxxxxxxxxxxx] On Behalf Of Clapham, Paul
Sent: Thursday, December 03, 2009 8:03 AM
To: Java Programming on and around the iSeries / AS400
Subject: RE: QSYSObjectPathName -- Length is not valid???
Actually it's the same JT400 which sometimes works and sometimes
doesn't work, all on my test machine. Here's the top of the stack
valid.
com.ibm.as400.access.ExtendedIllegalArgumentException: objectName
(/QSYS.LIB/MDBLLIB007.LIB/BLPEDI94.FILE/MAVERIK.MBR): Length is not
at java.lang.Throwable.<init>(Throwable.java:195)
at java.lang.Exception.<init>(Exception.java:41)
at java.lang.RuntimeException.<init>(RuntimeException.java:43)
at
com.ibm.as400.access.ExtendedIllegalArgumentException.<init>(ExtendedIllegaat
com.ibm.as400.access.QSYSObjectPathName.checkObjectName(QSYSObjectPathName.lArgumentException.java:65)
at
com.ibm.as400.access.QSYSObjectPathName.<init>(QSYSObjectPathName.java:200)java:462)
at
exception:theiSeries
This is a very simple class, all it does is to take the parts of the
path name and format them into a QSYS.LIB path name. No connection
to AS400 objects, just string manipulations.
Unfortunately this is the jt400Native.jar which is installed on the
as part of the Java installation. And it's in the extensions
directory, so just putting the JTOpen version on the classpath
wouldn't do anything. I'm reluctant to change that configuration
because chances are it's something stupid that I'm doing, but I sure
can't see what. So I'm going to take Thorbjørn's advice and
decompile
jar to see what it's doing.
PC2
-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-
bounces@xxxxxxxxxxxx] On Behalf Of Dan Kimmel
Sent: December 3, 2009 07:45
To: Java Programming on and around the iSeries / AS400
Subject: RE: QSYSObjectPathName -- Length is not valid???
Thor raised a good point. Do you have the old jt400 on the
production machine and the new one on the test machine?
One trick I learned from Tim Rowe: IBM puts all the latest code into
jtopen.jar on sourceforge. So if you want the latest fixes, download
the jar from there. The PTF's to fix the current official release of
jt400.jar can lag weeks or months behind.
-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-
bounces@xxxxxxxxxxxx] On Behalf Of Thorbjoern Ravn Andersen
Sent: Thursday, December 03, 2009 12:35 AM
To: Java Programming on and around the iSeries / AS400
Subject: Re: QSYSObjectPathName -- Length is not valid???
Clapham, Paul skrev:
QSYSObjectPathName fileName = new QSYSObjectPathName("%LIBL%",
"BLPEDI94", "MAVERIK", "MBR");
and when I run it in my complex environment it throws this
valid.
com.ibm.as400.access.ExtendedIllegalArgumentException: objectName
(/QSYS.LIB/%LIBL%.LIB/BLPEDI94.FILE/MAVERIK.MBR): Length is not
environment.
If I copy and paste the line of code into a simple program which
just does that and then prints the result, I get the result printed.
But in my multi-threaded message-processing system, I get the
exception. Not only that, the line of code is working correctly in
the production environment and it's just failing in the test
I would transfer that jt400Native.jar to my personal computer, and
In all cases it's the QSYSObjectPathName class which is being
loaded from here:
/QIBM/ProdData/OS400/jt400/lib/jt400Native.jar
use a decompiler for analyzing the stack trace with the
ExtendedIllegalArgumentException (my guess is that %LIBL%.LIB should
be just %LIBL%).
I have good experiences with the Jadclipse plugin to Eclipse for
this (for which you need the jad binary) when you remember to set up
Jadclipse to generate source corresponding to the original line
numbers in the Preferences.
We are currently shipping jt400.jar with a Java program being
deployed on
V6R1 as the native library had some issue with AS400 connections not
remembering CHGLIBL commands which had been issued earlier. We
worked around it by including the jt400 5.0 jar instead.
--
Thorbjørn Ravn Andersen "...plus... Tubular Bells!"
--
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list To post a message email: JAVA400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/java400-l.
--
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.
As an Amazon Associate we earn from qualifying purchases.
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.