{"id":316,"date":"2017-03-20T13:38:58","date_gmt":"2017-03-20T13:38:58","guid":{"rendered":"https:\/\/sidroniolima.com.br\/blog\/?p=316"},"modified":"2017-03-20T13:38:58","modified_gmt":"2017-03-20T13:38:58","slug":"java-schedule-error","status":"publish","type":"post","link":"https:\/\/sidroniolima.com.br\/blog\/2017\/03\/20\/java-schedule-error\/","title":{"rendered":"Java @Schedule error"},"content":{"rendered":"\n<div class=\"twitter-share\"><a href=\"https:\/\/twitter.com\/intent\/tweet?via=sidroniolima\" class=\"twitter-share-button\">Tweet<\/a><\/div>\n<p>I was trying to scheduling a method from a EJB class using the @Schedule annotation of the javax.ejb package.<\/p>\n<p>@Schedule(second=&#8221;*\/5&#8243;, minute=&#8221;*&#8221;, hour=&#8221;*&#8221;)<br \/>\npublic void listarMsgs()<br \/>\n{<br \/>\nlogger.log(Level.INFO, &#8220;do something&#8230;&#8221;);<br \/>\n}<\/p>\n<p>But every time the method was called it\u00a0 appeared a error like this:<\/p>\n<p>Failed to reinstate timer&#8230;<\/p>\n<p>Googling for about some time I figure out that it was a kind bug of the application server, JBoss Wildfly. I&#8217;m using the 9 version.<\/p>\n<p>The solution was clear the folder under the standalone\/data\/timer-service-data that is where the server creates the xml of the schedule job.<\/p>\n\n<div class=\"twitter-share\"><a href=\"https:\/\/twitter.com\/intent\/tweet?via=sidroniolima\" class=\"twitter-share-button\">Tweet<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>I was trying to scheduling a method from a EJB class using the @Schedule annotation of the javax.ejb package. @Schedule(second=&#8221;*\/5&#8243;, minute=&#8221;*&#8221;, hour=&#8221;*&#8221;) public void listarMsgs() { logger.log(Level.INFO, &#8220;do something&#8230;&#8221;); } But every time the method was called it\u00a0 appeared a error like this: Failed to reinstate timer&#8230; Googling for about some time I figure out [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[27],"tags":[60,62,29,61,28],"class_list":["post-316","post","type-post","status-publish","format-standard","hentry","category-java","tag-ejb","tag-error","tag-java","tag-schedule","tag-wildfly"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/sidroniolima.com.br\/blog\/wp-json\/wp\/v2\/posts\/316","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sidroniolima.com.br\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sidroniolima.com.br\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sidroniolima.com.br\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sidroniolima.com.br\/blog\/wp-json\/wp\/v2\/comments?post=316"}],"version-history":[{"count":2,"href":"https:\/\/sidroniolima.com.br\/blog\/wp-json\/wp\/v2\/posts\/316\/revisions"}],"predecessor-version":[{"id":318,"href":"https:\/\/sidroniolima.com.br\/blog\/wp-json\/wp\/v2\/posts\/316\/revisions\/318"}],"wp:attachment":[{"href":"https:\/\/sidroniolima.com.br\/blog\/wp-json\/wp\/v2\/media?parent=316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sidroniolima.com.br\/blog\/wp-json\/wp\/v2\/categories?post=316"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sidroniolima.com.br\/blog\/wp-json\/wp\/v2\/tags?post=316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}