N
Navneet Mathpal
HTTP Status 500 - Handler processing failed; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/lang/ArrayUtils
Navneet said:HTTP Status 500 - Handler processing failed; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/lang/ArrayUtils
NoClassDefFoundError
HTTP Status 500 - Handler processing failed; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/lang/ArrayUtils
Very funny, <huge grin>
Agreed, classpath confusions notwithstanding, (which IME can cause a lot
of problems to noobs) Apache commons stuff is not so bad, you can get to
the commons site and track down the relevant jar easily enough but
trying to figure out which jar contains
com.foobar.hidden.widget.PoopScoop and where to get it is a different
matter altogether.
Roedy Green said:I would hope Oracle could find some way to subclass
NoClassDefFoundError the way IOException is, to give you a better hint
on just what you screwed up, or perhaps to include more hints in the
message.
Tracking down NoClassDefFoundError is one of the most onerous errors.
I looked at Maven once. As soon as it started 'updating' itself I shut
it down, un-installed it and never went near that abomination again
I just don't trust anything that connects to a remote server without my
explicit say so.
I don't think it's so easy to subclass it.
After all, when the compiler or jre doesn't find a class, it probably
has no way to know WHERE the class really is (if anywhere) or WHY it
isn't anywhere that it looks for classes. It only knows where it DIDN'T
find the missing classes.
Probably about the only thing it could do is tell all the places where
it looked for, and didn't find, the missing class definition.
Perhaps it would be within reason to:
1. scan all jars on the current computer
2. consult a database somewhere of what popular jars contain.
Absolutely not. There is no telling what file systems might be mounted and
what kind of volume such a scan could trigger, and there are a thousand
ways that could go wrong, from different versions of the same file to
malicious jars that only need to be dropped on someones HDD to be executed
like that.
I'm trying to get the Java DBus bindings to compile but I can't find the
required jars to compile the libraries and presumably the jars but there
are no jars etc etc etc
git clone git://anongit.freedesktop.org/git/dbus/dbus-java
$ make
warning: [path] bad path element "/usr/share/java/unix.jar": no such
file or directory
I just tried Jarfinder.com and it doesn't appear to do anything apart
from redirect to a 'not found' page.
Yes, although it's difficult to know a classname without the jar ...
isn't it? I tried searching for some classes mentioned in the error
output but to no avail.
I'm starting to think Roedy is correct, there needs to be a standard way
to find this stuff.
I did search something calling itself a Maven repository to no avail,
actually it turns out that the relevant jars need compiling on the
system on which they are going to be used as there seems to be all sorts
of platform specific C code and jni stuff that needs compiling with the
gcc toolchain ... apparently.
Maven wouldn't have helped in this case would it? I couldn't know the
names of the binding jars as I couldn't compile them because the jars
required to compile the bindings were missing until I compiled them, it
was the jars required to compile the bindings that I was missing, not
the binding jars themselves.
What would Maven have made of this I wonder ... how much would I have
learned by 'leaving it all to Maven'. At least I now know what the
problem was and how to fix it.
If you don't understand this then I suggest that sooner or later you are
going to come up against a problem that the tools can't fix and then
you'll be stuck, won't you?
I'd rather use the bare minimum of tools to get the job done.
How much time have I saved, or rather not wasted by not spending it
learning the latest greatest tool only for it to be superseded a few
weeks/months/years later by the next latest greatest tool. I can write
compile and run Java with a simple text editor, a terminal window and a
shell script if I have to. I certainly don't need Maven to hold my hand.
Obligatory link to the Story of Mel:
Joerg Meier said:After all, you would only want to use the bare minimum of tools, and not
have fancy things like garbage collection and abstraction, right ? How much
time you would save, by not learning the latest greatest language, only for
it to be superseded a few years later ?
Understanding how things work at their core is a useful skill that should
certainly be part of any decent education, whether in class or as an
autodidact. On the other hand, suggesting to stick to the lower and most
primitive solution while actually working is ridiculous and held only by
the most ancient and inflexible dinosaurs.
Joerg Meier said:Every few years, someone links this, and every time, I read it again to my
great delight. As my life progresses, it's interesting for me to note how
my view of Mel changed over the years - from uncompromising and unreflected
hero worship when I was still young and a cowboy, to "I hope I never have
to fix code like that" when I started working on multi-person projects for
the first time, to "I hope I never have a coworker like that", ending with
"I hope I never have an employee like that".
Mel is, at once, the best and the worst aspects of a clever programmer.
Liebe Gruesse,
Joerg
No I didn't.
Why do you and those like you assume that everyone else is too stupid to
solve their own problems. Really, it's particularly unattractive
attribute of otherwise helpful and intelligent people.
I'm trying to get the Java DBus bindings to compile but I can't find
the required jars
I never asked for help, I was simply making a contribution to a
discussion about finding jar files. You seem to have taken it upon
yourself to 'educate' me. Don't you realize that this is insulting and
condescending? Maybe it's a cultural thing, I don't know but it's really
starting to annoy me and I wish you would stop it.
Every few years, someone links this, and every time, I read it again to my
great delight. As my life progresses, it's interesting for me to note how
my view of Mel changed over the years - from uncompromising and unreflected
hero worship when I was still young and a cowboy, to "I hope I never have
to fix code like that" when I started working on multi-person projects for
the first time, to "I hope I never have a coworker like that", ending with
"I hope I never have an employee like that".
Mel is, at once, the best and the worst aspects of a clever programmer.
Nor I, but also I think the process has already started, in a small way, and
has largely been missed. No, I'm not talking about multi-core processing (or
variants on that theme). The pendulum has swung back, and efficiency /should/
now be of first-tier interest -- not so much for saving time, but for saving
/energy/. Only desktop machines can ignore their energy use; servers and
"devices" are (in their very different ways) much more sensitive to power
consumption.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.