{"id":12998,"date":"2013-05-21T10:00:43","date_gmt":"2013-05-21T07:00:43","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/?p=12998"},"modified":"2013-05-20T12:43:03","modified_gmt":"2013-05-20T09:43:03","slug":"heroku-and-java-from-newbie-to-beginner-part-2","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2013\/05\/heroku-and-java-from-newbie-to-beginner-part-2.html","title":{"rendered":"Heroku and Java &#8211; From Newbie to Beginner, Part 2"},"content":{"rendered":"<h2>The problem<\/h2>\n<p>So after a few days I could get back to my little Recaps project. I started with checking logs and found something like this:<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<\/p>\n<pre class=\" brush:bash\">2012-03-04T01:52:51+00:00 heroku[web.1]: Idling\r\n2012-03-04T01:52:53+00:00 heroku[web.1]: Stopping process with SIGTERM\r\n2012-03-04T01:53:03+00:00 heroku[web.1]: Error R12 (Exit timeout) -&gt; Process failed to exit within 10 seconds of SIGTERM\r\n2012-03-04T01:53:03+00:00 heroku[web.1]: Stopping process with SIGKILL<\/pre>\n<p>I don\u2019t know what you think but whenever I see \u2018Error\u2019 in my logs I get concerned. So I decided to remove that nasty line. What transpired was not pleasant.<\/p>\n<h2>The solution<\/h2>\n<p>This seems like a simple problem. I started up with finding what this SIGTERM is all about. I knew it was Linux signal, I just wanted to know what Heroku is actually doing. So basically sometimes Heroku just sends SIGTERM to your process so that it\u2019s allowed to gracefully shut down. This is very simple.<\/p>\n<p>As I mentioned in my last post, I decided to use Jetty instead of Grizzly. At first I decided to use jetty-runner to run my web application and it worked fine, resources were scanned as Jersey servlet started up. Deploying to Heroku was also easy and with modified Procfile the application started up.<\/p>\n<p>Nevertheless the application did not react correctly to SIGTERM, so without delving deeper in jetty-runner configuration, I decided to just use the embedded Jetty server. It\u2019s very simple and running foreman start made the application actually start. So without further consideration I just deployed the changed application to Heroku. To check whether the error appears again, after first startup I just did heroku restart and connected to logs in another terminal. But the exit timeout error message was still there. My mistake there \u2013 I did not test the application whether it will exit properly when using foreman. So again, foreman start and then ctrl+c just to see what happens (later I tried kill -s TERM procand got similar output):<\/p>\n<pre class=\" brush:bash\">pbu@pbudesk ~\/recaps $ foreman start\r\n21:57:27 web.1     | started with pid 9603\r\n21:57:27 web.1     | 0    [main] INFO  org.eclipse.jetty.server.Server  - jetty-8.1.1.v20120215\r\n21:57:27 web.1     | 110  [main] INFO  org.eclipse.jetty.webapp.StandardDescriptorProcessor  - NO JSP Support for \/, did not find org.apache.jasper.servlet.JspServlet\r\n21:57:27 web.1     | 132  [main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - started o.e.j.w.WebAppContext{\/,file:\/home\/pbu\/Devel\/IdeaProjects\/recaps\/webmodule\/src\/main\/webapp\/},webmodule\/src\/main\/webapp\r\n21:57:27 web.1     | 133  [main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - started o.e.j.w.WebAppContext{\/,file:\/home\/pbu\/Devel\/IdeaProjects\/recaps\/webmodule\/src\/main\/webapp\/},webmodule\/src\/main\/webapp\r\n21:57:27 web.1     | 183  [main] INFO  org.eclipse.jetty.server.AbstractConnector  - Started SelectChannelConnector@0.0.0.0:5000\r\n^CSIGINT received\r\n21:57:57 system    | sending SIGTERM to all processes\r\n21:57:57 system    | sending SIGTERM to pid 9603\r\n21:57:57 web.1     | process terminated\r\npbu@pbudesk ~\/recaps $<\/pre>\n<p>OK, so when foreman receives SIGINT it sends SIGTERM to all processes, cool \u2013 probably Heroku dynos behave the same. Still, it wasn\u2019t a graceful shutdown, but Jetty has a <a href=\"http:\/\/docs.codehaus.org\/display\/JETTY\/How+to+gracefully+shutdown\">graceful shutdown section<\/a> that mentions two nice properties: gracefulShutdown and stopAtShutdown. The modified class looks like this:<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<pre class=\" brush:java\">public class Serve {\r\n    public static void main(String[] args) throws Exception {\r\n        int port = Integer.valueOf(System.getenv(\"PORT\"));\r\n\r\n        Server jetty = new Server(port);\r\n\r\n        WebAppContext context = new WebAppContext();\r\n        context.setContextPath(\"\/\");\r\n        String webapp = \"webmodule\/src\/main\/webapp\";\r\n        context.setWar(webapp);\r\n        context.setResourceBase(webapp);\r\n\r\n        jetty.setHandler(context);\r\n\r\n        jetty.setGracefulShutdown(1000);\r\n        jetty.setStopAtShutdown(true);\r\n\r\n        jetty.start();\r\n        jetty.join();\r\n    }\r\n}<\/pre>\n<p>Running foreman again and using ctrl+c proves this to be working! Great!<\/p>\n<pre class=\" brush:bash\">pbu@pbudesk ~\/recaps $ foreman start\r\n22:11:47 web.1     | started with pid 9863\r\n22:11:47 web.1     | 0    [main] INFO  org.eclipse.jetty.server.Server  - jetty-8.1.1.v20120215\r\n22:11:47 web.1     | 110  [main] INFO  org.eclipse.jetty.webapp.StandardDescriptorProcessor  - NO JSP Support for \/, did not find org.apache.jasper.servlet.JspServlet\r\n22:11:47 web.1     | 131  [main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - started o.e.j.w.WebAppContext{\/,file:\/home\/pbu\/Devel\/IdeaProjects\/recaps\/webmodule\/src\/main\/webapp\/},webmodule\/src\/main\/webapp\r\n22:11:47 web.1     | 132  [main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - started o.e.j.w.WebAppContext{\/,file:\/home\/pbu\/Devel\/IdeaProjects\/recaps\/webmodule\/src\/main\/webapp\/},webmodule\/src\/main\/webapp\r\n22:11:48 web.1     | 183  [main] INFO  org.eclipse.jetty.server.AbstractConnector  - Started SelectChannelConnector@0.0.0.0:5000\r\n^C22:11:49 web.1     | 1969 [Thread-1] INFO  org.eclipse.jetty.server.Server  - Graceful shutdown SelectChannelConnector@0.0.0.0:5000\r\n22:11:49 web.1     | 1970 [Thread-1] INFO  org.eclipse.jetty.server.Server  - Graceful shutdown o.e.j.w.WebAppContext{\/,file:\/home\/pbu\/Devel\/IdeaProjects\/recaps\/webmodule\/src\/main\/webapp\/},webmodule\/src\/main\/webapp\r\nSIGINT received\r\n22:11:49 system    | sending SIGTERM to all processes\r\n22:11:49 system    | sending SIGTERM to pid 9863\r\n22:11:50 web.1     | 2982 [Thread-1] INFO  org.eclipse.jetty.server.handler.ContextHandler  - stopped o.e.j.w.WebAppContext{\/,file:\/home\/pbu\/Devel\/IdeaProjects\/recaps\/webmodule\/src\/main\/webapp\/},webmodule\/src\/main\/webapp\r\n22:11:50 web.1     | process terminated\r\npbu@pbudesk ~\/recaps $\r\nSo off to deploy it to the cloud! Again, deploy, heroku restart and watch logs... but it doesn't work.<\/pre>\n<h2>Different way<\/h2>\n<p>After initial failure I\u2019ve tried a different approach. I found out that you can register shutdown hooks \u2013 very easy thing. To do that, just register a new thread with Runtime.getRuntime().addShutdownHook(Thread) method:<\/p>\n<pre class=\" brush:java\">public class Serve {\r\n    public static void main(String[] args) throws Exception {\r\n        Runtime.getRuntime().addShutdownHook(new Thread() {\r\n            @Override\r\n            public void run() {\r\n                System.out.println(\"Shutting down by shutdown hook\");\r\n            }\r\n        });\r\n        int port = Integer.valueOf(System.getenv(\"PORT\"));\r\n\r\n        Server jetty = new Server(port);\r\n\r\n        WebAppContext context = new WebAppContext();\r\n        context.setContextPath(\"\/\");\r\n        String webapp = \"webmodule\/src\/main\/webapp\";\r\n        context.setWar(webapp);\r\n        context.setResourceBase(webapp);\r\n\r\n        jetty.setHandler(context);\r\n\r\n        jetty.setGracefulShutdown(1000);\r\n        jetty.setStopAtShutdown(true);\r\n\r\n        jetty.start();\r\n        jetty.join();\r\n    }\r\n}<\/pre>\n<p>Final test with foreman proves it to be working too, however once again it doesn\u2019t work on Heroku.<\/p>\n<p>At this point, I have no idea how to get rid of that timeout. It is not very important, I just wanted to check whether I can somehow react to it, but to no avail. For now I guess I\u2019ll just contact Heroku, maybe they\u2019ll help. Another option could be trying embedded Tomcat, but maybe at a later time. For now, I have other things to do, like checking out <a href=\"http:\/\/jelastic.com\/\">Jelastic<\/a>.<br \/>\n&nbsp;<\/p>\n<div style=\"border: 1px solid #D8D8D8; background: #FAFAFA; width: 100%; padding-left: 5px;\"><b><i>Reference: <\/i><\/b><a href=\"http:\/\/piotrbuda.eu\/2012\/03\/heroku-and-java-from-newbie-to-beginner-part-2.html\">Heroku and Java &#8211; From Newbie to Beginner, Part 2<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/jcg\">JCG partner<\/a> Piotr Buda at the <a href=\"http:\/\/piotrbuda.eu\/\">Software Ramblings<\/a> blog.<\/div>\n","protected":false},"excerpt":{"rendered":"<p>The problem So after a few days I could get back to my little Recaps project. I started with checking logs and found something like this: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2012-03-04T01:52:51+00:00 heroku[web.1]: Idling 2012-03-04T01:52:53+00:00 heroku[web.1]: Stopping process with SIGTERM 2012-03-04T01:53:03+00:00 heroku[web.1]: Error R12 (Exit timeout) -&gt; Process failed to exit within 10 &hellip;<\/p>\n","protected":false},"author":432,"featured_media":134,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[210,222],"class_list":["post-12998","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-cloud","tag-heroku"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Heroku and Java - From Newbie to Beginner, Part 2<\/title>\n<meta name=\"description\" content=\"The problem So after a few days I could get back to my little Recaps project. I started with checking logs and found something like this: &nbsp;\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2013\/05\/heroku-and-java-from-newbie-to-beginner-part-2.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Heroku and Java - From Newbie to Beginner, Part 2\" \/>\n<meta property=\"og:description\" content=\"The problem So after a few days I could get back to my little Recaps project. I started with checking logs and found something like this: &nbsp;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2013\/05\/heroku-and-java-from-newbie-to-beginner-part-2.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:author\" content=\"http:\/\/www.facebook.com\/piotr.buda\" \/>\n<meta property=\"article:published_time\" content=\"2013-05-21T07:00:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/heroku-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Piotr Buda\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@http:\/\/twitter.com\/#!\/piotrbuda\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Piotr Buda\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/heroku-and-java-from-newbie-to-beginner-part-2.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/heroku-and-java-from-newbie-to-beginner-part-2.html\"},\"author\":{\"name\":\"Piotr Buda\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/fc5d484f59d645fb307c366571ba6867\"},\"headline\":\"Heroku and Java &#8211; From Newbie to Beginner, Part 2\",\"datePublished\":\"2013-05-21T07:00:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/heroku-and-java-from-newbie-to-beginner-part-2.html\"},\"wordCount\":516,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/heroku-and-java-from-newbie-to-beginner-part-2.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/heroku-logo.jpg\",\"keywords\":[\"Cloud\",\"Heroku\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/heroku-and-java-from-newbie-to-beginner-part-2.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/heroku-and-java-from-newbie-to-beginner-part-2.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/heroku-and-java-from-newbie-to-beginner-part-2.html\",\"name\":\"Heroku and Java - From Newbie to Beginner, Part 2\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/heroku-and-java-from-newbie-to-beginner-part-2.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/heroku-and-java-from-newbie-to-beginner-part-2.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/heroku-logo.jpg\",\"datePublished\":\"2013-05-21T07:00:43+00:00\",\"description\":\"The problem So after a few days I could get back to my little Recaps project. I started with checking logs and found something like this: &nbsp;\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/heroku-and-java-from-newbie-to-beginner-part-2.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/heroku-and-java-from-newbie-to-beginner-part-2.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/heroku-and-java-from-newbie-to-beginner-part-2.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/heroku-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/heroku-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/heroku-and-java-from-newbie-to-beginner-part-2.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Heroku and Java &#8211; From Newbie to Beginner, Part 2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/fc5d484f59d645fb307c366571ba6867\",\"name\":\"Piotr Buda\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4e0d884fb082b07a03a46aa53e7f8a2ad01fe907890b5c2d9dbcba067b316035?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4e0d884fb082b07a03a46aa53e7f8a2ad01fe907890b5c2d9dbcba067b316035?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4e0d884fb082b07a03a46aa53e7f8a2ad01fe907890b5c2d9dbcba067b316035?s=96&d=mm&r=g\",\"caption\":\"Piotr Buda\"},\"sameAs\":[\"http:\\\/\\\/piotrbuda.eu\\\/\",\"http:\\\/\\\/www.facebook.com\\\/piotr.buda\",\"http:\\\/\\\/pl.linkedin.com\\\/in\\\/piotrbuda\",\"https:\\\/\\\/x.com\\\/http:\\\/\\\/twitter.com\\\/#!\\\/piotrbuda\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/piotr-buda\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Heroku and Java - From Newbie to Beginner, Part 2","description":"The problem So after a few days I could get back to my little Recaps project. I started with checking logs and found something like this: &nbsp;","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2013\/05\/heroku-and-java-from-newbie-to-beginner-part-2.html","og_locale":"en_US","og_type":"article","og_title":"Heroku and Java - From Newbie to Beginner, Part 2","og_description":"The problem So after a few days I could get back to my little Recaps project. I started with checking logs and found something like this: &nbsp;","og_url":"https:\/\/www.javacodegeeks.com\/2013\/05\/heroku-and-java-from-newbie-to-beginner-part-2.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_author":"http:\/\/www.facebook.com\/piotr.buda","article_published_time":"2013-05-21T07:00:43+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/heroku-logo.jpg","type":"image\/jpeg"}],"author":"Piotr Buda","twitter_card":"summary_large_image","twitter_creator":"@http:\/\/twitter.com\/#!\/piotrbuda","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Piotr Buda","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2013\/05\/heroku-and-java-from-newbie-to-beginner-part-2.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/05\/heroku-and-java-from-newbie-to-beginner-part-2.html"},"author":{"name":"Piotr Buda","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/fc5d484f59d645fb307c366571ba6867"},"headline":"Heroku and Java &#8211; From Newbie to Beginner, Part 2","datePublished":"2013-05-21T07:00:43+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/05\/heroku-and-java-from-newbie-to-beginner-part-2.html"},"wordCount":516,"commentCount":1,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/05\/heroku-and-java-from-newbie-to-beginner-part-2.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/heroku-logo.jpg","keywords":["Cloud","Heroku"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2013\/05\/heroku-and-java-from-newbie-to-beginner-part-2.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2013\/05\/heroku-and-java-from-newbie-to-beginner-part-2.html","url":"https:\/\/www.javacodegeeks.com\/2013\/05\/heroku-and-java-from-newbie-to-beginner-part-2.html","name":"Heroku and Java - From Newbie to Beginner, Part 2","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/05\/heroku-and-java-from-newbie-to-beginner-part-2.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/05\/heroku-and-java-from-newbie-to-beginner-part-2.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/heroku-logo.jpg","datePublished":"2013-05-21T07:00:43+00:00","description":"The problem So after a few days I could get back to my little Recaps project. I started with checking logs and found something like this: &nbsp;","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/05\/heroku-and-java-from-newbie-to-beginner-part-2.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2013\/05\/heroku-and-java-from-newbie-to-beginner-part-2.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2013\/05\/heroku-and-java-from-newbie-to-beginner-part-2.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/heroku-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/heroku-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2013\/05\/heroku-and-java-from-newbie-to-beginner-part-2.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Heroku and Java &#8211; From Newbie to Beginner, Part 2"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/fc5d484f59d645fb307c366571ba6867","name":"Piotr Buda","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4e0d884fb082b07a03a46aa53e7f8a2ad01fe907890b5c2d9dbcba067b316035?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4e0d884fb082b07a03a46aa53e7f8a2ad01fe907890b5c2d9dbcba067b316035?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4e0d884fb082b07a03a46aa53e7f8a2ad01fe907890b5c2d9dbcba067b316035?s=96&d=mm&r=g","caption":"Piotr Buda"},"sameAs":["http:\/\/piotrbuda.eu\/","http:\/\/www.facebook.com\/piotr.buda","http:\/\/pl.linkedin.com\/in\/piotrbuda","https:\/\/x.com\/http:\/\/twitter.com\/#!\/piotrbuda"],"url":"https:\/\/www.javacodegeeks.com\/author\/piotr-buda"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/12998","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/432"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=12998"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/12998\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/134"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=12998"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=12998"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=12998"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}