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

Question : Error when running memcache #33

Open
Ramzi-Alqrainy opened this issue Nov 25, 2014 · 3 comments
Open

Question : Error when running memcache #33

Ramzi-Alqrainy opened this issue Nov 25, 2014 · 3 comments

Comments

@Ramzi-Alqrainy
Copy link

Hi Team,

Firstly I want to thank you about your amazing work, I am working on implementing memcache with my project [play 2.2.3 and scala 2.10.3], when I did your notes, I get this error, can you please help me ?

! @6kaia0k7k - Internal server error, for (GET) [/categories?countryCode=jo] ->

play.api.UnexpectedException: Unexpected exception[NotSerializableException: models.Setting]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(ApplicationProvider.scala:148) ~[play_2.10-2.2.3.jar:2.2.3]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(ApplicationProvider.scala:112) ~[play_2.10-2.2.3.jar:2.2.3]
at scala.Option.map(Option.scala:145) ~[scala-library-2.10.3.jar:na]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1.apply(ApplicationProvider.scala:112) ~[play_2.10-2.2.3.jar:2.2.3]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1.apply(ApplicationProvider.scala:110) ~[play_2.10-2.2.3.jar:2.2.3]
at scala.util.Success.flatMap(Try.scala:200) ~[scala-library-2.10.3.jar:na]
Caused by: java.io.NotSerializableException: models.Setting
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184) ~[na:1.8.0_25]
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348) ~[na:1.8.0_25]
at com.github.mumoshu.play2.memcached.MemcachedPlugin$CustomSerializing.serialize(MemcachedPlugin.scala:93) ~[play2-memcached_2.10-0.4.0.jar:0.4.0]
at net.spy.memcached.transcoders.SerializingTranscoder.encode(SerializingTranscoder.java:162) ~[spymemcached-2.9.0.jar:2.9.0]
at net.spy.memcached.MemcachedClient.asyncStore(MemcachedClient.java:291) ~[spymemcached-2.9.0.jar:2.9.0]
at net.spy.memcached.MemcachedClient.set(MemcachedClient.java:807) ~[spymemcached-2.9.0.jar:2.9.0]

@Ramzi-Alqrainy
Copy link
Author

I think the problem is I want to store model in scala

@mkubala
Copy link

mkubala commented Nov 25, 2014

What exactly is models.Setting?
Is it a case class, object or a regular Scala class?

@Ramzi-Alqrainy
Copy link
Author

Sorry, I solved this problem by serialize the class, but I can't store collection like map / list / ... in memcache.

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

2 participants