Slashdot Mirror


Oracle's Java Company Change Breaks Eclipse

crabel writes "In Java 1.6.0_21, the company field was changed from 'Sun Microsystems, Inc' to 'Oracle.' Apparently not the best idea, because some applications depend on that field to identify the virtual machine. All Eclipse versions since 3.3 (released 2007) until and including the recent Helios release (2010) have been reported to crash with an OutOfMemoryError due to this change. This is particularly funny since the update is deployed through automatic update and suddenly applications cease to work."

45 of 397 comments (clear)

  1. Ironically... by fuzzyfuzzyfungus · · Score: 4, Insightful

    Oracle's pet linux is branded "Unbreakable"...

    1. Re:Ironically... by mysidia · · Score: 4, Funny

      It's true, but the first two characters are just padding.

      it's const char *osname = "UnBreakable Linux" + 2;

    2. Re:Ironically... by Tablizer · · Score: 3, Insightful

      Oracle's pet linux is branded "Unbreakable"...

      Oracle always claims that. They once claimed that their database was unbreakable. It broke:

      http://www.schneier.com/crypto-gram-0202.html#6
         

    3. Re:Ironically... by Compaqt · · Score: 3, Funny

      Old & busted: DOS isn't done till Lotus won't run.

      New hotness: Java isn't done till Eclipse won't run.

      --
      I'm not a lawyer, but I play one on the Internet. Blog
  2. So? by Anonymous Coward · · Score: 5, Insightful

    How is this Oracle's problem?

  3. Sounds... wrong by squiggleslash · · Score: 4, Insightful

    Apparently not the best idea, because some applications depend on that field to identify the virtual machine

    Should they?

    --
    You are not alone. This is not normal. None of this is normal.
    1. Re:Sounds... wrong by LostCluster · · Score: 4, Informative

      If you're using Sun/Oracle-specific commands, you don't want to find your app running in an unofficial or unsupported Java such as Microsoft's that was eventually recalled.

    2. Re:Sounds... wrong by jisatsusha · · Score: 3, Insightful

      Isn't this exactly the sort of thing that reflection is designed for? As an analogy, it's like looking specifically for "Microsoft Internet Explorer" when writing web pages, instead of checking if document.addEventListener is available. It's flakey and easy to break when the platform gets updated.

    3. Re:Sounds... wrong by Vellmont · · Score: 3, Insightful


      Isn't this exactly the sort of thing that reflection is designed for?

      I'm not sure if there's anything in reflection that'll tell you specifics about the virtual machine options or not, but that's not really what reflection was designed for. Reflection is primarily used to find out information about, and allows manipulation of Classes.

      --
      AccountKiller
    4. Re:Sounds... wrong by oreaq · · Score: 3, Insightful

      The information is needed to start the VM. Reflection is designed to be used when the VM is already running.

  4. Well that's it... by mandelbr0t · · Score: 3, Funny

    I am beating myself over the head until I forget all programming languages. There is not a single programming culture left that I can identify with. :(

    --
    "Please describe the scientific nature of the 'whammy'" - Agent Scully
    1. Re:Well that's it... by copponex · · Score: 4, Funny

      I am beating myself over the head... There is not a single programming culture left that I can identify with. :(

      If you're into a self-harm, you should check out Java.

    2. Re:Well that's it... by Anonymous Coward · · Score: 5, Informative

      Didn't you hear, Java is the new COBOL

  5. Design Decisions by Subliminalbits · · Score: 4, Insightful

    Ladies and gentlemen, I call you attention to Exhibit A for the real world consequences of poor design decisions.

  6. Using a company field to extract key VM info? by kaladorn · · Score: 5, Informative

    Poor planning. Eclipse should not use a 'company' field to be pulling key VM info from. And there should be another more particular way to acquire VM information applications require. That was a poorly thought out situation from the get-go, but Oracle was mightily short sighted for making this change without much testing of compatible apps. Mind you, it isn't their fault as such, but pissing off all of those using Eclipse is mightily retarded. While we're on the subject of retarded, automatic updates? You deserve what you get if you trust those. You should be damn sure an update is solid, stable, and won't give you a BOHICA experience before you apply it. No sympathy for auto-update users.... that's just bad planning as well. So: Oracle: Minor thumbs down. Eclipse devs: Thumbs up overall (except for bloating), but thumbs down for this one. Auto-update Users: Not bothering with a thumb, too busy ROFLMAO.

    --
    -- Mal: "Well they tell you: never hit a man with a closed fist. But it is, on occasion, hilarious."
    1. Re:Using a company field to extract key VM info? by 0123456 · · Score: 5, Funny

      Mind you, it isn't their fault as such, but pissing off all of those using Eclipse is mightily retarded.

      I can't help but feel that most Eclipse users won't notice one more source of random crashes on startup.

  7. Reminds me of some windows progs back in the day by jaymz2k4 · · Score: 4, Insightful

    I can remember trying to install programs to D:\ rather than C:\ - That caused no end of problems due to developers hard coding in and just assuming that windows and themselves would be installed on the conventional C: That anyone would ever use any other drive letter didn't seem to occur to them. If I remember correctly this happened to me with a version of matlab (or something in that family).

    --
    jaymz
  8. Clearly... by by+(1706743) · · Score: 3, Funny
    Eclipse wasn't built leveraging the doWhatIWant() function (not to mention doItFaster(doWhatIWant())).

    Tangentially related, what does the following do:

    doItRecursively(doWhatIWant()) { return doItRecursively(doItFaster(doWhatIWant()); }

    I'm guessing it does it instantaneously...or never.

  9. Eclipse fucked up here. by Anonymous Coward · · Score: 4, Insightful

    I don't know why they're blaming Oracle. This is clearly a fuck-up made by the Eclipse developers.

    If any other piece of software checked the platform it was running on and didn't handle unexpected cases properly, it wouldn't be the platform developer's fault. The blame would rest solely with the application developer.

  10. IT'S ALREADY FIXED!! by Anonymous Coward · · Score: 4, Informative

    They already released a fix, with the original "Sun Microsystems" embedded in the exe on Monday. WTF, was this posted by kdawson? The FUD is strong in this one.

    1. Re:IT'S ALREADY FIXED!! by Sir_Lewk · · Score: 4, Interesting

      Their fix was lying and claiming that the company is still Sun Microsystems, and you think this isn't still news? As far as I can tell, that is an incredibly shitty work-around and the real problem still exists.

      Of course, the "real problem" isn't that Oracle changed the company field, it's that "Java programmers still continue to use poor programming practices despite layers and layers of 'best practice' crud". Seriously, isn't the great appeal of Java supposed to be that you can avoid shit like this?

      --
      "linux is just DOS with a UNIX like syntax" -- Galactic Dominator (944134)
  11. Developers Developers Developers by dugn · · Score: 4, Funny

    From the guy who proposed the fix in the triage meeting, "It's only a one-line change."

  12. Yes and no... by Zancarius · · Score: 5, Informative

    Yes and no. While it's not the best practice to rely on some field assuming it'll forever remain static, if you read the bug report in TFA (surprise, surprise), you'll find this:

    This causes a severe regression for programs that need to identify the Sun/Oracle HostSpot VM such that they know whether the "-XX:MaxPermSize" argument needs to be used or not.

    So, the reason they examine it in the first place is to know whether or not they need to set specific values that are supported by the Sun/Oracle JVM. It's not optimal, but I can't exactly fault them for that.

    --
    He who has no .plan has small finger. ~ Confucius on UNIX
    1. Re:Yes and no... by beanluc · · Score: 5, Insightful

      Is "company name" *really* part of any intended-to-be-reliable way to identify the VM?

      Is "company name" *really* necessary for identifying the VM?

      If either answer is "yes", then, I agree, and I add, shame on the VM designers. Shame.

      Otherwise, shame on any team who developed apps depending on that.

      One way or the other, this is *not* a benign, forgivable occurrence.

      --
      Say it right: "Nuc-le-ah Powah".
    2. Re:Yes and no... by XanC · · Score: 5, Informative

      Yes. It is. You shouldn't detect whether you can use a feature based on the User Agent, you should detect based on the presence or absence of that feature. Anything other than that is absolutely the web developers' fault.

    3. Re:Yes and no... by Chuck+Chunder · · Score: 4, Insightful

      Yes. It is. You shouldn't detect whether you can use a feature based on the User Agent, you should detect based on the presence or absence of that feature.

      How does that technique solve the problem where a feature exists but is implemented differently?

      --
      Boffoonery - downloadable Comedy Benefit for Bletchley Park
    4. Re:Yes and no... by nigelo · · Score: 5, Informative

      The FBR states that this is a file attribute only present under Windows, which seems like an odd choice by the Eclipse developers:

      "An engineering side note: The "Java" property values for java.vendor and java.vm.vendor were never changed in the jdk6 releases and will remain "Sun Microsystems, Inc.". It was understood that changing the vendor property values could impact applications and we purposely did not disturb these vendor properties. The Windows specific exe/dll file "COMPANY" value is what is at issue here, not the Java properties. It came as a surprise to us that anyone would be inspecting or depending on the value of this very platform specific field. Regardless, we will restore the COMPANY field in the jdk6 releases. Note that the jdk7 releases will eventually be changing to Oracle, including the java.vendor and java.vm.vendor properties.
      Posted Date : 2010-07-22 15:50:53.0"

      --
      *Still* negative function...
    5. Re:Yes and no... by Anonymous Coward · · Score: 4, Informative

      While there certainly are cases where you have to identify whether a user is on IE, particularly IE6, your example is less than spectacular since the very link you provided is an explanation of how to handle margins without having to detect the User Agent.

    6. Re:Yes and no... by JediTrainer · · Score: 5, Funny

      It'll be even more fun when they decide to rename the com.sun.* packages :)

      --

      You can accomplish anything you set your mind to. The impossible just takes a little longer.
  13. Why design the VM that way? by Chemisor · · Score: 3, Interesting

    I don't get it. Why would you design the VM to have a fixed size address space in the first place? Anybody here remember the reason? And how come there is no standard option to change that size so Eclipse has to resort to platform-specific hacks to do it? 128M ought to be enough for everybody, I guess...

    1. Re:Why design the VM that way? by loubs001 · · Score: 5, Informative

      One reason... security. Prevents a unstable application from growing out of control, causing the whole system to start paging which with a GC becomes a diaster, dragging the whole system to a hault makign it unresponsive. So you set a heap size to "more than you'll ever need" so that it aborts if something goes wrong. There are technical advantages too. But still... I agree. The fixed heap limits are more of a pain than a benifit, especially when the default setting for the client JVM was 64MB until recently because it handnt been changed since around 1997.

    2. Re:Why design the VM that way? by Anonymous Coward · · Score: 3, Insightful

      I don't think that's the reason. In fact, it's not a fixed size. You can specify min and max sizes for the VM. I believe the requirement is that the address space is contiguous.

  14. Write once huh? by sjames · · Score: 4, Funny

    Write once, run nowhere?

  15. I wouldn't figure that... by DragonWriter · · Score: 3, Insightful

    You'd figure that if there were one Java app that they'd test, it'd be Eclipse.

    I wouldn't even think that that would be the Java IDE they'd be most likely to test -- I would pick NetBeans for that.

    I mean, saying that if they were going to test one app on a new Java update it would be NetBeans is like saying if Microsoft was going to test one app on a Windows update it would be iTunes.

  16. Oracle Responded Well by loubs001 · · Score: 5, Informative

    To Oracle's credit, when Eclipse dev's reported the issue (http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6969236) Oracle immediately reverted the change within 2 days (http://hg.openjdk.java.net/hsx/hsx17/baseline/annotate/1771222afd14/make/hotspot_distro). They could have argued that it was Eclipse's fault for depending on the value in the first place and that rebranding their VM is something they should be allowed to do. But they put the best interest of other applications first. Still, it raises an issue that no one has really bothered with before. There are many Hostpot "vendor specific" options that are very commonly used. Almost every large application would configure heap sizes. There should be a standardized mechanism to define these options and thus avoid these very problems.

  17. Re:Fucking Retard by sjames · · Score: 3, Funny

    Look again, I most certainly am NOT fucking you!

    Lemme guess, you're sweating bullets wondering if you're going to spend all night pissing on fires while the C guys laugh at you and drink beer?

  18. Not Oracle's fault by gig · · Score: 4, Insightful

    Actually, it was a great idea to change the company field since it maintained accuracy.

    The problem is the apps that were poorly coded and assumed that Java would be owned by Sun for the next thousand years. They deserved to break.

  19. How about uname? by KonoWatakushi · · Score: 4, Insightful

    Shh! Don't tell Oracle that the uname command returns SunOS, or all hell will break loose.

    The obsession with removing the Sun name from everything is petty in the extreme, to say nothing of tacking Oracle on where inappropriate, ie. Oracle Solaris. It as if Larry were a kid who felt the need to stamp his name on all of his possessions.

  20. Re:Pay for support, or else... by LostCluster · · Score: 3, Insightful

    At work... I once ran into code that said

    If NT or 2000, look for the DOS prompt program here...
    If 95 or 98, look for the DOS prompt program here...
    If XP, look for the DOS prompt program here...

    Only problem is that Vista was out at the time, and it's OS string failed on all three ifs, so that led to a fail. Worse yet, this was outside of the domain that I'd be allowed to fix, and the search for who was the maintainer-of-record for this program kept coming up empty. I had to call marketing and tell them to hold off on declaring the whole system Vista-ready because we had a small programming bug and a big organizational malfunction.

  21. Re:This is why I use Open Source by persicom · · Score: 3, Insightful

    Unless closed-source schmucks start mucking with it. Helloooooo. QA? Testing? ANYONE?

  22. Re:Pay for support, or else... by mark-t · · Score: 3, Informative

    Let's see... you can download the JDK for free... which by definition is a 'development kit'. You can obtain a java editor at no cost. You can obtain a java IDE and debugger at no cost. Where do you get the impression that the development tools for Java require licensing, exactly?

  23. Everyone's fault... by SanityInAnarchy · · Score: 4, Insightful

    It's true, you shouldn't detect browsers based on user-agent.

    But then, the other ways aren't terribly reliable. I remember, once upon a time, trying to find "The Right Way" to deliver XHTML with an XML mime type for browsers capable of it, and as HTML for everyone else.

    There isn't a right way.

    The closest I got was the Accept header. The problem here is that every single browser out there sends a */*, because every browser can accept downloads. At the time, I remember one browser (can't remember which, maybe Safari) sent a */* and nothing else -- while others sent a string explicitly mentioning a few and assigning priorities to them.

    The problem was, there wasn't any way for me to specify my preference on the server side, and there certainly wasn't a good way for a browser to say what it natively supports, what it can open in external programs, and what it can only download and bother the user about. All I could do is follow the browser's own preferences, and feed it whatever it ranked highest -- and even then, I'd have to prefer text/html (even though I really prefer application/xhtml+xml) for those browsers which don't specify preferring html to */*, but really don't support xhtml...

    At the end of the day, my options were pretty much to either stop caring about the standards, or interpret them in a very non-standard way, or use User-Agent detection, or just give up and serve it as text/html.

    And that's just getting the thing to render. It only gets messier from there...

    So yes, it's my fault, as a web developer, that I might fall back on user-agent detection -- and, in particular, I'm likely to detect IE so I can work around some of its many deficiencies. It's also the fault of the standards for not defining clearer ways to negotiate capabilities. It's also the fault of browsers for not following what standards do exist.

    I certainly try to avoid browser detection and focus on feature detection, as you suggest. But your blanket statement, like many blanket statements, is just wrong.

    --
    Don't thank God, thank a doctor!
  24. A somewhat complex and interesting problem by suresk · · Score: 5, Informative

    Someone in our company ran into this several weeks ago, and I had kind of a fun time tracking down the problem. The summary and most of the comments are missing a lot of details and nuance, which actually make this problem kind of interesting.

    1) It wasn't even running out of memory

    Sun/Oracle's VM implementation (HotSpot) has a concept of a permanent generation, which is separate from the rest of the heap and has its own maximum size. This generation holds stuff like the code cache and interned strings. Whether or not this is a good concept is debatable, and as far as I know, they are planning to do away with it in the future as JRockit and HotSpot merge. At any rate, this is the space that was filling up. This probably didn't happen very quickly on a normal Eclipse distribution, but with a lot of plugins installed (and thus a lot of classes being loaded) it crashed pretty quickly.

    2) This is only because of somewhat subtle differences between the various VMs

    HotSpot is the only major JVM I know of that has a PermGen space - J9 (IBM) and JRockit (Oracle, via BEA) don't have this concept. Thus the requirement to be able to behave differently based on which VM you are using. Being able to behave properly on multiple VMs is especially important for Eclipse because not only do they have a lot of people using it on HotSpot, but because it is the basis for IBM's RAD, they have a ton of people using it on J9 as well.

    3) This problem is in the launcher, not Eclipse itself

    So, the crux of the problem is that Eclipse needs to start a VM, and has to know the proper flags to pass to it *before* it starts up. A few people have suggested trying reflection or other runtime methods as a better way to solve this, but this ignores a) Once the VM has started up, you can't change the heap or PermGen sizes, and b) As far as I know, there is no way to query the VM at runtime to figure out what its underlying heap structure looks like - that is an implementation detail.

    So, while it does kind of suck that Eclipse was relying on a vendor name, it is trickier to solve than it appears at first glance. The only really graceful ways I can think of to solve this problem rely on some changes to the VM spec.

  25. from tfa by smash · · Score: 3, Informative

    ... i know its cool to post first before reading and all but...

    An engineering side note: The "Java" property values for java.vendor and java.vm.vendor were never changed in the jdk6 releases and will remain "Sun Microsystems, Inc.". It was understood that changing the vendor property values could impact applications and we purposely did not disturb these vendor properties. The Windows specific exe/dll file "COMPANY" value is what is at issue here, not the Java properties. It came as a surprise to us that anyone would be inspecting or depending on the value of this very platform specific field. Regardless, we will restore the COMPANY field in the jdk6 releases. Note that the jdk7 releases will eventually be changing to Oracle, including the java.vendor and java.vm.vendor properties.

    So, it looks like

    • it is windows only
    • programmers should not be relying on that field
    • the change is being backed out until Java 7
    --
    I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
  26. Stallman did this too by IGnatius+T+Foobar · · Score: 3, Interesting

    Quite a lot of software development tools and build scripts also broke when Richard Stallman changed the gcc target "i386-pc-linux" to "i386-pc-linux-gnu". GCC development had long since been taken over by other people but RMS just had to commit his little political agenda to the build, and broke a lot of builds in the process. Same thing here.

    --
    Tired of FB/Google censorship? Visit UNCENSORED!