- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Am I the Frist Sysadmin?
Admin
Frist.jar and First.jar differ!
Admin
Rails is convention over configuration.
The JVM is configuration over configuration.
Admin
TRWTF is that he didn't check the extension folder the second he saw that the jar he copied over wasn't the jar that was used.
Admin
So the WTF was that Andrew a.k.a. Andrewo didn't know the basics of what he was working with?
Admin
I did muhuhuhuhahahahahah!!! ;-)
Admin
Nice story, but actually I see no WTF.
Admin
TRWTF is I spent the whole story waiting for a really bad "To Kill A mockingbird" pun...
Admin
Actually this one made me think of an Elegant Syntax Error.
Admin
The WTF is that there's a lib/ext directory. And that somebody placed a jar there.
If you do application programming and use standard deployment practices, you never see lib/ext, and don't get too aware of it as a potential source of classpath problems. So it's a nice catch actually.
The "who placed the jar there" bit was overly dramatic though - probably just somebody who didn't know proper deployment procedures. If WTFs were caused by demons or anything, they could be healed by an exorcism, problem solved... it's human error and stupidity we're combatting. (Friedrich Schiller: "Against stupidity the gods themselves struggle in vain.")
Admin
Am I the only one who thought "after a certain amount of time, reimage the SOB and press on regardless" would be the way to go? Every once in a while, I've managed to bung up a dev server to the point that it won't work anymore, and a reinstall of the OS was in order...
Admin
Admin
Admin
Admin
So you'd say the WTF is how Java works? Each platform has its own dependency hell. Java didn't find a perfect solution, but neither did anyone else, so how can you blame it?
Admin
File access monitors are very, very useful. I spent around a minute using one to figure out an issue a coworker had spent more than 3 days on.
(And on Windows, registry monitors too.)
Admin
Admin
Hmmm, now I wonder if one could patch the java compiler to replace "while" with something else...
Admin
Admin
Also a great Isaac Asimov Novel....
Admin
The people in the story didn't check lib/ext because JDBC libraries are not the kind of thing you'd put in there. It's like the classic tech support story where it's discovered -- after a series of fixes are tried -- that the computer is not working because power is out at the user location. The whole 20-minute support call could have been much shorter if the tech had asked, "Is your building power working?" but since it should be obvious that you need power for your workstation to function, you only get to that possibility after exhausting all of the more sensible ones.
CAPTCHA: validus "Putting JDBC libraries in lib/ext is not a validus thing to do."
Admin
Admin
(*) The principal oddity is the behaviour of #include "file.h". This loads from the current directory, but which current directory? The answer is, "the directory that contains the file doing the include," which makes it hard to override file.h with your own version.
Admin
I don't get it.
Admin
I'm just an hotliner, not a developper. but i'm asking myself : did this problem would have survived to the helpdesk approch : desinstall java (delete directory) and reinstall java.
Admin
TRWTF is Java
Admin
You do not understand Java debugging. It's 2013 and we don't debug our code by putting "print" statements in it. There is no need for "debugging" versions of jars. Jars can be compiled without debugging information, but this is rarely done anymore as it adds relatively little to the class size. Also, unless you have the source, you are stuck with the jar you have.
If you want, you can remove the libraries from the "ext" directories on your workstation. You should not do this on any other environment, nor should libraries be put there unless it is part of a well-understood configuration.
CAPTCHA: augue It's hard to augue with an idiot.
Admin
Well there's one person who's pretty infamous for putting jars where they don't belong. I.e. George Lucas (a.k.a. Georgo Lucaso)
Admin
CAPTCHA: suscipit I suscipit that your were put in cryostasis in 1991. Now, just recently thawed out, you are confused by our strange modern technologies.
Admin
How does the inclusion of debug information affect performance of a Jar though (if at all)?
The reason I ask is that it does have an impact on a .NET assembly, and most of us here do not release binaries to production unless they've been compiled to... well, Release mode.
Admin
Demons you say?
/sigh
Let me put on my robe and wizard's hat...
Admin
probably not I'm afraid the uninstaller may keep the directory alive so a reinstall will not need to be reconfigured
Admin
there is no difference between java compiled for debug or release (there is no optimizer in javac)
a jvm running in release mode (aka not in debug mode) will simply ignore the debug info
Admin
If the answer to all these questions is "yes", I'll definitely will have to keep that in mind! :-)
Admin
The real WTF here is that this is apparently an IT company, they have a PC sat somewhere which no one dare touch, and NO ONE thought to just reformat and reinstall everything (or even just throw it out, if it's THAT cursed) - instead they have an idle PC sitting there wasting space.
Really?
It would have been much quicker to reformat and reinstall than all the time that lots of people had spent trying to get it working.
Admin
The most visible is the "line number table" that maps positions in the byte code to lines in the source code. This is necessary for source-level debuggers to work. The other visible one is the "local variable name" table which records the source-code name for items on the local variables stack. This is also relied on by source-level debuggers. Neither of these tables adds a lot of bulk to the class file, so unless you are running in a low-memory environment, it's not a problem to include them. Some people strip them off as part of an attempt to obfuscate their code.
If you don't have the line number table in your class, you don't get line numbers in your stack traces which makes debugging more fun.
Admin
“No, it’s not.” Christine, pale, looked to him out of the corner of her eye. “Who put that jar file there in the first place?”
Obviously, it was put there by the president's sick daughter. "Sick" as in "sick and twisted".
Admin
Java programs don't really care about the names of the JAR files, but the names of the classes in the JAR files. It is theoretically possible that you could name one of your classes to be the same as one in a higher-precedence JAR file, but this would require some really bad naming of your classes.
Class files are assigned a "package" which is really just a namespace. Your classes are really referred to by their "fully qualified name." If you have an application class called
it is probably in a package like So, your actually FQN class name is There are likely many "Date" objects available, but they have FQNs like or or whatever.By convention, your package name starts with your domain name in reverse (except for core classes that start with "java" or "javax"). This means that class files from different organization already start out in distinct namespaces. Does that clear it up?
Admin
You don't even need to know where someone might have dropped the devil's jar. That's why we have search tools.
Admin
However, the key thing which protects developers' sanity is that the .jar file name is irrelevant: what matters are the fully qualified names of the classes, so provided that you follow naming conventions and no-one does something stupid like the configuration in the article, you don't need to worry about clashes.
Admin
Admin
Admin
I love it, the real WTF is us.
ok who cares how the java bootstrap and such works, who cares if sanely naming your files makes things so you don't have this problem. Who cares if Mr. expert above knows every step and sane way to handle things so it all just simply works.
I would challenge even Mr. expert here to solve this problem quickly without going down the same route as the people in the story. Why, because he knows how it is supposed to work and what you are not supposed to do. You don't check for stupid user tricks first, you run it, see a problem and start looking at things that might be the problem.
Yes it would all work, naming doesn't clash etc, until some STUPID user copies your companies file into the extensions folder and now any changes to that file no longer get used and things just seem to break.
You expect things to work, you expect the people you work with to know what they are doing, until something like this happens and you get stumped for a bit. The story here had at least one expert that understood and followed a logical path to resolution. The problem is not something you would think would happen because "NO SANE JAVA DEVELOPER WOULD DO THAT!" Hence why it is arcane, hidden, something only the wise men would think of, and even they won't think of it first. Anyone that says they would see the problem and immediatly say, "we got a bad extension file" is a liar and should never write another line of code again, hell, he should probably have his hands cut off just to make sure, and his eyes put out so he can't see to critisize any other code.
Tamam Shud!
Admin
I think people are missing the point that a application part was counted as an extension to the platform.
That's the problem.
It's fair that platform extensions take priority, but to have a application domain level be considered a platform extension, when it isn't really a part of the platform at all, is the issue.
Now, whether you want to bother to "fix" that, is another story. The "fix" for now seems to be for people to not put parts of their application in the ext and use common sense.
Admin
Todays' story is not a WTF, it's a RTFM!
Admin
Admin
From the HTML comments of the article: It was a sysadmin who left the company well before this happened. Why would a sysadmin do such changes without instructions from the developers?
Obviously some people really need rigid change and configuration management policies.
And be shot when violating those!
Admin
However, in the case given, the schmucks were apparently reduced to doing something dangerously close to debug-prints in order to have a clue what was going on.
And in the article, we saw a good demonstration of why they should not be there. There's a case to be made that perhaps the classes loaded from the platform extension directories should be forced to be members of a particular package hierarchy otherwise they won't be loaded. Notably: if it's NOT part of a platform extension package hierarchy, WTF is it doing there? Why would we *want* to load out-of-hierarchy packages from there?Knowing the way that these things work, I'd put small amounts of money on there not being a suitable set of package hierarchies available for such a whitelist.
Admin
With all those statements about worsening weather, I am thinking the next thing that happens is an extensive test of all the back-up power systems in the facility.
Admin
Notably, the chaos that can be caused by incorrect ordering of those resources is very comparable.
I think you can also make a case that you might want to be able to activate some sort of output from the JVM that shows the class-loading decisions it made when loading each class (aside from dumb built-in things like strings). That would have shown up the issue immediately, because their classes would have been shown loading from the wrong location.
For all I know, such a thing exists...