2

I upgraded a java play 2.2 application to 2.3.3. The database backend is MySql accessed through ebean. At run time, it throws the following exception when I make an initial request. I tried manually adding guava 17.0 and bonecp 0.8.0 as references in the project, did not make a difference. Not sure why the bonecp is showing 0.7.1 in the stack trace with 0.8 in the library references in the build.sbt.

play.api.UnexpectedException: Unexpected exception[IllegalAccessError: tried to access method com.google.common.collect.MapMaker.makeComputingMap(Lcom/google/common/base/Function;)Ljava/util/concurrent/ConcurrentMap; from class com.jolbox.bonecp.BoneCPDataSource]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(ApplicationProvider.scala:170) ~[play_2.11-2.3.3.jar:2.3.3]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(ApplicationProvider.scala:130) ~[play_2.11-2.3.3.jar:2.3.3]
at scala.Option.map(Option.scala:145) ~[scala-library-2.11.1.jar:na]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1.apply(ApplicationProvider.scala:130) ~[play_2.11-2.3.3.jar:2.3.3]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1.apply(ApplicationProvider.scala:128) ~[play_2.11-2.3.3.jar:2.3.3]
Caused by: java.lang.IllegalAccessError: tried to access method com.google.common.collect.MapMaker.makeComputingMap(Lcom/google/common/base/Function;)Ljava/util/concurrent/ConcurrentMap; from class com.jolbox.bonecp.BoneCPDataSource
    at com.jolbox.bonecp.BoneCPDataSource.<init>(BoneCPDataSource.java:64) ~[bonecp.jar:0.7.1.RELEASE]
    at play.api.db.BoneCPApi.createDataSource(DB.scala:295) ~[play-jdbc_2.11-2.3.3.jar:2.3.3]
    at play.api.db.BoneCPApi.setupDatasources(DB.scala:411) ~[play-jdbc_2.11-2.3.3.jar:2.3.3]
    at play.api.db.BoneCPApi.<init>(DB.scala:418) ~[play-jdbc_2.11-2.3.3.jar:2.3.3]
    at play.api.db.BoneCPPlugin.play$api$db$BoneCPPlugin$$dbApi$lzycompute(DB.scala:211) ~[play-jdbc_2.11-2.3.3.jar:2.3.3]
2
  • Interesting, you might want to report this to the Play developers directly. Aug 26, 2014 at 12:53
  • 1
    Try show full-classpath in SBT to check references to BoneCP
    – cchantep
    Aug 27, 2014 at 0:22

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.