I am trying to call a Java Pgm. from RPG in Submit using QCMDEXC. In
QPRINT Spoolfile I always get the following error:
java.lang.NoClassDefFoundError
java/lang/Throwable.<init>()V+4 Throwable.java:78)
java/lang/Error.<init>()V+1 (Error.java:37)
java/lang/NoClassDefFoundError.<init>()V+1
NoClassDefFoundError.java:33)
java/lang/ClassLoader.defineClass(Ljava/lang/String;[BIILjava/security/ProtectionDomain;)Ljava/lang/Class;+79
(ClassLoader.j
java/security/SecureClassLoader.defineClass(Ljava/lang/String;[BIILjava/security/CodeSource;)Ljava/lang/Class;+27
(SecureCla
java/net/URLClassLoader.defineClass(Ljava/lang/String;Lsun/misc/Resource;)Ljava/lang/Class;+196
(URLClassLoader.java:287)
java/net/URLClassLoader.access$300(Ljava/net/URLClassLoader;Ljava/lang/String;Lsun/misc/Resource;)Ljava/lang/Class;+1
(URLCl
java/net/URLClassLoader$ClassFinder.run()Ljava/lang/Object;+42
(URLClassLoader.java:594)
java/net/URLClassLoader.findClass(Ljava/lang/String;)Ljava/lang/Class;+16
(URLClassLoader.java:200)
java/lang/ClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class;+41
(ClassLoader.java:303)
sun/misc/Launcher$AppClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class;+33
(Launcher.java:286)
java/lang/ClassLoader.loadClass(Ljava/lang/String;)Ljava/lang/Class;+1
(ClassLoader.java:259)
java/lang/ClassLoader.loadClassInternal(Ljava/lang/String;)Ljava/lang/Class;+1
(ClassLoader.java:319)
The Submit Job works from the programmer's menue, but not from RPG via
QCMDEXC. I also tried to set the CLASSPATH System variable, using QSH
and the JAVA command. Also tried to call the Java programm directly
without a Submit Job from RPG. Always the same error!
The call from RPG programm works under V4R2 but not on V5R2!
Any hints what the problem could be?
cu
Martin
Is it a compiled java program?? Is it in the IFS?? What does the
joblog look like from the one that does run. Sounds like you might be
missing a library in your library list.
looks like classpath problems. Did you try
qsh cmd('java MyClass -classpath MyClassPath') ?
Dieter
--
Dan Hicks
Hard work never killed anybody, but why take a chance?
cu
Martin
cu
Martin
cu
Martin
Martin St?berl wrote:
Best way in my opinion is to specify the classpath explicit in the java
command:
for example:
java myClass -classpath /home/dieter/java:/home/dieter/java/jt400.jar
with /home/dieter/java is the location of my classes
and the Toolbox Driver is in /home/dieter/java in jt400.jar (if I need it)
test this command from QSHELL if it works then:
qsh cmd('java myClass -classpath
/home/dieter/java:/home/dieter/java/jt400.jar')
executed via SBMJOB or QCMDEXC or whatever you want.
Dieter
>
> cu
>
> Martin
have your tried to set the HOME variable with WRKENVVAR for *JOB and
*SYS ? Also you can create a profile file in /etc with CLASSPATH
informations. Maybe this helps.
Best regards,
Matthias
On 14 Oct 2003 04:40:32 -0700, martins...@gmx.de (Martin St?berl)
wrote:
cu
Martin
cu
Martin
cu
Martin