{"action":"closed","issue":{"url":"https://api.github.com/repos/dooApp/FXForm2/issues/93","labels_url":"https://api.github.com/repos/dooApp/FXForm2/issues/93/labels{/name}","comments_url":"https://api.github.com/repos/dooApp/FXForm2/issues/93/comments","events_url":"https://api.github.com/repos/dooApp/FXForm2/issues/93/events","html_url":"https://github.com/dooApp/FXForm2/issues/93","id":53757999,"number":93,"title":"FXForm and bean validation in OSGI environment","user":{"login":"lanouettea","id":7469753,"avatar_url":"https://avatars.githubusercontent.com/u/7469753?v=3","gravatar_id":"","url":"https://api.github.com/users/lanouettea","html_url":"https://github.com/lanouettea","followers_url":"https://api.github.com/users/lanouettea/followers","following_url":"https://api.github.com/users/lanouettea/following{/other_user}","gists_url":"https://api.github.com/users/lanouettea/gists{/gist_id}","starred_url":"https://api.github.com/users/lanouettea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lanouettea/subscriptions","organizations_url":"https://api.github.com/users/lanouettea/orgs","repos_url":"https://api.github.com/users/lanouettea/repos","events_url":"https://api.github.com/users/lanouettea/events{/privacy}","received_events_url":"https://api.github.com/users/lanouettea/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dooApp/FXForm2/labels/technical%20task","name":"technical task","color":"5319e7"}],"state":"closed","locked":false,"assignee":{"login":"amischler","id":825294,"avatar_url":"https://avatars.githubusercontent.com/u/825294?v=3","gravatar_id":"","url":"https://api.github.com/users/amischler","html_url":"https://github.com/amischler","followers_url":"https://api.github.com/users/amischler/followers","following_url":"https://api.github.com/users/amischler/following{/other_user}","gists_url":"https://api.github.com/users/amischler/gists{/gist_id}","starred_url":"https://api.github.com/users/amischler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amischler/subscriptions","organizations_url":"https://api.github.com/users/amischler/orgs","repos_url":"https://api.github.com/users/amischler/repos","events_url":"https://api.github.com/users/amischler/events{/privacy}","received_events_url":"https://api.github.com/users/amischler/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/dooApp/FXForm2/milestones/17","labels_url":"https://api.github.com/repos/dooApp/FXForm2/milestones/17/labels","id":834554,"number":17,"title":"8.0.8","description":"","creator":{"login":"amischler","id":825294,"avatar_url":"https://avatars.githubusercontent.com/u/825294?v=3","gravatar_id":"","url":"https://api.github.com/users/amischler","html_url":"https://github.com/amischler","followers_url":"https://api.github.com/users/amischler/followers","following_url":"https://api.github.com/users/amischler/following{/other_user}","gists_url":"https://api.github.com/users/amischler/gists{/gist_id}","starred_url":"https://api.github.com/users/amischler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amischler/subscriptions","organizations_url":"https://api.github.com/users/amischler/orgs","repos_url":"https://api.github.com/users/amischler/repos","events_url":"https://api.github.com/users/amischler/events{/privacy}","received_events_url":"https://api.github.com/users/amischler/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":5,"state":"open","created_at":"2014-10-21T15:07:13Z","updated_at":"2015-02-24T09:23:55Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2015-01-08T14:48:31Z","updated_at":"2015-02-24T09:23:55Z","closed_at":"2015-02-24T09:23:55Z","body":"I'm using FXForms 2 in a OSGI environment to generate forms. Classloader are very restrictive in OSGI, and the standard way of finding a validator instance in the classpath simply does not work and will give the error:\r\n\r\njavax.validation.ValidationException: Unable to create a Configuration, because no Bean Validation provider could be found. Add a provider like Hibernate Validator (RI) to your classpath.\r\n\r\nThis is expected, and is OK. I worked around this by implementing my own FXFormValidator, extending FXForm and setting my validator in my extended class constructor. Now I can successfully validate beans in my FX Forms.\r\n\r\nHowever, when I create my extended FXForm, the AbstractFXForm get instanciated. It contains the fxFormValidator member, which gets instanciated to a DefaultFXFormValidator. When the DefaultFXFormValidator gets created, it looks for a validator instance in the classpath, then cannot find it and log the stacktrace (line 54 of DefaultFXFormValidator).\r\n\r\nThis causes my logs to get filled with stacktraces everytime I create a form, before I override the form validator to my own. This is problematic and could be fixed by either:\r\n\r\n1 - removing the log entry from the DefaultFXFormValidator;\r\n2 - Do not instanciate the form validator at form instance creation, but only the first time a validation needs to be executed. "}}