{"action":"opened","number":7309,"pull_request":{"url":"https://api.github.com/repos/apache/kafka/pulls/7309","id":314966970,"node_id":"MDExOlB1bGxSZXF1ZXN0MzE0OTY2OTcw","html_url":"https://github.com/apache/kafka/pull/7309","diff_url":"https://github.com/apache/kafka/pull/7309.diff","patch_url":"https://github.com/apache/kafka/pull/7309.patch","issue_url":"https://api.github.com/repos/apache/kafka/issues/7309","number":7309,"state":"open","locked":false,"title":"MINOR: KAFKA-8884: class cast exception improvement","user":{"login":"astubbs","id":3414,"node_id":"MDQ6VXNlcjM0MTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/3414?v=4","gravatar_id":"","url":"https://api.github.com/users/astubbs","html_url":"https://github.com/astubbs","followers_url":"https://api.github.com/users/astubbs/followers","following_url":"https://api.github.com/users/astubbs/following{/other_user}","gists_url":"https://api.github.com/users/astubbs/gists{/gist_id}","starred_url":"https://api.github.com/users/astubbs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astubbs/subscriptions","organizations_url":"https://api.github.com/users/astubbs/orgs","repos_url":"https://api.github.com/users/astubbs/repos","events_url":"https://api.github.com/users/astubbs/events{/privacy}","received_events_url":"https://api.github.com/users/astubbs/received_events","type":"User","site_admin":false},"body":"If a processor causes a class cast exception, atm you get a bit of a cryptic error if you're not used to them, and without a context sensitive suggestion as to what could be wrong. Often these can be cause by miss-configured Serdes (defaults).\r\n\r\nOld error:\r\n```\r\nCaused by: java.lang.ClassCastException: class [B cannot be cast to class java.lang.String ([B and java.lang.String are in module java.base of loader 'bootstrap')\r\n```\r\n\r\nAn example of the improvement over the case exception:\r\n```\r\norg.apache.kafka.streams.errors.StreamsException: Exception caught in process. taskId=0_0, processor=KSTREAM-SOURCE-0000000000, topic=streams-plaintext-input, partition=0, offset=0, stacktrace=org.apache.kafka.streams.errors.StreamsException: \r\nClassCastException invoking Processor. Do the Processor's input types match the deserialized types? Check \r\nthe Serde setup and change the default Serdes in StreamConfig or provide correct Serdes via method \r\nparameters. Deserialized input types are: key: [B, value: [B\r\n\tat org.apache.kafka.streams.processor.internals.ProcessorNode.process(ProcessorNode.java:123)\r\n\tat org.apache.kafka.streams.processor.internals.ProcessorContextImpl.forward(ProcessorContextImpl.java:201)\r\n\tat org.apache.kafka.streams.processor.internals.ProcessorContextImpl.forward(ProcessorContextImpl.java:180)\r\n\tat org.apache.kafka.streams.processor.internals.ProcessorContextImpl.forward(ProcessorContextImpl.java:133)\r\n\tat org.apache.kafka.streams.processor.internals.SourceNode.process(SourceNode.java:87)\r\n\tat org.apache.kafka.streams.processor.internals.StreamTask.process(StreamTask.java:366)\r\n\tat org.apache.kafka.streams.TopologyTestDriver.pipeInput(TopologyTestDriver.java:419)\r\n\tat org.apache.kafka.streams.processor.internals.ProcessorNodeTest.testTopologyLevelClassCastException(ProcessorNodeTest.java:176)\r\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:566)\r\n\tat org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)\r\n\tat org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)\r\n\tat org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)\r\n\tat org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)\r\n\tat org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:305)\r\n\tat org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)\r\n\tat org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:365)\r\n\tat org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)\r\n\tat org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)\r\n\tat org.junit.runners.ParentRunner$4.run(ParentRunner.java:330)\r\n\tat org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:78)\r\n\tat org.junit.runners.ParentRunner.runChildren(ParentRunner.java:328)\r\n\tat org.junit.runners.ParentRunner.access$100(ParentRunner.java:65)\r\n\tat org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:292)\r\n\tat org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:305)\r\n\tat org.junit.runners.ParentRunner.run(ParentRunner.java:412)\r\n\tat org.junit.runner.JUnitCore.run(JUnitCore.java:137)\r\n\tat com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)\r\n\tat com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)\r\n\tat com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)\r\n\tat com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)\r\nCaused by: java.lang.ClassCastException: class [B cannot be cast to class java.lang.String ([B and java.lang.String are in module java.base of loader 'bootstrap')\r\n\tat org.apache.kafka.streams.kstream.internals.AbstractStream.lambda$withKey$1(AbstractStream.java:103)\r\n\tat org.apache.kafka.streams.kstream.internals.KStreamFlatMapValues$KStreamFlatMapValuesProcessor.process(KStreamFlatMapValues.java:40)\r\n\tat org.apache.kafka.streams.processor.internals.ProcessorNode.process(ProcessorNode.java:119)\r\n\t... 32 more\r\n```\r\n\r\n### Committer Checklist (excluded from commit message)\r\n- [ ] Verify design and implementation \r\n- [ ] Verify test coverage and CI build status\r\n- [ ] Verify documentation (including upgrade notes)\r\n","created_at":"2019-09-06T13:57:14Z","updated_at":"2019-09-06T13:57:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/kafka/pulls/7309/commits","review_comments_url":"https://api.github.com/repos/apache/kafka/pulls/7309/comments","review_comment_url":"https://api.github.com/repos/apache/kafka/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/kafka/issues/7309/comments","statuses_url":"https://api.github.com/repos/apache/kafka/statuses/9760e25edd37cea508f22dc628059fb0a3b3ce5c","head":{"label":"astubbs:astubbs-class-cast-exception-improvement","ref":"astubbs-class-cast-exception-improvement","sha":"9760e25edd37cea508f22dc628059fb0a3b3ce5c","user":{"login":"astubbs","id":3414,"node_id":"MDQ6VXNlcjM0MTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/3414?v=4","gravatar_id":"","url":"https://api.github.com/users/astubbs","html_url":"https://github.com/astubbs","followers_url":"https://api.github.com/users/astubbs/followers","following_url":"https://api.github.com/users/astubbs/following{/other_user}","gists_url":"https://api.github.com/users/astubbs/gists{/gist_id}","starred_url":"https://api.github.com/users/astubbs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astubbs/subscriptions","organizations_url":"https://api.github.com/users/astubbs/orgs","repos_url":"https://api.github.com/users/astubbs/repos","events_url":"https://api.github.com/users/astubbs/events{/privacy}","received_events_url":"https://api.github.com/users/astubbs/received_events","type":"User","site_admin":false},"repo":{"id":71838895,"node_id":"MDEwOlJlcG9zaXRvcnk3MTgzODg5NQ==","name":"kafka","full_name":"astubbs/kafka","private":false,"owner":{"login":"astubbs","id":3414,"node_id":"MDQ6VXNlcjM0MTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/3414?v=4","gravatar_id":"","url":"https://api.github.com/users/astubbs","html_url":"https://github.com/astubbs","followers_url":"https://api.github.com/users/astubbs/followers","following_url":"https://api.github.com/users/astubbs/following{/other_user}","gists_url":"https://api.github.com/users/astubbs/gists{/gist_id}","starred_url":"https://api.github.com/users/astubbs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astubbs/subscriptions","organizations_url":"https://api.github.com/users/astubbs/orgs","repos_url":"https://api.github.com/users/astubbs/repos","events_url":"https://api.github.com/users/astubbs/events{/privacy}","received_events_url":"https://api.github.com/users/astubbs/received_events","type":"User","site_admin":false},"html_url":"https://github.com/astubbs/kafka","description":"Mirror of Apache Kafka","fork":true,"url":"https://api.github.com/repos/astubbs/kafka","forks_url":"https://api.github.com/repos/astubbs/kafka/forks","keys_url":"https://api.github.com/repos/astubbs/kafka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/astubbs/kafka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/astubbs/kafka/teams","hooks_url":"https://api.github.com/repos/astubbs/kafka/hooks","issue_events_url":"https://api.github.com/repos/astubbs/kafka/issues/events{/number}","events_url":"https://api.github.com/repos/astubbs/kafka/events","assignees_url":"https://api.github.com/repos/astubbs/kafka/assignees{/user}","branches_url":"https://api.github.com/repos/astubbs/kafka/branches{/branch}","tags_url":"https://api.github.com/repos/astubbs/kafka/tags","blobs_url":"https://api.github.com/repos/astubbs/kafka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/astubbs/kafka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/astubbs/kafka/git/refs{/sha}","trees_url":"https://api.github.com/repos/astubbs/kafka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/astubbs/kafka/statuses/{sha}","languages_url":"https://api.github.com/repos/astubbs/kafka/languages","stargazers_url":"https://api.github.com/repos/astubbs/kafka/stargazers","contributors_url":"https://api.github.com/repos/astubbs/kafka/contributors","subscribers_url":"https://api.github.com/repos/astubbs/kafka/subscribers","subscription_url":"https://api.github.com/repos/astubbs/kafka/subscription","commits_url":"https://api.github.com/repos/astubbs/kafka/commits{/sha}","git_commits_url":"https://api.github.com/repos/astubbs/kafka/git/commits{/sha}","comments_url":"https://api.github.com/repos/astubbs/kafka/comments{/number}","issue_comment_url":"https://api.github.com/repos/astubbs/kafka/issues/comments{/number}","contents_url":"https://api.github.com/repos/astubbs/kafka/contents/{+path}","compare_url":"https://api.github.com/repos/astubbs/kafka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/astubbs/kafka/merges","archive_url":"https://api.github.com/repos/astubbs/kafka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/astubbs/kafka/downloads","issues_url":"https://api.github.com/repos/astubbs/kafka/issues{/number}","pulls_url":"https://api.github.com/repos/astubbs/kafka/pulls{/number}","milestones_url":"https://api.github.com/repos/astubbs/kafka/milestones{/number}","notifications_url":"https://api.github.com/repos/astubbs/kafka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/astubbs/kafka/labels{/name}","releases_url":"https://api.github.com/repos/astubbs/kafka/releases{/id}","deployments_url":"https://api.github.com/repos/astubbs/kafka/deployments","created_at":"2016-10-24T22:56:18Z","updated_at":"2016-10-24T22:56:23Z","pushed_at":"2019-09-06T13:54:30Z","git_url":"git://github.com/astubbs/kafka.git","ssh_url":"git@github.com:astubbs/kafka.git","clone_url":"https://github.com/astubbs/kafka.git","svn_url":"https://github.com/astubbs/kafka","homepage":null,"size":80023,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"trunk"}},"base":{"label":"apache:trunk","ref":"trunk","sha":"c65e19ae95549f7dc49eec3e5fd3cc2de84687d9","user":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":2211243,"node_id":"MDEwOlJlcG9zaXRvcnkyMjExMjQz","name":"kafka","full_name":"apache/kafka","private":false,"owner":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/apache/kafka","description":"Mirror of Apache Kafka","fork":false,"url":"https://api.github.com/repos/apache/kafka","forks_url":"https://api.github.com/repos/apache/kafka/forks","keys_url":"https://api.github.com/repos/apache/kafka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/kafka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/kafka/teams","hooks_url":"https://api.github.com/repos/apache/kafka/hooks","issue_events_url":"https://api.github.com/repos/apache/kafka/issues/events{/number}","events_url":"https://api.github.com/repos/apache/kafka/events","assignees_url":"https://api.github.com/repos/apache/kafka/assignees{/user}","branches_url":"https://api.github.com/repos/apache/kafka/branches{/branch}","tags_url":"https://api.github.com/repos/apache/kafka/tags","blobs_url":"https://api.github.com/repos/apache/kafka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/kafka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/kafka/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/kafka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/kafka/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/kafka/languages","stargazers_url":"https://api.github.com/repos/apache/kafka/stargazers","contributors_url":"https://api.github.com/repos/apache/kafka/contributors","subscribers_url":"https://api.github.com/repos/apache/kafka/subscribers","subscription_url":"https://api.github.com/repos/apache/kafka/subscription","commits_url":"https://api.github.com/repos/apache/kafka/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/kafka/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/kafka/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/kafka/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/kafka/contents/{+path}","compare_url":"https://api.github.com/repos/apache/kafka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/kafka/merges","archive_url":"https://api.github.com/repos/apache/kafka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/kafka/downloads","issues_url":"https://api.github.com/repos/apache/kafka/issues{/number}","pulls_url":"https://api.github.com/repos/apache/kafka/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/kafka/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/kafka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/kafka/labels{/name}","releases_url":"https://api.github.com/repos/apache/kafka/releases{/id}","deployments_url":"https://api.github.com/repos/apache/kafka/deployments","created_at":"2011-08-15T18:06:16Z","updated_at":"2019-09-06T12:32:39Z","pushed_at":"2019-09-06T13:53:08Z","git_url":"git://github.com/apache/kafka.git","ssh_url":"git@github.com:apache/kafka.git","clone_url":"https://github.com/apache/kafka.git","svn_url":"https://github.com/apache/kafka","homepage":null,"size":87112,"stargazers_count":13476,"watchers_count":13476,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":7153,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":660,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":7153,"open_issues":660,"watchers":13476,"default_branch":"trunk"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/kafka/pulls/7309"},"html":{"href":"https://github.com/apache/kafka/pull/7309"},"issue":{"href":"https://api.github.com/repos/apache/kafka/issues/7309"},"comments":{"href":"https://api.github.com/repos/apache/kafka/issues/7309/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/kafka/pulls/7309/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/kafka/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/kafka/pulls/7309/commits"},"statuses":{"href":"https://api.github.com/repos/apache/kafka/statuses/9760e25edd37cea508f22dc628059fb0a3b3ce5c"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":75,"additions":6678,"deletions":2066,"changed_files":202}}
{"actor":{"display_login":"astubbs"}}