{"action":"created","issue":{"url":"https://api.github.com/repos/apache/incubator-brooklyn/issues/1089","labels_url":"https://api.github.com/repos/apache/incubator-brooklyn/issues/1089/labels{/name}","comments_url":"https://api.github.com/repos/apache/incubator-brooklyn/issues/1089/comments","events_url":"https://api.github.com/repos/apache/incubator-brooklyn/issues/1089/events","html_url":"https://github.com/apache/incubator-brooklyn/pull/1089","id":120371144,"number":1089,"title":"tryLoadClass: return optional.absent on NoClassDefFoundError","user":{"login":"aledsage","id":593113,"avatar_url":"https://avatars.githubusercontent.com/u/593113?v=3","gravatar_id":"","url":"https://api.github.com/users/aledsage","html_url":"https://github.com/aledsage","followers_url":"https://api.github.com/users/aledsage/followers","following_url":"https://api.github.com/users/aledsage/following{/other_user}","gists_url":"https://api.github.com/users/aledsage/gists{/gist_id}","starred_url":"https://api.github.com/users/aledsage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aledsage/subscriptions","organizations_url":"https://api.github.com/users/aledsage/orgs","repos_url":"https://api.github.com/users/aledsage/repos","events_url":"https://api.github.com/users/aledsage/events{/privacy}","received_events_url":"https://api.github.com/users/aledsage/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-04T10:11:34Z","updated_at":"2015-12-04T10:14:41Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/incubator-brooklyn/pulls/1089","html_url":"https://github.com/apache/incubator-brooklyn/pull/1089","diff_url":"https://github.com/apache/incubator-brooklyn/pull/1089.diff","patch_url":"https://github.com/apache/incubator-brooklyn/pull/1089.patch"},"body":"We encountered this error when there were a Java entity in `lib/dropins` that still referenced the old `brooklyn.entity.basic.StartableApplication\" (i.e. it had not been recompiled, with its source code updated).\r\n\r\nThe consequence was that `GET /v1/catalog/applications` failed, so no catalog items were displayed in the web-console. Also, the exception gives no indication of which catalog item the error came from (we unpacked all the jars, and did a string search across them to find it!).\r\n\r\nWith this fix, we'll get the log.debug that says which catalog item the error came from. The catalog item will be excluded from the list, and the other catalog items returned.\r\n\r\nIdeally I'd like something better than just a `log.debug` to tell the user of this serious problem. Not convinced that `JavaBrooklynClassLoadingContext` is the right place to log.warn etc though.\r\n\r\nI suggest we merge this, and then think about how to log better in a subsequent PR."},"comment":{"url":"https://api.github.com/repos/apache/incubator-brooklyn/issues/comments/161929248","html_url":"https://github.com/apache/incubator-brooklyn/pull/1089#issuecomment-161929248","issue_url":"https://api.github.com/repos/apache/incubator-brooklyn/issues/1089","id":161929248,"user":{"login":"ygy","id":5411899,"avatar_url":"https://avatars.githubusercontent.com/u/5411899?v=3","gravatar_id":"","url":"https://api.github.com/users/ygy","html_url":"https://github.com/ygy","followers_url":"https://api.github.com/users/ygy/followers","following_url":"https://api.github.com/users/ygy/following{/other_user}","gists_url":"https://api.github.com/users/ygy/gists{/gist_id}","starred_url":"https://api.github.com/users/ygy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ygy/subscriptions","organizations_url":"https://api.github.com/users/ygy/orgs","repos_url":"https://api.github.com/users/ygy/repos","events_url":"https://api.github.com/users/ygy/events{/privacy}","received_events_url":"https://api.github.com/users/ygy/received_events","type":"User","site_admin":false},"created_at":"2015-12-04T10:14:41Z","updated_at":"2015-12-04T10:14:41Z","body":"LGTM. Tested in a production setup scenario."}}