wikibrain icon indicating copy to clipboard operation
wikibrain copied to clipboard

java.lang.NoSuchMethodError: java.util.concurrent.ConcurrentHashMap.keySet()

Open cheetah90 opened this issue 8 years ago • 4 comments

Hi, when using WikiBrain Configuration GUI to import simple English edition with default setting, I got the following error,

Exception in thread "main" java.lang.NoSuchMethodError: java.util.concurrent.ConcurrentHashMap.keySet()Ljava/util/concurrent/ConcurrentHashMap$KeySetView;
    at org.wikibrain.core.dao.sql.MetaInfoSqlDao.sync(MetaInfoSqlDao.java:171)
    at org.wikibrain.core.dao.sql.MetaInfoSqlDao.getAllCummulativeInfo(MetaInfoSqlDao.java:326)
    at org.wikibrain.loader.pipeline.PipelineLoader.<init>(PipelineLoader.java:46)
    at org.wikibrain.Loader.<init>(Loader.java:72)
    at org.wikibrain.Loader.main(Loader.java:107)


LOADING FAILED!

Looks like this is a common problem when compiled with JDK 8 targeting Java 6 or 7 https://bugzilla.redhat.com/show_bug.cgi?id=1160683#c6

cheetah90 avatar Sep 11 '15 20:09 cheetah90

Thank you! This looks like a bug related to Java versions. I think the code runs under Java8 but not Java7. However, I'm quite certain with a small change we can support Java7. I'll try to stage a release to fix the problem in the next few days.

On Fri, Sep 11, 2015 at 3:08 PM, cheetah90 [email protected] wrote:

Hi, when using WikiBrain Configuration GUI to import simple English edition with default setting, I got the following error,

Exception in thread "main" java.lang.NoSuchMethodError: java.util.concurrent.ConcurrentHashMap.keySet()Ljava/util/concurrent/ConcurrentHashMap$KeySetView; at org.wikibrain.core.dao.sql.MetaInfoSqlDao.sync(MetaInfoSqlDao.java:171) at org.wikibrain.core.dao.sql.MetaInfoSqlDao.getAllCummulativeInfo(MetaInfoSqlDao.java:326) at org.wikibrain.loader.pipeline.PipelineLoader.(PipelineLoader.java:46) at org.wikibrain.Loader.(Loader.java:72) at org.wikibrain.Loader.main(Loader.java:107)

LOADING FAILED!

Looks like this is a common problem when compiled with JDK 8 targeting Java 6 or 7 https://bugzilla.redhat.com/show_bug.cgi?id=1160683#c6

— Reply to this email directly or view it on GitHub https://github.com/shilad/wikibrain/issues/247.

shilad avatar Sep 17 '15 14:09 shilad

Thanks!

cheetah90 avatar Sep 17 '15 20:09 cheetah90

I compiled 0.7.4 with Java7. Would you please give it a try?

shilad avatar Nov 23 '15 06:11 shilad

I'll do later. For now, I am using Java8.

cheetah90 avatar Nov 30 '15 14:11 cheetah90