{"action":"closed","issue":{"url":"https://api.github.com/repos/playframework/playframework/issues/5617","repository_url":"https://api.github.com/repos/playframework/playframework","labels_url":"https://api.github.com/repos/playframework/playframework/issues/5617/labels{/name}","comments_url":"https://api.github.com/repos/playframework/playframework/issues/5617/comments","events_url":"https://api.github.com/repos/playframework/playframework/issues/5617/events","html_url":"https://github.com/playframework/playframework/issues/5617","id":132824235,"number":5617,"title":"ObjectMapper not working with Jackson's Mr Bean","user":{"login":"mancvso","id":1781459,"avatar_url":"https://avatars.githubusercontent.com/u/1781459?v=3","gravatar_id":"","url":"https://api.github.com/users/mancvso","html_url":"https://github.com/mancvso","followers_url":"https://api.github.com/users/mancvso/followers","following_url":"https://api.github.com/users/mancvso/following{/other_user}","gists_url":"https://api.github.com/users/mancvso/gists{/gist_id}","starred_url":"https://api.github.com/users/mancvso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mancvso/subscriptions","organizations_url":"https://api.github.com/users/mancvso/orgs","repos_url":"https://api.github.com/users/mancvso/repos","events_url":"https://api.github.com/users/mancvso/events{/privacy}","received_events_url":"https://api.github.com/users/mancvso/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-10T21:37:19Z","updated_at":"2016-02-11T02:46:00Z","closed_at":"2016-02-11T02:46:00Z","body":"Upstream reference: https://github.com/FasterXML/jackson-modules-base/issues/5\r\n\r\nI'm using the Play! framework in Java with an interface like\r\n\r\n```java\r\npublic interface AbstractMsg {\r\n\tpublic String getValue();\r\n}\r\n```\r\n\r\nAnd registered mapper modules at startup\r\n```java\r\nObjectMapper mapper = play.libs.Json.mapper();\r\nmapper.registerModule(new ParameterNamesModule());\r\nmapper.registerModule(new MrBeanModule());\r\nplay.libs.Json.setObjectMapper(mapper);\r\n```\r\n\r\nAnd when trying to \"materialize\" the interface with JSON content\r\n```json\r\n{ \"value\" : \"did it work?\" }\r\n```\r\n\r\nI get a nice Exception\r\n```\r\nakka.actor.OneForOneStrategy - com.fasterxml.jackson.databind.JsonMappingException: Failed to load class 'com.fasterxml.jackson.module.mrbean.generated.models.mensajes.AbstractMsg': models/mensajes/AbstractMsg\r\njava.lang.RuntimeException: com.fasterxml.jackson.databind.JsonMappingException: Failed to load class 'com.fasterxml.jackson.module.mrbean.generated.models.mensajes.AbstractMsg': models/mensajes/AbstractMsg\r\n...\r\nCaused by: com.fasterxml.jackson.databind.JsonMappingException: Failed to load class 'com.fasterxml.jackson.module.mrbean.generated.models.mensajes.AbstractMsg': models/mensajes/AbstractMsg\r\n```\r\n\r\nI have to mention that the \"materialization\" on the interface is happening inside an Actor, which can run in a different thread from which the ObjectMapper and this module was instantiated.\r\n\r\nI have tried different combinations and could not find the cause, but I suspect the class loader of the framework is not available to Jackson, but I'm only speculating.\r\n\r\nJava: 1.8\r\nPlay: 2.4, 2.5\r\nModule version 2.6.0, 2.6.1, 2.7.1"}}