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



The CLASSPATH on RUNJVA includes the current directory, which is not in the
QSH classpath:

CLASSPATH('.:/

Does removing the .: in the CLASSPATH make any difference?

Craig Pelkie

-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Kelly Beard
Sent: Wednesday, January 30, 2013 2:12 PM
To: java400-l@xxxxxxxxxxxx
Subject: RUNJVA gives me class not found problem, while QSH command is fine.

Getting a class not found error for a class that is clearly contained in a
.jar file (log4j-1.2.16.jar)

Offending CL command:

RUNJVA
CLASS(Balancer.jar)
PARM('--startcode' '99406' '--midnight' '--loglevel' 'debug'
'--limitsfile' 'DFCAVAILPT' '--logname'
'/home/dfcuser/Balancer_99406_QA_T.log')

CLASSPATH('.:/home/quikq/1.0/dev/log4j-1.2.16.jar:/QIBM/ProdData/OS400/jt400
/lib/jt400Native.jar:/QIBM/ProdData/Java400/ext/db2_classes.jar:/home/quikq/
1.0/dev/jargs.jar:/home/dfcuser/Balancer.jar')

PROP((liblist.usr 'DF99406,DE99406,DFROOT,DOROOT')) OPTION(*VERBOSE)
JOB(*GEN)

Gives me
Exception in thread "main" java.lang.NoClassDefFoundError:
org.apache.log4j.Appender
at java.lang.J9VMInternals.verifyImpl(Native
Method)
at
java.lang.J9VMInternals.verify(J9VMInternals.java:69)
at
java.lang.J9VMInternals.initialize(J9VMInternals.java:131)
Caused by: java.lang.ClassNotFoundException:
org.apache.log4j.Appender
at
java.net.URLClassLoader.findClass(URLClassLoader.java:498)
at
java.lang.ClassLoader.loadClass(ClassLoader.java:650)
at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at
java.lang.ClassLoader.loadClass(ClassLoader.java:616)
... 3
more

This works just fine. Same thing in my book.

java -Dliblist.usr=DF99406,DE99406,DFROOT,DOROOT -cp
/home/quikq/1.0/dev/log4j-1.2.16.jar:/QIBM/ProdData/OS400/jt400/lib/jt400Nat
ive.jar:/QIBM/ProdData/Java400/ext/db2_classes.jar:/home/quikq/1.0/dev/jargs
.jar:/home/dfcuser/Balancer.jar
Balancer --startcode 99406 --midnight --loglevel debug --limitsfile
DFCAVAILPT --logname /home/dfcuser/Balancer_99406_QA_T.log

Just trying to understand WTH I'm doing wrong with the RUNJVA. Thanks!

--
Kelly Beard
--
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.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.