Open glasgowm148 opened 3 years ago
{ "created_at": "Thu Aug 01 20:47:41 +0000 2019", "id": 1157030160396443664, "id_str": "1157030160396443664", "text": "RT @bbcemt: More roads closed due to flood risk https://t.co/88fgZ114gU https://t.co/PpDLRCJd5h", "truncated": false, "display_text_range": [0, 95], "entities": { "hashtags": [], "symbols": [], "user_mentions": [{ "screen_name": "bbcemt", "name": "BBC East Midlands", "id": 61244597, "id_str": "61244597", "indices": [3, 10] }], "urls": [{ "url": "https://t.co/88fgZ114gU", "expanded_url": "https://bbc.in/2KbQSGI", "display_url": "bbc.in/2KbQSGI", "indices": [48, 71] }], "media": [{ "id": 1157008382001385474, "id_str": "1157008382001385474", "indices": [72, 95], "media_url": "http://pbs.twimg.com/media/EA6E_ktXkAIHNyp.png", "media_url_https": "https://pbs.twimg.com/media/EA6E_ktXkAIHNyp.png", "url": "https://t.co/PpDLRCJd5h", "display_url": "pic.twitter.com/PpDLRCJd5h", "expanded_url": "https://twitter.com/bbcemt/status/1157008384320819205/photo/1", "type": "photo", "sizes": { "large": { "w": 607, "h": 837, "resize": "fit" }, "medium": { "w": 607, "h": 837, "resize": "fit" }, "small": { "w": 493, "h": 680, "resize": "fit" }, "thumb": { "w": 150, "h": 150, "resize": "crop" } }, "source_status_id": 1157008384320819205, "source_status_id_str": "1157008384320819205", "source_user_id": 61244597, "source_user_id_str": "61244597" }] }, "extended_entities": { "media": [{ "id": 1157008382001385474, "id_str": "1157008382001385474", "indices": [72, 95], "media_url": "http://pbs.twimg.com/media/EA6E_ktXkAIHNyp.png", "media_url_https": "https://pbs.twimg.com/media/EA6E_ktXkAIHNyp.png", "url": "https://t.co/PpDLRCJd5h", "display_url": "pic.twitter.com/PpDLRCJd5h", "expanded_url": "https://twitter.com/bbcemt/status/1157008384320819205/photo/1", "type": "photo", "sizes": { "large": { "w": 607, "h": 837, "resize": "fit" }, "medium": { "w": 607, "h": 837, "resize": "fit" }, "small": { "w": 493, "h": 680, "resize": "fit" }, "thumb": { "w": 150, "h": 150, "resize": "crop" } }, "source_status_id": 1157008384320819205, "source_status_id_str": "1157008384320819205", "source_user_id": 61244597, "source_user_id_str": "61244597" }] }, "metadata": { "iso_language_code": "en", "result_type": "recent" }, "source": "<a href=\"http://twitter.com/#!/download/ipad\" rel=\"nofollow\">Twitter for iPad</a>", "in_reply_to_status_id": null, "in_reply_to_status_id_str": null, "in_reply_to_user_id": null, "in_reply_to_user_id_str": null, "in_reply_to_screen_name": null, "user": { "id": 743107433816555520, "id_str": "743107433816555520", "name": "JuJu", "screen_name": "oraclebooker", "location": "Leicester, England", "description": "Love theatre,film & reading.Believe in Public Libs & staff, NOT machines. It is my personal belief that lib staff play an important part in social care.", "url": null, "entities": { "description": { "urls": [] } }, "protected": false, "followers_count": 376, "friends_count": 236, "listed_count": 6, "created_at": "Wed Jun 15 15:46:33 +0000 2016", "favourites_count": 41596, "utc_offset": null, "time_zone": null, "geo_enabled": false, "verified": false, "statuses_count": 27099, "lang": null, "contributors_enabled": false, "is_translator": false, "is_translation_enabled": false, "profile_background_color": "F5F8FA", "profile_background_image_url": null, "profile_background_image_url_https": null, "profile_background_tile": false, "profile_image_url": "http://pbs.twimg.com/profile_images/848086420648599552/AGuwJ7PE_normal.jpg", "profile_image_url_https": "https://pbs.twimg.com/profile_images/848086420648599552/AGuwJ7PE_normal.jpg", "profile_link_color": "1DA1F2", "profile_sidebar_border_color": "C0DEED", "profile_sidebar_fill_color": "DDEEF6", "profile_text_color": "333333", "profile_use_background_image": true, "has_extended_profile": false, "default_profile": true, "default_profile_image": false, "following": false, "follow_request_sent": false, "notifications": false, "translator_type": "none" }, "geo": null, "coordinates": null, "place": null, "contributors": null, "retweeted_status": { "created_at": "Thu Aug 01 19:21:09 +0000 2019", "id": 1157008384320819205, "id_str": "1157008384320819205", "text": "More roads closed due to flood risk https://t.co/88fgZ114gU https://t.co/PpDLRCJd5h", "truncated": false, "display_text_range": [0, 59], "entities": { "hashtags": [], "symbols": [], "user_mentions": [], "urls": [{ "url": "https://t.co/88fgZ114gU", "expanded_url": "https://bbc.in/2KbQSGI", "display_url": "bbc.in/2KbQSGI", "indices": [36, 59] }], "media": [{ "id": 1157008382001385474, "id_str": "1157008382001385474", "indices": [60, 83], "media_url": "http://pbs.twimg.com/media/EA6E_ktXkAIHNyp.png", "media_url_https": "https://pbs.twimg.com/media/EA6E_ktXkAIHNyp.png", "url": "https://t.co/PpDLRCJd5h", "display_url": "pic.twitter.com/PpDLRCJd5h", "expanded_url": "https://twitter.com/bbcemt/status/1157008384320819205/photo/1", "type": "photo", "sizes": { "large": { "w": 607, "h": 837, "resize": "fit" }, "medium": { "w": 607, "h": 837, "resize": "fit" }, "small": { "w": 493, "h": 680, "resize": "fit" }, "thumb": { "w": 150, "h": 150, "resize": "crop" } } }] }, "extended_entities": { "media": [{ "id": 1157008382001385474, "id_str": "1157008382001385474", "indices": [60, 83], "media_url": "http://pbs.twimg.com/media/EA6E_ktXkAIHNyp.png", "media_url_https": "https://pbs.twimg.com/media/EA6E_ktXkAIHNyp.png", "url": "https://t.co/PpDLRCJd5h", "display_url": "pic.twitter.com/PpDLRCJd5h", "expanded_url": "https://twitter.com/bbcemt/status/1157008384320819205/photo/1", "type": "photo", "sizes": { "large": { "w": 607, "h": 837, "resize": "fit" }, "medium": { "w": 607, "h": 837, "resize": "fit" }, "small": { "w": 493, "h": 680, "resize": "fit" }, "thumb": { "w": 150, "h": 150, "resize": "crop" } } }] }, "metadata": { "iso_language_code": "en", "result_type": "recent" }, "source": "<a href=\"http://www.socialflow.com\" rel=\"nofollow\">SocialFlow</a>", "in_reply_to_status_id": null, "in_reply_to_status_id_str": null, "in_reply_to_user_id": null, "in_reply_to_user_id_str": null, "in_reply_to_screen_name": null, "user": { "id": 61244597, "id_str": "61244597", "name": "BBC East Midlands", "screen_name": "bbcemt", "location": "East Midlands, England", "description": "The latest news, sport and weather from the East Midlands", "url": "https://t.co/Jx5NEm8EYK", "entities": { "url": { "urls": [{ "url": "https://t.co/Jx5NEm8EYK", "expanded_url": "http://www.facebook.com/bbceastmids", "display_url": "facebook.com/bbceastmids", "indices": [0, 23] }] }, "description": { "urls": [] } }, "protected": false, "followers_count": 135805, "friends_count": 441, "listed_count": 464, "created_at": "Wed Jul 29 17:14:41 +0000 2009", "favourites_count": 305, "utc_offset": null, "time_zone": null, "geo_enabled": true, "verified": true, "statuses_count": 39109, "lang": null, "contributors_enabled": false, "is_translator": false, "is_translation_enabled": false, "profile_background_color": "C0DEED", "profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png", "profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png", "profile_background_tile": false, "profile_image_url": "http://pbs.twimg.com/profile_images/1150693213537218560/9DlCR47G_normal.png", "profile_image_url_https": "https://pbs.twimg.com/profile_images/1150693213537218560/9DlCR47G_normal.png", "profile_banner_url": "https://pbs.twimg.com/profile_banners/61244597/1520336865", "profile_link_color": "1DA1F2", "profile_sidebar_border_color": "C0DEED", "profile_sidebar_fill_color": "DDEEF6", "profile_text_color": "333333", "profile_use_background_image": true, "has_extended_profile": false, "default_profile": true, "default_profile_image": false, "following": false, "follow_request_sent": false, "notifications": false, "translator_type": "none" }, "geo": null, "coordinates": null, "place": null, "contributors": null, "is_quote_status": false, "retweet_count": 1, "favorite_count": 1, "favorited": false, "retweeted": false, "possibly_sensitive": false, "lang": "en" }, "is_quote_status": false, "retweet_count": 1, "favorite_count": 0, "favorited": false, "retweeted": false, "possibly_sensitive": false, "lang": "en" }
"text": "RT @bbcemt: More roads closed due to flood risk https://t.co/88fgZ114gU https://t.co/PpDLRCJd5h",
1157030173545500672[[31merror[0m] a.a.OneForOneStrategy - null java.lang.NullPointerException: null at actors.LineProcessor.onReceive(LineProcessor.java:77) at akka.actor.UntypedAbstractActor$$anonfun$receive$1.applyOrElse(AbstractActor.scala:332) at akka.actor.Actor.aroundReceive(Actor.scala:537) at akka.actor.Actor.aroundReceive$(Actor.scala:535) at akka.actor.AbstractActor.aroundReceive(AbstractActor.scala:220) at akka.actor.ActorCell.receiveMessage(ActorCell.scala:577) at akka.actor.ActorCell.invoke(ActorCell.scala:547) at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:270) at akka.dispatch.Mailbox.run(Mailbox.scala:231) at akka.dispatch.Mailbox.exec(Mailbox.scala:243)
Error occurs at this stage on whaley
/* Remove URLs, mentions, hashtags and whitespace */ tweet.setText(tweet.getText().trim() .replaceAll("http.*?[\\S]+", "") .replaceAll("@[\\S]+", "") .replaceAll("#", "") .replaceAll("[\\s]+", " ") .replaceAll("\\{.*?}", "") .replaceAll("\\[.*?]", "") .replaceAll("\\(.*?\\)", "") .replaceAll("[^A-Za-z0-9(),!?@'
\"_\n]", " ")
.replaceAll("[/]", " ")
.replaceAll(";", " "));
`
Unclear why, text doesn't look malformed and other events are working fine
java.lang.NullPointerException: null at actors.LineProcessor.onReceive(LineProcessor.java:76) at akka.actor.UntypedAbstractActor$$anonfun$receive$1.