weird Exception

this is the stack trace ,

Jan 19 22:22:24  0 (dir1.dir2.dir3.ProblemClass) Error while reading from the client java.lang.ExceptionInInitializerError
Jan 19 22:22:24  0 (dir1.dir2.dir3.ProblemClass) STACK TRACE
      at Code)

Jan 19 22:22:41  0 (dir1.dir2.dir3.ProblemClass) Error while reading from the client java.lang.NoClassDefFoundError: dir1/dir2/dir3/newdesign/SomeOtherClass
Jan 19 22:22:41  0 (dir1.dir2.dir3.ProblemClass) STACK TRACE
 java.lang.NoClassDefFoundError: dir1/dir2/dir3/newdesign/SomeOtherClass
      at Code)

i tried compiling with jdk 1.1.8 & jikes but still i keep getting this error.
morning it was okay

my developement pltaform is WinNT 4.0 ,Service pack 4
i reinstalled JDK 1.1.8 twice but the crux of the matter is that the normal GUI of the app works fine but it is the command line app on which i am working on which gives this problem ,this app also sends some commands across but gives this ... for others.

anybody can point me to the solution? this is the first time it came across.
sorry for the manual obfuscation.

a point , i caught this exception only when i wrote in code.
catch(Throwable t)
hoping for a solution tommorrow...
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

At forst glance it appears to be to do with Static initialisation.

Am I right in assuming that this is your problem class:


and this is a new class you are working on or have changed:


Perhaps it cannot find this SomeOtherClass when doing intialisation in a Static member, variable or code block so try checking your statics first.

Does the command line app communicate with the GUI? Can the GUI find the class but the command line app cannot?


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
do you use RMI / socket based communication / Localization ?

when do you see this Exception ? on client startup or ?

can you post the real stacktrace
} catch (Throwable e)

// inside the main or your Thread run() method

(I don't like the date&hour stuff)
mbormannAuthor Commented:
Jod ,
sorry I came late,the command line Appl is separate from GUI and just is a simulator of it,and the GUI has no relation with it.

I looked at the code with a jaundiced eye and it appears that I had inserted code like this in the Problem class

private static final String RECORD_DEMARCATOR = NAMES[ R_NUMBER ];
private static final int RECORD_DEMARCATOR_LEN = RECORD_DEMARCATOR.length();

this code had appeared b4 the initialisation of the static String NAMES[] in the static {}

Thanks very much !

Anyway my senior also had a problem where when u change those
public static final String XXX; we have to recompile ALL classes when we change their values.

Though I feel that it is a useless titbit for u as u r quite a wizard with the basics.

I can't debug like a GUI app ,I have to use the Logger .I also hate the date time stamps .

A request do any of you guys know of a debugger which can test remote socket based appls?

another titbit I learnt ,in ur main thread catch(Throwable t){} and NOT (Exception e)
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

mbormannAuthor Commented:
I really really love this site coz it makes us closer.
If I was alone I am sure I would be less some hairs ,not to mention countless cups of tea/coffee/sandwiches/late nights/music/some nice pics.

Man I wish I get a chance to work with you guys.I did mention to you that 'rainmal' is a colleague now ,but this is just ephemeral ,isn't it?
You feel a nice sort of camaradarie working with like minded people.
Anyway work is calling,and it is a demanding mistress.
>> public static final String XXX;

that's what final is for :) - final is constant :)

>> catch(Throwable t){} and NOT (Exception e)

you should always use catch (Throwable t) in server side application, because you never know when your code will throw some NullPointerException for example ... and you don't want your server to die (at least without logging the Throwable stacktrace first :)
mbormannAuthor Commented:
can u shed some light on a good debugger ?
though i feel it would have been useless in this case
I still use the old Log.log() stuff ... never used Java debugger for the last one / two years :(
VJ++ have some remote debugging support via DCOM :)
mbormannAuthor Commented:
no use to us,anyway u bother to look at PAQ's?
only for u :)
mbormannAuthor Commented:
wow ,i am flattered
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.