{"action":"created","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-core/issues/927","labels_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/927/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/927/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/927/events","html_url":"https://github.com/swagger-api/swagger-core/issues/927","id":63848011,"number":927,"title":"1.5.3 Null Exception in BeanConfig.configure (Jersey2)","user":{"login":"todd-richmond","id":2679318,"avatar_url":"https://avatars.githubusercontent.com/u/2679318?v=3","gravatar_id":"","url":"https://api.github.com/users/todd-richmond","html_url":"https://github.com/todd-richmond","followers_url":"https://api.github.com/users/todd-richmond/followers","following_url":"https://api.github.com/users/todd-richmond/following{/other_user}","gists_url":"https://api.github.com/users/todd-richmond/gists{/gist_id}","starred_url":"https://api.github.com/users/todd-richmond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/todd-richmond/subscriptions","organizations_url":"https://api.github.com/users/todd-richmond/orgs","repos_url":"https://api.github.com/users/todd-richmond/repos","events_url":"https://api.github.com/users/todd-richmond/events{/privacy}","received_events_url":"https://api.github.com/users/todd-richmond/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-03-23T22:24:07Z","updated_at":"2015-03-24T00:27:11Z","closed_at":null,"body":"I upgraded to 1.5.3 from 1.5.2 and am getting a NPE in BeanConfig.java. Code is using Jersey2 ResourceConfig and crashes when extracting swagger.json\r\n\r\n            // configure Swagger\r\n        BeanConfig beanConfig = new BeanConfig();\r\n\r\n        beanConfig.setBasePath(\"/api\");\r\n        beanConfig.setContact(\"support@example.com\");\r\n        beanConfig.setDescription(\"REST API);\r\n        beanConfig.setLicenseUrl(\"http://www.apache.org/licenses/LICENSE-2.0.html\");\r\n        beanConfig.setResourcePackage(\"com.example\");\r\n        beanConfig.setTermsOfServiceUrl(\"https://www.example.com/resources/eula\");\r\n        beanConfig.setTitle(\"REST API\");\r\n        beanConfig.setVersion(\"1.0.0\");\r\n        beanConfig.setScan(true);\r\n        packages(\"com.wordnik.swagger.jaxrs.json\");\r\n        packages(\"com.wordnik.swagger.jersey.listing\");\r\n\r\n\r\n    at com.wordnik.swagger.jaxrs.config.BeanConfig.configure(BeanConfig.java:198)\r\n\tat com.wordnik.swagger.jaxrs.listing.ApiListingResource.scan(ApiListingResource.java:52)\r\n\tat com.wordnik.swagger.jaxrs.listing.ApiListingResource.getListingJson(ApiListingResource.java:79)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:606)"},"comment":{"url":"https://api.github.com/repos/swagger-api/swagger-core/issues/comments/85257818","html_url":"https://github.com/swagger-api/swagger-core/issues/927#issuecomment-85257818","issue_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/927","id":85257818,"user":{"login":"fehguy","id":249413,"avatar_url":"https://avatars.githubusercontent.com/u/249413?v=3","gravatar_id":"","url":"https://api.github.com/users/fehguy","html_url":"https://github.com/fehguy","followers_url":"https://api.github.com/users/fehguy/followers","following_url":"https://api.github.com/users/fehguy/following{/other_user}","gists_url":"https://api.github.com/users/fehguy/gists{/gist_id}","starred_url":"https://api.github.com/users/fehguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fehguy/subscriptions","organizations_url":"https://api.github.com/users/fehguy/orgs","repos_url":"https://api.github.com/users/fehguy/repos","events_url":"https://api.github.com/users/fehguy/events{/privacy}","received_events_url":"https://api.github.com/users/fehguy/received_events","type":"User","site_admin":false},"created_at":"2015-03-24T00:27:11Z","updated_at":"2015-03-24T00:27:11Z","body":"I don't see anything wrong in here.  I'm guessing this will help:\r\n\r\nhttps://github.com/swagger-api/swagger-core/tree/develop_2.0/samples/java-jaxrs-no-webxml\r\n\r\nSpecifically, my guess is we're missing these lines in your bootstrap:\r\n\r\nhttps://github.com/swagger-api/swagger-core/blob/develop_2.0/samples/java-jaxrs-no-webxml/src/main/java/com/wordnik/swagger/sample/Bootstrap.java#L17-L19\r\n\r\n```java\r\n  public void init(ServletConfig config) throws ServletException {\r\n    ReflectiveJaxrsScanner scanner = new ReflectiveJaxrsScanner();\r\n    scanner.setResourcePackage(\"com.wordnik.swagger.sample.resource\");\r\n    ScannerFactory.setScanner(scanner);\r\n    Info info = new Info()\r\n      .title(\"Swagger Sample App\")\r\n///\r\n```"}}