Koloboke icon indicating copy to clipboard operation
Koloboke copied to clipboard

Cannot init a basic map.

Open konstantinberlin opened this issue 9 years ago • 1 comments

Hi,

I have download the 0.6.6 java 8 api files, and wrote this one line java main class which I took from the documentation example

package test2;

import java.util.Map;

import net.openhft.koloboke.collect.map.hash.HashIntIntMaps;

public class Try { public static void main(String[] args) { Map<Integer, Integer> map = HashIntIntMaps.newMutableMap();

}

}

I get this runtime error Exception in thread "main" java.lang.ExceptionInInitializerError at net.openhft.koloboke.collect.map.hash.HashIntIntMaps.getDefaultFactory(HashIntIntMaps.java:52) at net.openhft.koloboke.collect.map.hash.HashIntIntMaps.newMutableMap(HashIntIntMaps.java:76) at test2.Try.main(Try.java:11) Caused by: java.util.NoSuchElementException at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:365) at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404) at java.util.ServiceLoader$1.next(ServiceLoader.java:480) at net.openhft.koloboke.collect.map.hash.HashIntIntMaps$DefaultFactoryHolder.(HashIntIntMaps.java:37) ... 3 more

konstantinberlin avatar Feb 28 '15 18:02 konstantinberlin

@konstantinberlin you should also have to have -impl jar in classpath. This Exception means API couldn't find any implementation.

leventov avatar Mar 01 '15 15:03 leventov