Open carlspring opened 5 years ago
The link on Baeldung (Spring Boot Application as a Service) just shows how to manually register a SpringBoot executable jar on each of 4 OS - different manners - I doubt we will want to own that process of setting up in N different ways - it would be a full time job of support and testing.
Not sure what else is available for service wrappers. Its been quite some time needing one.
However, I would instead be in the camp of producing an executable spring boot jar and a really good set of HowTo docs to let consumers install it as a service themselves. it would simplify things in this project and push that burden out to the wild.
Users typically know how to install services in their own env better than we can try up front to do.
Actually, we need come up with an alternative of the JSW and it needs to provide (at least) service scripts. This has to be packaged as part of the strongbox-distribution
.
It's not a question of whether we'll do this. It's more of a question what we'll use as an analogue to the JSW.
seems we had spring-projects/spring-boot/issues/17796 within #1963 the exception was:
Exception (java.lang.NoClassDefFoundError) encountered during startup: org/apache/cassandra/utils/logging/LoggingSupportFactory
13:43:44.443 | I | main | o.e.j.server.handler.ContextHandler | Stopped o.s.b.w.e.j.JettyEmbeddedWebAppContext@382d71c7{application,/,[file:///home/sbespalov/projects/strongbox/strongbox/strongbox-distribution/target/strongbox-distribution-1.0-PR-62-SNAPSHOT/strongbox-1.0-PR-62-SNAPSHOT/tmp/jetty-docbase.8372384755488743334.48080/, jar:file:/home/sbespalov/projects/strongbox/strongbox/strongbox-distribution/target/strongbox-distribution-1.0-PR-62-SNAPSHOT/strongbox-1.0-PR-62-SNAPSHOT/lib/strongbox-web-core-1.0-PR-62-SNAPSHOT-spring-boot.jar!/BOOT-INF/lib/springfox-swagger-ui-2.9.2.jar!/META-INF/resources],UNAVAILABLE}
13:43:44.444 | I | main | com.hazelcast.core.LifecycleService | [192.168.2.46]:5701 [strongbox] [3.12.5] [192.168.2.46]:5701 is SHUTTING_DOWN
Exception in thread "ScheduledTasks:1" java.lang.NoClassDefFoundError: org/apache/cassandra/concurrent/DebuggableThreadPoolExecutor
at org.apache.cassandra.concurrent.DebuggableScheduledThreadPoolExecutor.afterExecute(DebuggableScheduledThreadPoolExecutor.java:89)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1131)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:834)
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:51)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52)
Caused by: java.lang.NoClassDefFoundError: ch/qos/logback/classic/spi/ThrowableProxy
at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:119)
at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:419)
at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:383)
at ch.qos.logback.classic.Logger.log(Logger.java:765)
at org.apache.commons.logging.impl.SLF4JLocationAwareLog.error(SLF4JLocationAwareLog.java:216)
at org.springframework.boot.SpringApplication.reportFailure(SpringApplication.java:826)
at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:801)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:325)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215)
at org.carlspring.strongbox.app.StrongboxSpringBootApplication.main(StrongboxSpringBootApplication.java:38)
fixed with -Dsun.misc.URLClassPath.disableJarChecking=true
now there is following issues:
Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.lang.String` out of START_OBJECT token
at [Source: (BufferedInputStream); line: 8, column: 7] (through reference chain: org.carlspring.strongbox.users.dto.UsersDto["user"]->java.util.LinkedHashSet[0]->org.carlspring.strongbox.users.dto.UserDto["roles"]->java.util.LinkedHashSet[0])
truing to fix it as well
now there is following issues:
- [ ] exception during startup
Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.lang.String` out of START_OBJECT token at [Source: (BufferedInputStream); line: 8, column: 7] (through reference chain: org.carlspring.strongbox.users.dto.UsersDto["user"]->java.util.LinkedHashSet[0]->org.carlspring.strongbox.users.dto.UserDto["roles"]->java.util.LinkedHashSet[0])
It seems like we need to enable this for single-values. Would you mind trying it, if you haven't done so already? Thanks! :)
Task Description
We are currently using the Java Service Wrapper (from Tanuki) via the
appassembler
. This is being generated using themaven-assembly-plugin
in thestrongbox-distribution
. We'd like to move away from this solution, due to its licensing implications.As a contender, we might consider looking into the alternative provided by the Springframework. We are already quite invested in Spring and we're already producing a Spring Boot application.
Requirements
Tasks
The following tasks will need to be carried out:
executable
andembeddedLaunchScript
options forspring-boot-maven-plugin
Useful Links
appassembler-maven-plugin
Help