{"action":"created","issue":{"url":"https://api.github.com/repos/vert-x3/vertx-web/issues/104","labels_url":"https://api.github.com/repos/vert-x3/vertx-web/issues/104/labels{/name}","comments_url":"https://api.github.com/repos/vert-x3/vertx-web/issues/104/comments","events_url":"https://api.github.com/repos/vert-x3/vertx-web/issues/104/events","html_url":"https://github.com/vert-x3/vertx-web/issues/104","id":72966722,"number":104,"title":"FileNotFoundException when using Apex in a Springboot application","user":{"login":"ufoscout","id":960885,"avatar_url":"https://avatars.githubusercontent.com/u/960885?v=3","gravatar_id":"","url":"https://api.github.com/users/ufoscout","html_url":"https://github.com/ufoscout","followers_url":"https://api.github.com/users/ufoscout/followers","following_url":"https://api.github.com/users/ufoscout/following{/other_user}","gists_url":"https://api.github.com/users/ufoscout/gists{/gist_id}","starred_url":"https://api.github.com/users/ufoscout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ufoscout/subscriptions","organizations_url":"https://api.github.com/users/ufoscout/orgs","repos_url":"https://api.github.com/users/ufoscout/repos","events_url":"https://api.github.com/users/ufoscout/events{/privacy}","received_events_url":"https://api.github.com/users/ufoscout/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-05-04T09:09:30Z","updated_at":"2015-06-09T14:48:45Z","closed_at":null,"body":"Hi all, \r\n\r\nI am preparing a demo to show how to embed Vertx and Apex in a springboot application.\r\nThe small demo code can be found here:\r\nhttps://github.com/ufoscout/demo-springboot-vertx3\r\n\r\nThe application has three modules:\r\n- \"backend\" is the module where apex is started as a spring bean and configured to serve static resources from \"webroot\" (See: https://github.com/ufoscout/demo-springboot-vertx3/blob/master/backend/src/main/java/demo/config/ApexConfig.java);\r\n- \"web\": is a jar that contains the webroot resources that are built with nodejs and then added in the classpath in the \"webroot\" folder;\r\n- \"build\" is where the springboot fat jar is created; it contains the backend and the web jars.\r\n\r\nThe issue is that, when the application is started and I try to access the localhost:8080/index.html page served by Apex, the following exception is thrown:\r\n```\r\nio.vertx.core.VertxException: java.io.FileNotFoundException: /pathToTheFolder/demo-springboot-vertx3/build/target/build-0.0.1-SNAPSHOT.jar!/lib/web-0.0.1-SNAPSHOT.jar (No such file or directory)\r\n        at io.vertx.core.impl.FileResolver.unpackFromJarURL(FileResolver.java:169)\r\n        at io.vertx.core.impl.FileResolver.resolveFile(FileResolver.java:107)\r\n        at io.vertx.core.impl.VertxImpl.resolveFile(VertxImpl.java:633)\r\n        at io.vertx.core.file.impl.FileSystemImpl$6.perform(FileSystemImpl.java:517)\r\n        at io.vertx.core.file.impl.FileSystemImpl$6.perform(FileSystemImpl.java:514)\r\n        at io.vertx.core.file.impl.FileSystemImpl.propsBlocking(FileSystemImpl.java:150)\r\n        at io.vertx.ext.apex.handler.impl.StaticHandlerImpl.getFileProps(StaticHandlerImpl.java:206)\r\n        at io.vertx.ext.apex.handler.impl.StaticHandlerImpl.handle(StaticHandlerImpl.java:164)\r\n        at io.vertx.ext.apex.handler.impl.StaticHandlerImpl.handle(StaticHandlerImpl.java:46)\r\n        at io.vertx.ext.apex.impl.RouteImpl.handleContext(RouteImpl.java:204)\r\n        at io.vertx.ext.apex.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:67)\r\n        at io.vertx.ext.apex.impl.RoutingContextImpl.next(RoutingContextImpl.java:98)\r\n        at io.vertx.ext.apex.impl.RouterImpl.accept(RouterImpl.java:61)\r\n\r\n```\r\nI expected Apex to find the webroot folder in the classpath but it seems that Apex is not able to access the web-0.0.1-SNAPSHOT.jar which is into the build-0.0.1-SNAPSHOT.jar. Of course the file is present.\r\nI am not sure of what is the cause of the issue and I am not even sure that it is a bug as it could be related to something not standard in the springboot way of creating the jar; however, I think that the use of Vertx/Apex within a spring application could become a popular configuration, so it could be worth to figure out how to solve this issue."},"comment":{"url":"https://api.github.com/repos/vert-x3/vertx-web/issues/comments/110389782","html_url":"https://github.com/vert-x3/vertx-web/issues/104#issuecomment-110389782","issue_url":"https://api.github.com/repos/vert-x3/vertx-web/issues/104","id":110389782,"user":{"login":"ufoscout","id":960885,"avatar_url":"https://avatars.githubusercontent.com/u/960885?v=3","gravatar_id":"","url":"https://api.github.com/users/ufoscout","html_url":"https://github.com/ufoscout","followers_url":"https://api.github.com/users/ufoscout/followers","following_url":"https://api.github.com/users/ufoscout/following{/other_user}","gists_url":"https://api.github.com/users/ufoscout/gists{/gist_id}","starred_url":"https://api.github.com/users/ufoscout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ufoscout/subscriptions","organizations_url":"https://api.github.com/users/ufoscout/orgs","repos_url":"https://api.github.com/users/ufoscout/repos","events_url":"https://api.github.com/users/ufoscout/events{/privacy}","received_events_url":"https://api.github.com/users/ufoscout/received_events","type":"User","site_admin":false},"created_at":"2015-06-09T14:48:45Z","updated_at":"2015-06-09T14:48:45Z","body":"> Are you sure it's not possible to put the resources directly into the spring boot fatjar? It seems very strange to have to wrap them in another jar first.\r\n\r\nI don't know if there is a way of setting it as you said. However, I think have found a workaround for the issue but I have to double check it. Hope to find some time for this today or tomorrow.\r\n"}}