{"action":"opened","issue":{"url":"https://api.github.com/repos/bijugs/jmxtrans-cookbook/issues/7","labels_url":"https://api.github.com/repos/bijugs/jmxtrans-cookbook/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/bijugs/jmxtrans-cookbook/issues/7/comments","events_url":"https://api.github.com/repos/bijugs/jmxtrans-cookbook/issues/7/events","html_url":"https://github.com/bijugs/jmxtrans-cookbook/issues/7","id":66215068,"number":7,"title":"It is not clear java is needed to be managed outside of this cookbook","user":{"login":"zarry","id":3260211,"avatar_url":"https://avatars.githubusercontent.com/u/3260211?v=3","gravatar_id":"","url":"https://api.github.com/users/zarry","html_url":"https://github.com/zarry","followers_url":"https://api.github.com/users/zarry/followers","following_url":"https://api.github.com/users/zarry/following{/other_user}","gists_url":"https://api.github.com/users/zarry/gists{/gist_id}","starred_url":"https://api.github.com/users/zarry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zarry/subscriptions","organizations_url":"https://api.github.com/users/zarry/orgs","repos_url":"https://api.github.com/users/zarry/repos","events_url":"https://api.github.com/users/zarry/events{/privacy}","received_events_url":"https://api.github.com/users/zarry/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-03T19:37:37Z","updated_at":"2015-04-03T19:37:37Z","closed_at":null,"body":"When first using this cookbook, if you do not previously install and configure java the execute block for update-alternatives fails.\r\n\r\nAfter installing java the cookbook properly converged.  I would either update the readme to specify that java needs to be managed independently from this cookbook or update the cookbook to manage a  java version.  \r\n\r\n\r\nError below...\r\n\r\n```\r\n==> chub_jmxtrans: ================================================================================\r\n==> chub_jmxtrans: Error executing action `run` on resource 'execute[set correct jps alternative]'\r\n==> chub_jmxtrans: ================================================================================\r\n==> chub_jmxtrans:\r\n==> chub_jmxtrans:\r\n==> chub_jmxtrans: Mixlib::ShellOut::ShellCommandFailed\r\n==> chub_jmxtrans: ------------------------------------\r\n==> chub_jmxtrans: Expected process to exit with [0], but received '2'\r\n==> chub_jmxtrans:\r\n==> chub_jmxtrans: ---- Begin output of update-alternatives jps --auto jps ----\r\n==> chub_jmxtrans:\r\n==> chub_jmxtrans: STDOUT:\r\n==> chub_jmxtrans:\r\n==> chub_jmxtrans: STDERR: update-alternatives: error: unknown argument `jps'\r\n==> chub_jmxtrans:\r\n==> chub_jmxtrans: ---- End output of update-alternatives jps --auto jps ----\r\n==> chub_jmxtrans:\r\n==> chub_jmxtrans: Ran update-alternatives jps --auto jps returned 2\r\n==> chub_jmxtrans:\r\n==> chub_jmxtrans: Resource Declaration:\r\n==> chub_jmxtrans: ---------------------\r\n==> chub_jmxtrans: # In /tmp/vagrant-chef/ac8c3f11f4d0fda7770beb101dfde37f/cookbooks/jmxtrans/recipes/default.rb\r\n==> chub_jmxtrans:\r\n==> chub_jmxtrans: 108: execute \"set correct jps alternative\" do\r\n==> chub_jmxtrans: 109:   command \"update-alternatives jps --auto jps\"\r\n==> chub_jmxtrans: 110:   creates \"/usr/bin/jps\"\r\n==> chub_jmxtrans: 111: end\r\n==> chub_jmxtrans: 112:\r\n==> chub_jmxtrans:\r\n==> chub_jmxtrans: Compiled Resource:\r\n==> chub_jmxtrans: ------------------\r\n==> chub_jmxtrans: # Declared in /tmp/vagrant-chef/ac8c3f11f4d0fda7770beb101dfde37f/cookbooks/jmxtrans/recipes/default.rb:108:in `from_file'\r\n==> chub_jmxtrans:\r\n==> chub_jmxtrans: execute(\"set correct jps alternative\") do\r\n==> chub_jmxtrans:   action \"run\"\r\n==> chub_jmxtrans:   retries 0\r\n==> chub_jmxtrans:   retry_delay 2\r\n==> chub_jmxtrans:   guard_interpreter :default\r\n==> chub_jmxtrans:   command \"update-alternatives jps --auto jps\"\r\n==> chub_jmxtrans:   backup 5\r\n==> chub_jmxtrans:   creates \"/usr/bin/jps\"\r\n==> chub_jmxtrans:   returns 0\r\n==> chub_jmxtrans:   cookbook_name :jmxtrans\r\n==> chub_jmxtrans:   recipe_name \"default\"\r\n==> chub_jmxtrans: end\r\n==> chub_jmxtrans:\r\n```\r\n\r\n"}}