{"action":"created","issue":{"url":"https://api.github.com/repos/salat/salat/issues/162","repository_url":"https://api.github.com/repos/salat/salat","labels_url":"https://api.github.com/repos/salat/salat/issues/162/labels{/name}","comments_url":"https://api.github.com/repos/salat/salat/issues/162/comments","events_url":"https://api.github.com/repos/salat/salat/issues/162/events","html_url":"https://github.com/salat/salat/issues/162","id":142674983,"number":162,"title":"Problems with deserealisation","user":{"login":"martende","id":1508729,"avatar_url":"https://avatars.githubusercontent.com/u/1508729?v=3","gravatar_id":"","url":"https://api.github.com/users/martende","html_url":"https://github.com/martende","followers_url":"https://api.github.com/users/martende/followers","following_url":"https://api.github.com/users/martende/following{/other_user}","gists_url":"https://api.github.com/users/martende/gists{/gist_id}","starred_url":"https://api.github.com/users/martende/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martende/subscriptions","organizations_url":"https://api.github.com/users/martende/orgs","repos_url":"https://api.github.com/users/martende/repos","events_url":"https://api.github.com/users/martende/events{/privacy}","received_events_url":"https://api.github.com/users/martende/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-22T14:53:13Z","updated_at":"2016-03-22T17:54:30Z","closed_at":null,"body":"I have a rather strange behavior for one salat object that is described like \r\n\r\n```\r\ncase class InnerDomain(domain:String,expired:DateTime,ip:Option[String], .... )\r\n\r\nclass InnerDomainDAO(conn:MongoClient) extends SalatDAO[InnerDomain, ObjectId](collection= conn(\"testdb\")(\"innerdomains\")) \r\n\r\n```\r\n\r\nval dao = new InnerDomainDAO(dbconnection)\r\n```\r\n\r\n// WORKS\r\nval items = dao.find(DBObject(\"isActive\" -> true)).toList\r\n// WORKS - and prints right deserealised MONGO object \r\n 45         println(items)\r\n// Throws excaption ( below)\r\n 46         for ( item <- items) {\r\n 47           val url = \"http://\" + item.domain\r\n 48           log.info(s\"Test $url\")\r\n 49         }\r\n\r\njava.lang.ClassCastException: common.InnerDomain cannot be cast to common.InnerDomain\r\n\tat actors.DomainChecker$anonfun$1$anonfun$apply$2.apply(DomainChecker.scala:46) ~[classes/:na]\r\n\tat scala.collection.immutable.List.foreach(List.scala:381) ~[scala-library-2.11.7.jar:na]\r\n\tat actors.DomainChecker$anonfun$1.apply(DomainChecker.scala:46) ~[classes/:na]\r\n\tat actors.DomainChecker$anonfun$1.apply(DomainChecker.scala:42) ~[classes/:na]\r\n\r\n\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/salat/salat/issues/comments/199936848","html_url":"https://github.com/salat/salat/issues/162#issuecomment-199936848","issue_url":"https://api.github.com/repos/salat/salat/issues/162","id":199936848,"user":{"login":"martende","id":1508729,"avatar_url":"https://avatars.githubusercontent.com/u/1508729?v=3","gravatar_id":"","url":"https://api.github.com/users/martende","html_url":"https://github.com/martende","followers_url":"https://api.github.com/users/martende/followers","following_url":"https://api.github.com/users/martende/following{/other_user}","gists_url":"https://api.github.com/users/martende/gists{/gist_id}","starred_url":"https://api.github.com/users/martende/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martende/subscriptions","organizations_url":"https://api.github.com/users/martende/orgs","repos_url":"https://api.github.com/users/martende/repos","events_url":"https://api.github.com/users/martende/events{/privacy}","received_events_url":"https://api.github.com/users/martende/received_events","type":"User","site_admin":false},"created_at":"2016-03-22T17:54:30Z","updated_at":"2016-03-22T17:54:30Z","body":"I think also that it can be a classloader issue . But why println(items) works - this i can not understand. \r\nBtw. I am using akka environment for this code . \r\n"}}