Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.6.2 does not work under java-se-1.6: java.lang.NoClassDefFoundError java.util.concurrent.ThreadLocalRandom #27

Closed
h2000 opened this issue Oct 9, 2014 · 6 comments

Comments

@h2000
Copy link

h2000 commented Oct 9, 2014

The generated code contains calls to java.util.concurent.ThreadLocalRandom, which is not present in java 6. See http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadLocalRandom.html

(Env. Mac OSX 10.9.4, JRE Java SE6 version 1.6.0_33)

public class Test {
    public static void main(final String[] args) {

        new LHashParallelKVLongDoubleMapFactoryImpl();
    }
}
Exception in thread "main" java.lang.NoClassDefFoundError: java/util/concurrent/ThreadLocalRandom
    at com.busintel.ponti.impl.MapBasedValueCollectionImplTest.main(MapBasedValueCollectionImplTest.java:62)
Caused by: java.lang.ClassNotFoundException: java.util.concurrent.ThreadLocalRandom
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    ... 1 more
leventov added a commit that referenced this issue Oct 9, 2014
… in the version of the lib for Java 6 or 7
@leventov
Copy link
Owner

leventov commented Oct 9, 2014

Thank you.

@leventov leventov added the bug label Oct 9, 2014
@leventov
Copy link
Owner

leventov commented Oct 9, 2014

@h2000 could you verify if the problem fixed? (Since your prepare your own selective build I hope you don't need Maven release, fix in repo is enough).

BTW you are not supposed to access any classes from *.impl packages of Koloboke directly, all functionality is reachable through public API.

@h2000
Copy link
Author

h2000 commented Oct 9, 2014

First simple tests works with jse 1.6, thank you very munch for your extrem fast responses (just like the lib ;) ). I'll test more tomorrow ...

Btw. I released the custom build jars to an intranet nexus for testing.

@h2000
Copy link
Author

h2000 commented Oct 10, 2014

It works. Tested in Eclipse with JRE Java SE6 version 1.6.0_33 on Mac and in Jenkins with jdk1.6.0_20 on Linux. Thank you very much!!

@leventov
Copy link
Owner

Don't forget you shouldn't use classes from *.impl packages. Not only I reserve the right to rename/modify them, this possibility is not theoretical, 99% that I will do that.

@h2000
Copy link
Author

h2000 commented Oct 10, 2014

I know! :)

It was was just for simplification of the test case (without class for name stuff, because of the service locator pattern used):

public class Test {
    public static void main(final String[] args) {

        new LHashParallelKVLongDoubleMapFactoryImpl();
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants