{"action":"closed","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1748","repository_url":"https://api.github.com/repos/swagger-api/swagger-core","labels_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1748/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1748/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1748/events","html_url":"https://github.com/swagger-api/swagger-core/issues/1748","id":147774483,"number":1748,"title":"Jersey + Guice + Swagger seems to be playing bad.","user":{"login":"blommish","id":937168,"avatar_url":"https://avatars.githubusercontent.com/u/937168?v=3","gravatar_id":"","url":"https://api.github.com/users/blommish","html_url":"https://github.com/blommish","followers_url":"https://api.github.com/users/blommish/followers","following_url":"https://api.github.com/users/blommish/following{/other_user}","gists_url":"https://api.github.com/users/blommish/gists{/gist_id}","starred_url":"https://api.github.com/users/blommish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blommish/subscriptions","organizations_url":"https://api.github.com/users/blommish/orgs","repos_url":"https://api.github.com/users/blommish/repos","events_url":"https://api.github.com/users/blommish/events{/privacy}","received_events_url":"https://api.github.com/users/blommish/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-12T14:45:44Z","updated_at":"2016-04-12T16:37:26Z","closed_at":"2016-04-12T16:37:26Z","body":"I have an application running Jersey (2.22.1) + Guice.\r\n\r\nOnce I just add the dependency to swagger(swagger-jersey2-jaxrs 1.5.0), it fails to start the server - just getting a weird stack dump\r\n\r\n`-----Start of DE processing------ = [4/12/16 16:36:14:909 CEST]\r\nException = com.ibm.ws.container.service.state.StateChangeException\r\nSource = com.ibm.ws.app.manager.web.internal.WebModuleHandlerImpl\r\nprobeid = 104\r\nStack Dump = com.ibm.ws.container.service.state.StateChangeException: com.ibm.ws.container.service.state.StateChangeException: startWebApplication\r\n\tat com.ibm.ws.webcontainer.osgi.WebContainer.startModule(WebContainer.java:835)\r\n\tat com.ibm.ws.app.manager.web.internal.WebModuleHandlerImpl.deployModule(WebModuleHandlerImpl.java:103)\r\n\tat com.ibm.ws.app.manager.module.internal.DeployedAppInfoBase.deployModule(DeployedAppInfoBase.java:871)\r\n\tat com.ibm.ws.app.manager.module.internal.DeployedAppInfoBase.deployModules(DeployedAppInfoBase.java:831)\r\n\tat com.ibm.ws.app.manager.module.internal.DeployedAppInfoBase.deployApp(DeployedAppInfoBase.java:818)\r\n\tat com.ibm.ws.app.manager.war.internal.WARApplicationHandlerImpl.install(WARApplicationHandlerImpl.java:66)\r\n\tat com.ibm.ws.app.manager.internal.statemachine.StartAction.execute(StartAction.java:141)\r\n\tat com.ibm.ws.app.manager.internal.statemachine.ApplicationStateMachineImpl.enterState(ApplicationStateMachineImpl.java:1192)\r\n\tat com.ibm.ws.app.manager.internal.statemachine.ApplicationStateMachineImpl.run(ApplicationStateMachineImpl.java:805)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1143)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:618)\r\n\tat java.lang.Thread.run(Thread.java:785)\r\nCaused by: com.ibm.ws.container.service.state.StateChangeException: startWebApplication\r\n\tat com.ibm.ws.webcontainer.osgi.WebContainer.startModule(WebContainer.java:825)\r\n\t... 11 more\r\n`\r\n\r\n\r\nMy application extends an abstract class which contains among other things:\r\n\r\n    public CommonApplication(ServiceLocator serviceLocator) {\r\n        LOG.info(\"Initializing service\");\r\n\r\n        if (getPackagesToBeScannedByJersey() != null) {\r\n            packages(getPackagesToBeScannedByJersey());\r\n        }\r\n\r\n        GuiceBridge.getGuiceBridge().initializeGuiceBridge(serviceLocator);\r\n        GuiceIntoHK2Bridge guiceBridge = serviceLocator.getService(GuiceIntoHK2Bridge.class);\r\n\r\n        List<Module> modules = createListOfModules();\r\n\r\n        registerFilters();\r\n\r\n        Injector app = Guice.createInjector(modules);\r\n        guiceBridge.bridgeGuiceInjector(app);\r\n        Config.setConfigFile(getAppName() + \".Config.properties\");\r\n    }\r\n\r\nweb.xml\r\n\r\n    \t<display-name>TestServiceApplication</display-name>\r\n\r\n\t  <servlet>\r\n\t\t<servlet-name>Jersey Web Application</servlet-name>\r\n\t\t<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>\r\n\r\n\t\t<init-param>\r\n\t\t  <param-name>javax.ws.rs.Application</param-name>\r\n\t\t  <param-value>test.services.template.TestServiceApplication</param-value>\r\n\t\t</init-param>\r\n\r\n\t\t<init-param>\r\n\t\t  <!-- With WebSphere, to see the service response in case of errors instead of the\r\n\t\t  Websphere default error page, Jersey has to be configured in this way.\r\n\t\t  https://java.net/jira/browse/JERSEY-2521 -->\r\n\t\t  <param-name>jersey.config.server.response.setStatusOverSendError</param-name>\r\n\t\t  <param-value>true</param-value>\r\n\t\t</init-param>\r\n\t\t<load-on-startup>1</load-on-startup>\r\n\t  </servlet>\r\n\t  <servlet-mapping>\r\n\t\t<servlet-name>Jersey Web Application</servlet-name>\r\n\t\t<url-pattern>/api/*</url-pattern>\r\n\t  </servlet-mapping>\r\n\r\n\r\n\t  <filter>\r\n\t  <filter-name>guiceFilter</filter-name>\r\n\t  <filter-class>com.google.inject.servlet.GuiceFilter</filter-class>\r\n\t  </filter>\r\n\r\n\t  <filter-mapping>\r\n\t  <filter-name>guiceFilter</filter-name>\r\n\t  <url-pattern>/api/*</url-pattern>\r\n\t  </filter-mapping>\r\n\r\nDependencies:\r\n\r\n\t<dependency>\r\n\t  <groupId>com.google.inject.extensions</groupId>\r\n\t  <artifactId>guice-servlet</artifactId>\r\n\t  <version>3.0</version>\r\n\t</dependency>\r\n\t<dependency>\r\n\t  <groupId>org.glassfish.hk2</groupId>\r\n\t  <artifactId>guice-bridge</artifactId>\r\n\t  <version>2.4.0-b31</version>\r\n\t</dependency>\r\n\t<dependency>\r\n\t  <groupId>com.google.inject.extensions</groupId>\r\n\t  <artifactId>guice-multibindings</artifactId>\r\n\t  <version>3.0</version>\r\n\t</dependency>\r\n\r\n#1619 "}}