无法从jar文件启动Klov服务器以获取数据块报告



我尝试在本地安装klov-0.2.5.jar,我的设置如下:

  1. Mongodb 3.2在端口27017上运行和侦听
  2. klov application.properties文件与klov-0.2.5.jar位于同一文件夹中
  3. 为Klov(8025711100)尝试了不同的端口,但都给出了与描述中相同的错误
  4. 在mongoDB 5.0上尝试过,结果相同
  5. 在windows 10上运行它,application.properties设置如下:
# klov
application.name=Klov
server.host=localhost
server.port=1100
# data.mongodb
spring.data.mongodb.host=localhost
spring.data.mongodb.port=27017
spring.data.mongodb.database=klov
# data.rest
spring.data.rest.basePath=/rest
spring.data.rest.default-page-size=6
# redis, session
spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.session.SessionAutoConfiguration
spring.data.redis.repositories.enabled=false
spring.data.elasticsearch.repositories.enabled=false
spring.data.jpa.repositories.enabled=false
org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext.enabled=false
# use.redis.session.store=false
# spring.redis.host=localhost
# spring.redis.port=6379
# spring.redis.ssl=false
# spring.redis.database=0
# spring.session.store-type=redis
# server.session.timeout=-1
# users
server.admin.name=klovadmin
server.admin.key=$2a$10$I/5TFi6BrHChUghTZEZfCO82txzu8L5brcK0CxhS3m.V6glfj2vZe
# storage
file.storage.location=./upload/reports/
# schedulers
scheduler.jobs.enabled=false
# automatically delete older builds
# default is -1 (keep all)
# this count must be greater than 0 for this scheduler to work
# scheduled to run daily at 12:00AM
scheduler.job.builds.retain.count=-1
# mail
#spring.mail.host=
#spring.mail.port=
#spring.mail.username=
#spring.mail.password=
#spring.mail.properties.mail.smtp.ssl.enable=true
#spring.mail.properties.mail.smtp.starttls.enable=true
#spring.mail.properties.mail.smtp.starttls.required=true
#spring.mail.properties.mail.smtp.auth=true
#spring.mail.properties.mail.smtp.connectiontimeout=5000
#spring.mail.properties.mail.smtp.timeout=5000
#spring.mail.properties.mail.smtp.writetimeout=5000
spring.mail.test-connection=false

一旦我尝试在powershell中执行jar文件,我会得到:poerwshell结果

PS D:\klov\0.2.5>java-jar。\klov-0.2.5.jar

._______/\/'___()_____\\\\(()__|'_|'|'/`|\\\\/__)||||||(||)))'|__|||||_,|////===========||===========|/=///:Spring Boot::(v2.0.4.REASE)

2022-07-13 14:34:42.138信息2796-[主]com.aventstack.klov.Application:正在启动应用程序v0.2.5在fedoruk上,PID 2796(D:\klov\0.2.5\klov-0.2.5.jar由启动mfedoruk in D:\klov\0.2.5)2022-07-13 14:34:42/141信息2796-[
main]com.aventstack.klov.Application:无活动配置文件设置,回退到默认配置文件:默认2022-07-13 14:34:42.215信息2796-[main]ConfigServlet WebServerApplicationContext:刷新org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@7a3d45bd:启动日期【2022年7月13日星期三下午14:34:42】;上下文根源层次结构2022-07-13 14:34:42.984信息2796-[主].s.d.r.c.RepositoryConfigurationDelegate:多个Spring数据找到模块,进入严格的存储库配置模式!2022-07-13 14:34:43.356错误2796-[main]o.s.boot.SpringApplication:应用程序运行失败的

java.lang.IollegalStateException:无法加载配置类:com.aventstack.klov.Application位于org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcesser.java:414)~[spring-context-5.08.RELEASE.jar!/:5.0.8.RELEASE]位于org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanFactory(ConfigurationClassPostProcess.java:254)~[spring-context-5.08.RELEASE.jar!/:5.0.8.RELEASE]位于org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistration\Delegate.java:282)~[spring-context-5.08.RELEASE.jar!/:5.0.8.RELEASE]位于org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistration\Delegate.java:126)~[spring-context-5.08.RELEASE.jar!/:5.0.8.RELEASE]位于org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:694)~[spring-context-5.08.RELEASE.jar!/:5.0.8.RELEASE]网址:org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532)~[spring-context-5.08.RELEASE.jar!/:5.0.8.RELEASE]网址:org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplication context.java:140)~[spring-boot-2.0.4.REASE.jar!/:2.0.4.RELEASE]网址:org.springframework.boot.SpringApplication.refresh(SpringApplication.java:762)~[spring-boot-2.0.4.REASE.jar!/:2.0.4.RELEASE]网址:org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:398)~[spring-boot-2.0.4.REASE.jar!/:2.0.4.RELEASE]网址:org.springframework.boot.SpringApplication.run(SpringApplication.java:330)~[spring-boot-2.0.4.REASE.jar!/:2.0.4.RELEASE]网址:org.springframework.boot.SpringApplication.run(SpringApplication.java:1258)~[spring-boot-2.0.4.REASE.jar!/:2.0.4.RELEASE]网址:org.springframework.boot.SpringApplication.run(SpringApplication.java:1246)~[spring-boot-2.0.4.REASE.jar!/:2.0.4.RELEASE]网址:com.aventstack.klov.Application.main(Application.java:61)~[classes!/:0.2.5]位于java.base/jdk.internal.reflect.DirectMethodHandleAccessor.ioke(DirectMethodHandleAccessor.java:104)~[不:不]位于java.base/java.lang.reflect.Method.ioke(Method.java:577)~[na:na]网址:org.springframework.bootloader.MainMethodRunner.run(MainMethodRunner.java:48)~[klov-0.2.5.jar:0.2.5]网址:org.springframework.bootloader.Launcher.launch(Launcher.java:87)~[klov-0.2.5.jar:0.2.5]网址:org.springframework.bootloader.Launcher.launch(Launcher.java:50)~[klov-0.2.5.jar:0.2.5]网址:org.springframework.bootloader.JarLauncher.main(JarLauncher.java:51)~[klov-0.2.5.jar:0.2.5]由以下原因引起:java.lang.ExceptionInInitializerError:null位于org.springframework.context.annotation.ConfigurationClassEnhancer.newEnhancer(ConfigurationClassEnancer.java:122)~[spring-context-5.08.RELEASE.jar!/:5.0.8.RELEASE]

我通过处理了它

  • 在docker容器中运行最新版本的klov
  • 然后我将klov.jar文件从容器复制到本地路径
  • 相同属性,mongoDB 5.0.9
  • 类型化的java-jar-klov.jar一切开始都没有问题

相关内容

  • 没有找到相关文章