{"action":"created","issue":{"url":"https://api.github.com/repos/nmorel/gwt-jackson/issues/79","repository_url":"https://api.github.com/repos/nmorel/gwt-jackson","labels_url":"https://api.github.com/repos/nmorel/gwt-jackson/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/nmorel/gwt-jackson/issues/79/comments","events_url":"https://api.github.com/repos/nmorel/gwt-jackson/issues/79/events","html_url":"https://github.com/nmorel/gwt-jackson/issues/79","id":156701592,"number":79,"title":"Issues with incremental SDM compilation in GWT 2.8.0 beta1","user":{"login":"christianbauer","id":1006685,"avatar_url":"https://avatars.githubusercontent.com/u/1006685?v=3","gravatar_id":"","url":"https://api.github.com/users/christianbauer","html_url":"https://github.com/christianbauer","followers_url":"https://api.github.com/users/christianbauer/followers","following_url":"https://api.github.com/users/christianbauer/following{/other_user}","gists_url":"https://api.github.com/users/christianbauer/gists{/gist_id}","starred_url":"https://api.github.com/users/christianbauer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christianbauer/subscriptions","organizations_url":"https://api.github.com/users/christianbauer/orgs","repos_url":"https://api.github.com/users/christianbauer/repos","events_url":"https://api.github.com/users/christianbauer/events{/privacy}","received_events_url":"https://api.github.com/users/christianbauer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nmorel/gwt-jackson/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"nmorel","id":1496039,"avatar_url":"https://avatars.githubusercontent.com/u/1496039?v=3","gravatar_id":"","url":"https://api.github.com/users/nmorel","html_url":"https://github.com/nmorel","followers_url":"https://api.github.com/users/nmorel/followers","following_url":"https://api.github.com/users/nmorel/following{/other_user}","gists_url":"https://api.github.com/users/nmorel/gists{/gist_id}","starred_url":"https://api.github.com/users/nmorel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmorel/subscriptions","organizations_url":"https://api.github.com/users/nmorel/orgs","repos_url":"https://api.github.com/users/nmorel/repos","events_url":"https://api.github.com/users/nmorel/events{/privacy}","received_events_url":"https://api.github.com/users/nmorel/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2016-05-25T09:19:42Z","updated_at":"2016-05-28T08:41:04Z","closed_at":null,"body":"Trying to enable field-only serialization on this class (note the \"illegal\" isBar() getter name, JavaBean says it should be getBar() for a bean property, so must use field access):\r\n\r\n```\r\npublic class Foo {\r\n\r\n    protected Boolean bar;\r\n\r\n    public Boolean isBar() {\r\n        return bar;\r\n    }\r\n\r\n    public void setBar(Boolean bar) {\r\n        this.bar = bar;\r\n    }\r\n}\r\n```\r\n\r\nThis is the mixin:\r\n\r\n```\r\n@JsonAutoDetect(\r\n    getterVisibility = JsonAutoDetect.Visibility.NONE,\r\n    creatorVisibility = JsonAutoDetect.Visibility.NONE,\r\n    fieldVisibility = JsonAutoDetect.Visibility.ANY,\r\n    isGetterVisibility = JsonAutoDetect.Visibility.NONE)\r\npublic abstract class FooMapperMixin {\r\n}\r\n```\r\n\r\nAnd the mapper:\r\n\r\n```\r\n@JsonMixIns({@JsonMixIns.JsonMixIn(target = Foo.class, mixIn = FooMapperMixin.class)})\r\npublic interface FooMapper extends ObjectMapper<Foo> {\r\n}\r\n```\r\n\r\nError:\r\n\r\n```\r\njava.lang.IllegalArgumentException: object is not an instance of declaring class\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n        at java.lang.reflect.Method.invoke(Method.java:497)\r\n        at com.google.gwt.dev.javac.AnnotationProxyFactory$AnnotationProxyInvocationHandler.invoke(AnnotationProxyFactory.java:248)\r\n        at com.sun.proxy.$Proxy124.mixIn(Unknown Source)\r\n        at com.github.nmorel.gwtjackson.rebind.RebindConfiguration.addMixInAnnotations(RebindConfiguration.java:493)\r\n        at com.github.nmorel.gwtjackson.rebind.RebindConfiguration.<init>(RebindConfiguration.java:220)\r\n        at com.github.nmorel.gwtjackson.rebind.ObjectMapperGenerator.generate(ObjectMapperGenerator.java:34)\r\n```\r\n\r\nWorkaround, extend `AbstractConfiguration`:\r\n\r\n```\r\n        addMixInAnnotations( Foo.class, FooMapperMixin.class );\r\n```"},"comment":{"url":"https://api.github.com/repos/nmorel/gwt-jackson/issues/comments/222297557","html_url":"https://github.com/nmorel/gwt-jackson/issues/79#issuecomment-222297557","issue_url":"https://api.github.com/repos/nmorel/gwt-jackson/issues/79","id":222297557,"user":{"login":"nmorel","id":1496039,"avatar_url":"https://avatars.githubusercontent.com/u/1496039?v=3","gravatar_id":"","url":"https://api.github.com/users/nmorel","html_url":"https://github.com/nmorel","followers_url":"https://api.github.com/users/nmorel/followers","following_url":"https://api.github.com/users/nmorel/following{/other_user}","gists_url":"https://api.github.com/users/nmorel/gists{/gist_id}","starred_url":"https://api.github.com/users/nmorel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmorel/subscriptions","organizations_url":"https://api.github.com/users/nmorel/orgs","repos_url":"https://api.github.com/users/nmorel/repos","events_url":"https://api.github.com/users/nmorel/events{/privacy}","received_events_url":"https://api.github.com/users/nmorel/received_events","type":"User","site_admin":false},"created_at":"2016-05-28T08:41:04Z","updated_at":"2016-05-28T08:41:04Z","body":"First time I try the SDM in 2.8.0.\r\nI didn't reproduce the exception but had issues to get the incremental compiler see my changes.\r\n\r\nI added a new MyMixin().toString() in my entry point and the incremental compile work. Maybe I need to reference somewhere in my generator all the classes used this way.\r\n\r\nIf you take the hello world example, I made this changes : \r\n```java\r\n@JsonAutoDetect(\r\n        getterVisibility = JsonAutoDetect.Visibility.NONE,\r\n        creatorVisibility = JsonAutoDetect.Visibility.NONE,\r\n        fieldVisibility = JsonAutoDetect.Visibility.ANY,\r\n        isGetterVisibility = JsonAutoDetect.Visibility.NONE )\r\n@JsonIgnoreProperties( value = {\"greetin\", \"sdf\"} )\r\npublic class GreetingResponseMixIn {\r\n}\r\n```\r\n\r\n```java\r\npublic class GreetingResponse {\r\n\r\n    private String greeting;\r\n\r\n    private String serverInfo;\r\n\r\n    private String userAgent;\r\n\r\n    public GreetingResponse(){}\r\n\r\n    public GreetingResponse( String greeting, String serverInfo, String userAgent ) {\r\n        this.greeting = greeting;\r\n        this.serverInfo = serverInfo;\r\n        this.userAgent = userAgent;\r\n    }\r\n\r\n    public String getGreeting() {\r\n        return greeting;\r\n    }\r\n\r\n    public String getServerInfo() {\r\n        return serverInfo;\r\n    }\r\n\r\n    public String getUserAgent() {\r\n        return userAgent;\r\n    }\r\n\r\n}\r\n```\r\n\r\nHello.java :\r\n```java\r\n    @JsonMixIns( {\r\n            @JsonMixIn( target = GreetingResponse.class, mixIn = GreetingResponseMixIn.class )\r\n    } )\r\n    public static interface GreetingResponseReader extends ObjectReader<GreetingResponse> {}\r\n\r\n    ...\r\n\r\n    public void onModuleLoad() {\r\n        new GreetingResponseMixIn().toString();\r\n        ....\r\n    }\r\n\r\n```\r\n\r\nexamples/pom.xml\r\n\r\n```xml\r\n    <!-- Plugins version -->\r\n    <jetty.version>9.1.3.v20140225</jetty.version>\r\n    <gwt-maven-plugin.version>2.8.0-beta1</gwt-maven-plugin.version>\r\n\r\n    <!-- Dependencies version -->\r\n    <gwt.version>2.8.0-beta1</gwt.version>\r\n```"}}
{"actor":{"display_login":"nmorel"}}