addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwchatcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgoogleimageimagesinstagramlinklocation-pinmagnifying-glassmailminusmoremuplabelShape 3 + Rectangle 1outlookpersonplusprice-ribbonImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruseryahoo

Re: [ljc] Cross-JDK compatibility issue

From: Dominic M.
Sent on: Friday, October 19, 2012 9:09 AM
On Thu, Oct 18, 2012 at 10:56 PM, Martijn Verburg <[address removed]> wrote:
Hi James,

Thanks for the update I see that it's an IcedTea version of OpenJDK that you're running (IcedTea is OpenJDK + some extra GPL licensed enhancements and bug fixes - see http://icedtea.classpath.org/wiki/Main_Page). So you're best of reporting bugs there first assuming it's an actual Icedtea bug.

That said, I took at look at your log and it's a little difficult to tell what the root cause could be as there's a number of other warnings and errors in that log.  Can you tell me which one is the one that you are concerned about?   I assume it's the NPE?

No — the NPE is in a different file and looks like a red herring.  This is the failing test:

@Test
public void SingleLookup() throws Exception {
A a = new A();
HoldsMultipleA holder = new HoldsMultipleA();
holder.a1 = a;
holder.a2 = a;
ds.save(a, holder);
holder = ds.get(HoldsMultipleA.class, holder.id);
Assert.assertEquals(1, A.loadCount);
Assert.assertTrue(holder.a1 == holder.a2);
}

The error is that A.loadCount is two when it should be one.  Given that there's explicit code in A to throw a RuntimeException if loadCount goes over one, I'd start looking at why that's being covered up.  I'd also be inclined to make A.loadCount volatile (at least temporarily), just in case something's accessing it from multiple threads.

 
It looks like the mappings between your Java objects and the MongoDB driver are mismatched. This sort of thing could conceivably  cause a out and out fail if say a 64-bit v 32-bit assumption was made or some esoteric Reflections call was being made.

I'd definitely look to correcting those mappings as well as sending in the bug report to the Icedtea guys (be aware that they'll expect a short simple code example that demonstrates the problem).


-Dom
 
Cheers,
Martijn

On 18 October[masked]:34, James Green <[address removed]> wrote:
Martijn,

Just re-read your email. I must have worded my original mail poorly...

OpenJDK 7 32bit Linux (Travis-CI environment) fails.
OpenJDK 7 64bit Mac (personal) works.
OpenJDK 6 32bit Linux (Travis-CI environment) works.
Oracle JDK 7 64bit Mac (personal) works.
Oracle JDK 7 32bit Linux (Travis-CI) works.

Given it's the 32bit edition and this project is intended for servers, there is a question over how much concern should be raised, but it's still an itch to scratch and I remain surprised at the results above ;-)

In case anyone's interest the test fails on a static int field inside an static inner class which gets incremented upon a method's use (a @PostLoad method). It's 2 under 32bit OpenJDK 7, and (correctly) 1 under everything else found. Doesn't /sound/ like something likely to fail under these conditions.

James

On 18 October[masked]:51, Martijn Verburg <[address removed]> wrote:
Hi James,

The situation is a little complex :-)

* Apple still maintains Java 6 on 32 and 64-bit Mac OS X

* Oracle maintains Java 7 64-bit Mac but has dropped support for 32-bit Mac (if it happens to work, great)

* Henri Gomez and others that contribute to the OpenJDK are still trying to provide 32-bit Mac compatibility, but it's on a best efforts basis

So you probably should do two things:

1.) Report the bug to http://openjdk.java.net/projects/macosx-port/ project so that Henri etc have a chance to fix it (please submit as much detail as possible)

and/or

2.) Detect OpenJDK 7 on 32-bit Mac and state it's not supported + add that to the FAQ as well

Cheers,
Martijn


On 18 October[masked]:11, James Green <[address removed]> wrote:
So I've forked an open source project and put it on Github. Travis-CI is employed, but I've hit a snag:

- OracleJDK7 and OpenJDK6 pass green
- OpenJDK7 fails a test, consistently the same one

I'm on OS X[masked] with Oracle's latest and greatest, and an OpenJDK from the google-code site. I cannot reproduce the problem locally.

The only thing I've found in searching for clues is that OpenJDK is apparently a bit dodgy in 32-bit forms. Travis appears to be 32-bit.

As an engineer I'm looking for a solution. As someone with a few month's experience with Java / Maven / etc, I am rather lost at this point.

Explaining that "it works except on 32-bit OpenJDK7" in the readme would suck... Can anyone offer advice/assistance to help avoid that?

Thanks,

James





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by James Green ([address removed]) from LJC - London Java Community.
To learn more about James Green, visit his/her member profile
Set my mailing list to email me As they are sent | In one daily email | Don't send me mailing list messages

Meetup, PO Box 4668 #37895 New York, New York[masked] | [address removed]





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Martijn Verburg ([address removed]) from LJC - London Java Community.
To learn more about Martijn Verburg, visit his/her member profile





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by James Green ([address removed]) from LJC - London Java Community.
To learn more about James Green, visit his/her member profile
Set my mailing list to email me As they are sent | In one daily email | Don't send me mailing list messages

Meetup, PO Box 4668 #37895 New York, New York[masked] | [address removed]





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Martijn Verburg ([address removed]) from LJC - London Java Community.
To learn more about Martijn Verburg, visit his/her member profile
Set my mailing list to email me As they are sent | In one daily email | Don't send me mailing list messages

Meetup, PO Box 4668 #37895 New York, New York[masked] | [address removed]

Our Sponsors

  • Our Blog

    Read the latest news from the LJC

  • RecWorks Ltd

    Fixing Tech Recruitment using the Power of Community

  • jClarity

    Java/JVM Performance Analysis Tools & mentoring for Java related matters

  • LJC Aggrity

    Our LJC Aggrity site contains blog posts from our members

  • LJC Book Club

    Our Book club with book reviews from our members

  • Devoxx UK

    Java Community Conference in collaboration with the LJC, 8-10th June 16

  • SkillsMatter

    "Host, help organise, promote, film many of our meetings."

  • IBM

    Build Enterprise-grade apps at start-up speed.

  • New Relic

    New Relic makes sense of billions of metrics a day in real time.

  • Hazelcast

    Hazelcast is the leader in operating in-memory computing.

  • Java.Net

    We are an official Java User Group recognised by Oracle's JUG program

  • JRebel

    Free 3 month J-Rebel license.

  • O'Reilly

    40% discount on printed books and 50% on e-books.

  • Craft Rebellion

    Your choice of fresh craft beer, delivered. For 10% off use ‘LJC'

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy