Dan, thank again for your advice.
I have been out of the office so I just read your response.

After Googling how to override the Standard output I still
cannot
get the standard output to go to a physical file using the
OVRDBF file,
I did OVRDBF STDERR, is there something else I need to do
besides the OVRDBF?
Does my RUNJVA spawn off a different job losing the
Override?
What is the proper way to direct the STDERR and STDOUT
within a CL program before running RUNJVA

Is there a way to find exactly what sequence the classes are
loaded in by class loader?
Is there a way to force my classes to be loaded and used
rather than any others the class loader may find?

I am sure someone that know java on the IBM i could figure
this out real quick.
I am spending so much time on this I am getting to the point
I will pay someone to log onto my system and fix this if I
could find someone

Thanks again for your help

John


-----Original Message-----
From: Dan Kimmel [mailto:dkimmel@xxxxxxxxxxxxxxx]
Sent: Monday, August 05, 2013 1:07 PM
To: Java Programming on and around the IBM i
Subject: RE: Installing new java version

Unless you do something to redirect standard out, it'll wind
up in a QPRINT file.

org.apache.commons.cli is the command line interface. Just
glancing through the source, the 1.2 version of Option class
uses Java 5 constructs in the static initialization. If
somehow a 1.2 version of commons-cli jar file is hit first
by your classloader, initialization is going to fail. Then
when some other piece of code attempts to parse a command
line, the NoClassDefFoundError will be thrown. Look all over
your machine for a commons-cli-1.2.jar file.

Be aware of java extensions. Besides your classpath and the
jre, classes may also be loaded from jars in the extension
path. Besides the {jre}/ext path, jars may also be loaded
from the /QIBM/UserData/Java400/ext path.

-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-
bounces@xxxxxxxxxxxx] On Behalf Of John Allen
Sent: Monday, August 05, 2013 11:09 AM
To: 'Java Programming on and around the IBM i'
Subject: RE: Installing new java version

Ok, Thanks so much for that bit of information. For some
crazy reason
I thought the message text displayed was pointing to the
cause of the
error.

Now to go find the "standard out log"




-----Original Message-----
From: Dan Kimmel [mailto:dkimmel@xxxxxxxxxxxxxxx]
Sent: Monday, August 05, 2013 10:31 AM
To: Java Programming on and around the IBM i
Subject: RE: Installing new java version

java.lang.NoClassDefFoundError does not necessarily mean
that the jar
was not found by the classloader. It may also mean that
the class
failed during initialization. That's the more likely issue
as you
haven't changed classpath or methods of loading and you
are still
running in JVM 1.4.2.
Find your standard out log and look for errors during
class
initialization much earlier than your
NoClassDefFoundError.


-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-
bounces@xxxxxxxxxxxx] On Behalf Of John Allen
Sent: Friday, August 02, 2013 2:51 PM
To: 'Java Programming on and around the IBM i'
Subject: RE: Installing new java version

Dan,

Thanks for your reply. Just wanted to add this bit of
info:
We have other java programs that are still running fine.

Displaying /qibm/userdata/java400
Opt Object link Type Attribute Text
ext DIR

AdoptAuthority DIR

Nothing else, no files at all, I can't seem to find
SystemDefault.properties file anywhere , is it OK to not
have one?
Can I create a file SystemDefault.properties and add
java.home=/QIBM/ProdData/Java400/jdk14/
java.version=1.4
to it?

I checked /home and it is empty

So I displayed /qibm/Prodata/java400 and I see:
Object link Type
ext DIR
fonts DIR
jdk13 DIR
jdk14 DIR
jdk15 DIR
jt400ntv.jar STMF
Hello.class STMF
Hello.java STMF
MRI2924 DIR
NAWTtest.class STMF
NAWTtest.java STMF
PropDump.class STMF
PropDump.java STMF
QDefineClassCache.jar STMF
SystemDefaultCacheExample.properties STMF

Does this look OK? Still no SystemDefault.properties
file
anywhere

I put the program in debug and just before it executes
the
RUNJVA
command I ran RUNJAVA *VERSION And get Version JVM
V5R3M0
JDK 1.4.2.

The error is caused by the following program execution
using
RUNJVA:
RUNJVA CLASS('xxapdfen') PARM(&infileflg
&FullPathIn)
CLASSPATH(&CLASSPATH) CHKPATH(*IGNORE)

Where &classpath=


/dapp/java/xxapdfenc.jar:/dapp/java:/dapp/java/xxapdfeni.jar
:

The jar files are where they have always been.

Any other ideas for me?

I am going to uninstall the PTF that was used to install
java 1.5 this
weekend and see if that returns us back to working.




-----Original Message-----
From: Dan Kimmel [mailto:dkimmel@xxxxxxxxxxxxxxx]
Sent: Thursday, August 01, 2013 4:49 PM
To: Java Programming on and around the IBM i
Subject: RE: Installing new java version

Start by checking how that java program is invoked. At
V5R3, the
java.version system property has the most impact on
which
JVM is
chosen. That property can be set in the QSH java command
line (in QSH
java -Djava.version=1.4, eg).

In qsh, I can do this:
$
java -version -Djava.version=1.3.1
java version "1.3.1"
$
java -version -Djava.version=1.4.2
java version "1.4.2"
$
java -version -Djava.version=1.4
java version "1.4.2"
$
java -version -Djava.version=1.1
Java Development Kit could not be found.
$
java -version -Djava.version=1.2
java version "1.2.2"
$

I haven't been able to find a way to set version from
the
RUNJVA
command, however. I believe the command invocation pulls
its value
from SystemDefault.properties file.

Browse : /qibm/UserData/Java400/SystemDefault.properties
Record : 1 of 2 by 18
Control :


....+....1....+....2....+....3....+....4....+....5....+..
************Beginning of data**************
java.home=/QIBM/ProdData/Java400/jdk14/
java.version=1.4
************End of Data********************

As above, there's one in the /qibm/UserData/Java400.
There
can also be
one in the home directory of the user which takes
precedence over the
one in /QIBM.

There was significant displacement of classes in Java 5.
Many classes were added to the core distribution that
had
been
commonly included only by classpath. This was
particularly
true of
servlet classes. The net effect was that applications
that
had been
running in 1.4.2 would throw exactly the error you're
seeing as the
classes in the classpath were duplicated in the runtime.

To see what you're command is doing, try to get as close
as possible
to the environment where RUNJVA is invoked in your
application and run

RUNJVA *version

If it comes up 1.5, you'll have to find where the
property
is set and
change it, else figure out what classes are being
duplicated in the
classpath and remove the jar from the classpath.

-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx
[mailto:java400-l-
bounces@xxxxxxxxxxxx] On Behalf Of John Allen
Sent: Thursday, August 01, 2013 2:43 PM
To: JAVA400-L@xxxxxxxxxxxx
Subject: Installing new java version

I want to start out by saving my java skills are
pretty
basic.

I have a java program that has been running fine for
years
using java
1.4 on V5R3.

Last week we installed java 1.5 (via PTF). I do not
want
to start
using it yet, but I wanted to get it installed for
potential future
use.



When I check the java version on our system (QSH java
-version) I get 1.4.2





5722JV1 V5R3M0 Developer Kit for Java

5722JV1 V5R3M0 Java Developer Kit 1.3

5722JV1 V5R3M0 Java Developer Kit 1.4

5722JV1 V5R3M7 Java Developer Kit 1.5



No other changes I know of have been made. The java
program has not
changed in years and has not been recompiled.



But.. When I run the java program I get an error:

java.lang.NoClassDefFoundError:
org/apache/commons/cli/Option

at
java.lang.Throwable.<init>(Throwable.java:195)


at
java.lang.LinkageError.<init>(LinkageError.java:36)


at



java.lang.NoClassDefFoundError.<init>(NoClassDefFoundError.j
ava:40)

at xxapdfec.main(xxapdfec.java:40)


Java program completed with exit code 1



I used debug to check the class paths.

I checked to make sure the .class and jar files were
in
the directory
they are supposed to be in.



Can installing a new version of java cause a change in
a
existing
programs execution.

Does anyone have any starting point for me to look at?

How do I read this error logging? What do the numbers
(195
36 40) represent? Program line numbers?



Thanks in advance



John



--
This is the Java Programming on and around the IBM i
(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 IBM i
(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.



-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.2904 / Virus Database: 3209/6538 -
Release
Date: 07/31/13

-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.2904 / Virus Database: 3209/6542 -
Release
Date: 08/01/13

--
This is the Java Programming on and around the IBM i
(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 IBM i
(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.



-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.2904 / Virus Database: 3209/6538 - Release
Date: 07/31/13

-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.2904 / Virus Database: 3209/6552 - Release
Date: 08/05/13

--
This is the Java Programming on and around the IBM i
(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 IBM i
(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.



-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.2904 / Virus Database: 3209/6538 - Release
Date: 07/31/13

-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.2904 / Virus Database: 3209/6552 - Release
Date: 08/05/13


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-2022 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.