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

NoSuchFieldError: TRACE when used with elasticache. #29

Open
timscarborough opened this issue Feb 24, 2014 · 3 comments
Open

NoSuchFieldError: TRACE when used with elasticache. #29

timscarborough opened this issue Feb 24, 2014 · 3 comments

Comments

@timscarborough
Copy link

When setting the app dependency for play2-memcached with AWS elasticache as described in the readme, I get a NoSuchFieldError: TRACE when running my application. I have the AWS elasticache client jar in my lib folder and I excluded net.spy as described in the documentation ("com.github.mumoshu" %% "play2-memcached" % "0.5.0-RC1 exclude("net.spy", "spymemcached")). Am I missing something? Any assistance would be greatly appreciated. Thanks!

@mugglmenzel
Copy link

Same here. I am using version 0.6.0 with play 2.3.3.
Problem seems related to the logging mechanism of net.spy.memcached. I also tried to upgrade spymemcached to the newest release 2.11.4. The error remains.
Stacktrace:
Exception in thread "main" java.lang.NoSuchFieldError: TRACE
at com.github.mumoshu.play2.memcached.Slf4JLogger.log(MemcachedPlugin.scala:26)
at net.spy.memcached.compat.log.AbstractLogger.info(AbstractLogger.java:118)
at net.spy.memcached.compat.log.AbstractLogger.info(AbstractLogger.java:129)
at net.spy.memcached.MemcachedConnection.createConnections(MemcachedConnection.java:247)
at net.spy.memcached.MemcachedConnection.(MemcachedConnection.java:182)
at net.spy.memcached.DefaultConnectionFactory.createConnection(DefaultConnectionFactory.java:203)
at net.spy.memcached.MemcachedClient.setupConnection(MemcachedClient.java:338)
at net.spy.memcached.MemcachedClient.initializeClientUsingConfigEndPoint(MemcachedClient.java:300)
at net.spy.memcached.MemcachedClient.(MemcachedClient.java:284)
at net.spy.memcached.MemcachedClient.(MemcachedClient.java:215)
at com.github.mumoshu.play2.memcached.MemcachedPlugin$$anonfun$client$2$$anonfun$apply$2.apply(MemcachedPlugin.scala:72)
at com.github.mumoshu.play2.memcached.MemcachedPlugin$$anonfun$client$2$$anonfun$apply$2.apply(MemcachedPlugin.scala:72)
at scala.Option.getOrElse(Option.scala:120)
at com.github.mumoshu.play2.memcached.MemcachedPlugin$$anonfun$client$2.apply(MemcachedPlugin.scala:71)
at com.github.mumoshu.play2.memcached.MemcachedPlugin$$anonfun$client$2.apply(MemcachedPlugin.scala:45)
at scala.Option.getOrElse(Option.scala:120)
at com.github.mumoshu.play2.memcached.MemcachedPlugin.client$lzycompute(MemcachedPlugin.scala:45)
at com.github.mumoshu.play2.memcached.MemcachedPlugin.client(MemcachedPlugin.scala:40)
at com.github.mumoshu.play2.memcached.MemcachedPlugin.onStart(MemcachedPlugin.scala:178)
at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:91)
at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:91)
at scala.collection.immutable.List.foreach(List.scala:383)
at play.api.Play$$anonfun$start$1.apply$mcV$sp(Play.scala:91)
at play.api.Play$$anonfun$start$1.apply(Play.scala:91)
at play.api.Play$$anonfun$start$1.apply(Play.scala:91)
at play.utils.Threads$.withContextClassLoader(Threads.scala:21)
at play.api.Play$.start(Play.scala:90)
at play.core.StaticApplication.(ApplicationProvider.scala:55)
at play.core.server.NettyServer$.createServer(NettyServer.scala:244)
at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:280)
at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:275)
at scala.Option.map(Option.scala:145)
at play.core.server.NettyServer$.main(NettyServer.scala:275)
at play.core.server.NettyServer.main(NettyServer.scala)

@mugglmenzel
Copy link

Could identify the problem. The Amazon ElastiCache library serves an outdated Logger implementation that is not compatible with the updated Memcached Play Plugin (particularly the class net.spy.memcached.compat.log.Level).

I created a fork of the Amazon ElastiCache library and updated the logging related files and corresponding dependencies: https://github.com/mugglmenzel/aws-elasticache-cluster-client-memcached-for-java
Feel free to clone to compile with ant. Will also trigger a pull request.

@bruthe57
Copy link

AWSlabs fixed it in this commit awslabs/aws-elasticache-cluster-client-memcached-for-java@730fe4f
and it is available in the latest release 1.1.0 https://github.com/awslabs/aws-elasticache-cluster-client-memcached-for-java

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

No branches or pull requests

3 participants