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



I am not getting a clear sense of what the first NoClassDefFoundError is caused by. It is either a classpath issue or a class naming (misspelling or a case sensitivity issue).

Just remember that the classpath is not like a path environment variable in that just path references are in the list. My experience has been that classes and jars need to be specifically identified in the path. Just listing the folder is not enough when the class you are running is within a jar.

If you have something like C:\myjars in a classpath and want to load a class from the my.jar file from it, you can't just have C:\myjars on the classpath. You need C:\myjars\my.jar on the classpath. Perhaps something in your program is referencing a class file that is contained within a jar. In that case, you'll need to add the complete path to the jar, with the .jar extension, to the classpath.

Pete


Smith, Mike wrote:
Hey Pete, No I don't have any responses other than yours.  Let me try to
provide a better picture of what I have. -Root File System
-QIBM
   -ProdData
       -Java400
            -lockBox
               ConnectDB2.class
               ConnectDB2.java
               UpLoadLockBox.class
               UpLoadLockBox.java

Hello.class exists within the Java400 folder. Jt400.jar exists within the Java400 folder. When I run this from a command line I get java.lang.NoClassDefFoundError

        at java.lang.Error.<init>(Error.java:37)

        at
java.lang.NoClassDefFoundError.<init>(NoClassDefFoundError.java:30
)

at java.lang.ClassLoader.defineClass(ClassLoader.java:567) When I run this from Iseries Java Transform and run I get Java.lang.ClassNotFoundException com/ibm/as400/access/AS400JDBDriver

PS. I tried adding the ':.' to the end of my classpath with the same
results. I know I'm missing something simple here, I just don't know what.
Thanks          
Michael Smith
iSeries.mySeries.


-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx
[mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of Pete Helgren
Sent: Saturday, February 10, 2007 1:48 PM
To: Java Programming on and around the iSeries / AS400
Subject: Re: RUNJVA problems


Mike,

I didn't see you get a response for this.  Did you?

If the NoClassDefFound error on the "lockbox" program or is it on something else? Or is "lockbox" just a folder?

You could add the current directory to the classpath by adding a ":." to

the end of the CLASSPATH parameter. What folder was your "Hello" class in when you successfully ran it?

Pete Helgren


Smith, Mike wrote:
I have created a java program that I am trying to run from a CL using the RUNJVA command. So far unsuccessfully. I think I have a problem with my classpath, but I just can't figure out why.

I have successfully run this.
RUNJVA CLASS(Hello) CLASSPATH('/QIBM/ProdData/Java400')
PROP((java.version '1.4')) OPTION(*NONE)

I ran this just to make sure I had the basics correct.

So I exported from WDSC to    /QIBM/ProdData/Java400/lockBox my java
programs.  UploadLockBox and ConnectDB2.
I also copied jt400.jar to /QIBM/ProdData/Java400
So I have tried to run this command.
RUNJVA CLASS(UploadLockBox)

CLASSPATH('/QIBM/ProdData/Java400/lockBox:/QIBM/ProdData/Java400/jt400.j
ar') PROP((java.version '1.4')) OPTION(*NONE)
But I get java.lang.NoClassDefFoundError


I did not export as .jar file(as I probably should).  I just seem to
for
whatever reason have better luck when I export as 'file system'

I've also tried to run via Iseries Transform and Run, with the same
results.
Any ideas?  I'd be glad to send offline screenshots of my directory
structure - if it would be helpful.
Michael Smith
iSeries.mySeries.


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.