jbonofre opened a new issue, #44:
URL: https://github.com/apache/karaf-minho/issues/44

   With the `minho-spring-boot` application manager, the user can load several 
spring-boot application via the `ConfigService#Applications`. For instance, he 
can define spring-boot applications via `minho.json` file:
   
   ```json
   {
     "applications": [
       {
         "name": "one-app",
         "type": "spring-boot",
         "url": "file:./app/my-spring-boot-app-1.0-SNAPSHOT.jar",
         "properties": {
           "args": "--server.port=8181"
         }
       }
     ]
   }
   ```
   
   If the `minho-spring-boot` application manager doesn't find the jar on the 
provided `url`, the user get this error:
   
   ```
   INFO: Starting Spring Boot module 
file:./app/my-spring-boot-app-1.0-SNAPSHOT.jar
   Exception in thread "main" java.lang.IllegalStateException: Can't start 
lifecycle service
           at 
org.apache.karaf.minho.boot.service.LifeCycleService.start(LifeCycleService.java:66)
           at 
org.apache.karaf.minho.boot.service.ServiceRegistry.lambda$start$2(ServiceRegistry.java:128)
           at java.base/java.util.Optional.ifPresent(Optional.java:178)
           at 
org.apache.karaf.minho.boot.service.ServiceRegistry.start(ServiceRegistry.java:126)
           at org.apache.karaf.minho.boot.Minho.start(Minho.java:59)
           at org.apache.karaf.minho.boot.Main.main(Main.java:63)
           Suppressed: java.lang.RuntimeException: Can't start Spring Boot 
module file:./app/my-spring-boot-app-1.0-SNAPSHOT.jar
                   at 
org.apache.karaf.minho.springboot.SpringBootApplicationManagerService.lambda$onRegister$0(SpringBootApplicationManagerService.java:57)
                   at java.base/java.lang.Iterable.forEach(Iterable.java:75)
                   at 
org.apache.karaf.minho.springboot.SpringBootApplicationManagerService.lambda$onRegister$1(SpringBootApplicationManagerService.java:53)
                   at 
org.apache.karaf.minho.boot.service.LifeCycleService.lambda$start$0(LifeCycleService.java:69)
                   at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
                   at 
org.apache.karaf.minho.boot.service.LifeCycleService.start(LifeCycleService.java:67)
                   ... 5 more
           Caused by: java.lang.ClassNotFoundException: 
org.springframework.boot.loader.JarLauncher
                   at 
java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
                   at 
java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:587)
                   at 
java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
                   at 
org.apache.karaf.minho.springboot.SpringBootApplicationManagerService.start(SpringBootApplicationManagerService.java:106)
                   at 
org.apache.karaf.minho.springboot.SpringBootApplicationManagerService.lambda$onRegister$0(SpringBootApplicationManagerService.java:55)
                   ... 10 more
   ```
   
   It could be confusing as the problem is not really `ClassNotFoundException: 
org.springframework.boot.loader.JarLauncher` but actually the application jar 
file is not found.
   
   The `minho-spring-boot` application manager should first check if the jar 
exists on the provided URL and throw a clean message if not.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@karaf.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to