Chat2DB Web版 服务器端安装部署启动流程

Oxye 2024-06-23 14:33:01 阅读 73

目录

前言安装部署过程下载安装包下载JDK17启动登录 可能出现的报错启动报错Java版本低flyway的bean创建失败登录失败无法执行二进制文件

前言

Chat2DB是款数据库连接工具,主要就是使用JDBC做数据库连接,外加多对接了几个聊天AI网站,把数据库和AI做了个集成,比使用传统工具Navicat,再另外去AI查方便一点。

官网可以直接下客户端使用,也可以部署到服务器上用浏览器访问,但是我找了半天没发现Web版的部署方法,所有就写一篇Web版的安装、部署、启动的流程,不一定适合每个人,因为每个人的环境、软硬件不一样,仅供参考。

安装部署过程

下载安装包

官网地址 https://chat2db.ai/zh

24年地址变了:https://chat2db-ai.com/zh-CN

点击web下载,微信扫描完弹出的二维码,就会触发浏览器下载

在这里插入图片描述

下载的包叫chat2db-server-start.zip

上传到Linux服务器上,解压,我的是centos7

cd /homemkdir chat2db# sftp窗口上传文件unzip chat2db-server-start.zipcd chat2db

下载JDK17

我系统是x86_64的,下对应的jdk117,不然启动报错,说jdk版本不行

下载位置想下哪下哪,我图省事下到当前目录

wget https://download.java.net/java/GA/jdk17.0.1/2a2082e5a09d4267845be086888add4f/12/GPL/openjdk-17.0.1_linux-x64_bin.tar.gztar -xvf openjdk-17.0.1_linux-x64_bin.tar.gz

不想改原有的java环境变量就别改,直接用/home/chat2db/jdk-17.0.1/bin/java -version测

启动

启动,指定lib文件夹

-Dchatgpt.apiKey是chatgpt的key,但是实际使用发现填了也没用,还是去连得ChatDB的网关地址,可能可以通过保外配置改变查询行为,-Dchatgpt.apiKey这项可以删掉,都搞包外配置了,key直接写配置文件里就行吧

nohup /home/chat2db/jdk-17.0.1/bin/java -jar -Dloader.path=lib -Dchatgpt.apiKey=此处需要替换为chatgpt秘钥 chat2db-server-start.jar &

启动成功

在这里插入图片描述

最终目录结构如下

登录

日志开头打印启动端口为:10821

在浏览器输入ip:10821,进入页面

在这里插入图片描述

可能出现的报错

启动报错Java版本低

Error: A JNI error has occurred, please check your installation and try againException in thread "main" java.lang.UnsupportedClassVersionError: org/springframework/boot/loader/PropertiesLauncher has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:756) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:473) at java.net.URLClassLoader.access$100(URLClassLoader.java:74) at java.net.URLClassLoader$1.run(URLClassLoader.java:369) at java.net.URLClassLoader$1.run(URLClassLoader.java:363) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:362) at java.lang.ClassLoader.loadClass(ClassLoader.java:418) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352) at java.lang.ClassLoader.loadClass(ClassLoader.java:351) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:601)

解决方法是安装jdk17,不一定要改环境变量,启动时指定17的路径就行

flyway的bean创建失败

2023-10-31 13:36:39.468 INFO 18584 --- [ main] o.s.b.a.h2.H2ConsoleAutoConfiguration .88 : | H2 console available at '/h2'. Database available at 'jdbc:h2:~/.chat2db/db/chat2db_dev'org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Validate failed: Migrations have failed validationMigration checksum mismatch for migration version 1.0.0-> Applied to database : 1103295346-> Resolved locally : -1991637693Either revert the changes to the migration, or run repair to update the schema history.Detected applied migration not resolved locally: 1.0.0.1.If you removed this migration intentionally, run repair to mark the migration as deleted.Detected applied migration not resolved locally: 1.0.1.If you removed this migration intentionally, run repair to mark the migration as deleted.Need more flexibility with validation rules? Learn more: https://rd.gt/3AbJUZE at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1770) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:598) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:520) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:313) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:973) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:941) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:608) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:733) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:435) at org.springframework.boot.SpringApplication.run(SpringApplication.java:311) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1305) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1294) at ai.chat2db.server.start.Application.main(Application.java:72) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) at org.springframework.boot.loader.Launcher.launch(Launcher.java:95) at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:466)Caused by: org.flywaydb.core.api.exception.FlywayValidateException: Validate failed: Migrations have failed validationMigration checksum mismatch for migration version 1.0.0-> Applied to database : 1103295346-> Resolved locally : -1991637693Either revert the changes to the migration, or run repair to update the schema history.Detected applied migration not resolved locally: 1.0.0.1.If you removed this migration intentionally, run repair to mark the migration as deleted.Detected applied migration not resolved locally: 1.0.1.If you removed this migration intentionally, run repair to mark the migration as deleted.Need more flexibility with validation rules? Learn more: https://rd.gt/3AbJUZE at org.flywaydb.core.Flyway.lambda$migrate$0(Flyway.java:146) at org.flywaydb.core.FlywayExecutor.execute(FlywayExecutor.java:190) at org.flywaydb.core.Flyway.migrate(Flyway.java:140) at org.springframework.boot.autoconfigure.flyway.FlywayMigrationInitializer.afterPropertiesSet(FlywayMigrationInitializer.java:66) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1816) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1766) ... 26 common frames omitted

有可能的原因之一是以前初始化了一半的脚本影响了后续初始化,可以删掉已有的内容重新开始。

日志里h2的文件位置在~/.chat2db/db/chat2db_dev,可以去删掉这个路径的文件,重启就好了

cd ~/.chat2db/db/llrm -rf chat2db_dev.mv.db

登录失败

在这里插入图片描述

2023-10-31 14:00:06.170 ERROR 4759 --- [io-10821-exec-5] a.c.s.s.e.EasyControllerExceptionHandler.164 : 220e62ae44b043ec826cc3449ab48747 | 发生未知异常/api/oauth/login_a:ActionResult(success=false, errorCode=common.systemError, errorMessage=An exception occurs, you can view the exception details in the log in the help menu., errorDetail=cn.hutool.crypto.CryptoException: SecurityException: JCE cannot authenticate the provider BC at cn.hutool.crypto.digest.mac.DefaultHMacEngine.init(DefaultHMacEngine.java:105) at cn.hutool.crypto.digest.mac.DefaultHMacEngine.<init>(DefaultHMacEngine.java:56) at cn.hutool.crypto.digest.mac.MacEngineFactory.createEngine(MacEngineFactory.java:42) at cn.hutool.crypto.digest.HMac.<init>(HMac.java:86) at cn.hutool.crypto.digest.HMac.<init>(HMac.java:74) at cn.hutool.crypto.digest.HMac.<init>(HMac.java:63) at cn.hutool.jwt.signers.HMacJWTSigner.<init>(HMacJWTSigner.java:28) at cn.hutool.jwt.signers.JWTSignerUtil.createSigner(JWTSignerUtil.java:239) at cn.hutool.jwt.signers.JWTSignerUtil.hs256(JWTSignerUtil.java:36) at cn.hutool.jwt.JWT.setKey(JWT.java:126) at cn.dev33.satoken.jwt.SaJwtTemplate.generateToken(SaJwtTemplate.java:119) at cn.dev33.satoken.jwt.SaJwtTemplate.createToken(SaJwtTemplate.java:109) at cn.dev33.satoken.jwt.SaJwtUtil.createToken(SaJwtUtil.java:100) at cn.dev33.satoken.jwt.StpLogicJwtForStateless.createTokenValue(StpLogicJwtForStateless.java:60) at cn.dev33.satoken.jwt.StpLogicJwtForStateless.createLoginSession(StpLogicJwtForStateless.java:99) at cn.dev33.satoken.stp.StpLogic.login(StpLogic.java:331) at cn.dev33.satoken.stp.StpLogic.login(StpLogic.java:293) at cn.dev33.satoken.stp.StpUtil.login(StpUtil.java:135) at ai.chat2db.server.start.controller.oauth.OauthController.doLogin(OauthController.java:73) at ai.chat2db.server.start.controller.oauth.OauthController.login(OauthController.java:63) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:207) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:152) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:118) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:884) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1081) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:974) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1011) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:914) at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:547) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885) at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:614) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:205) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) at ai.chat2db.server.start.config.interceptor.CorsFilter.doFilter(CorsFilter.java:37) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) at org.zalando.logbook.servlet.LogbookFilter.doFilter(LogbookFilter.java:76) at org.zalando.logbook.servlet.HttpFilter.doFilter(HttpFilter.java:32) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) at ai.chat2db.server.start.log.LogOncePerRequestFilter.doFilterInternal(LogOncePerRequestFilter.java:32) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:166) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:341) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:390) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:894) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:842)Caused by: java.lang.SecurityException: JCE cannot authenticate the provider BC at java.base/javax.crypto.JceSecurity.getInstance(JceSecurity.java:144) at java.base/javax.crypto.Mac.getInstance(Mac.java:272) at cn.hutool.crypto.SecureUtil.createMac(SecureUtil.java:1086) at cn.hutool.crypto.digest.mac.DefaultHMacEngine.init(DefaultHMacEngine.java:95) ... 80 moreCaused by: java.lang.IllegalStateException: zip file closed at java.base/java.util.zip.ZipFile.ensureOpen(ZipFile.java:840) at java.base/java.util.zip.ZipFile.getManifestName(ZipFile.java:1066) at java.base/java.util.zip.ZipFile$1.getManifestName(ZipFile.java:1125) at java.base/javax.crypto.JarVerifier.verifySingleJar(JarVerifier.java:464) at java.base/javax.crypto.JarVerifier.verifyJars(JarVerifier.java:320) at java.base/javax.crypto.JarVerifier.verify(JarVerifier.java:263) at java.base/javax.crypto.ProviderVerifier.verify(ProviderVerifier.java:130) at java.base/javax.crypto.JceSecurity.verifyProvider(JceSecurity.java:190) at java.base/javax.crypto.JceSecurity.getVerificationResult(JceSecurity.java:218) at java.base/javax.crypto.JceSecurity.getInstance(JceSecurity.java:140) ... 83 more, solutionLink=https://github.com/chat2db/Chat2DB/wiki/Chat2DB, traceId=null),请求参数:{ }cn.hutool.crypto.CryptoException: SecurityException: JCE cannot authenticate the provider BC at cn.hutool.crypto.digest.mac.DefaultHMacEngine.init(DefaultHMacEngine.java:105) at cn.hutool.crypto.digest.mac.DefaultHMacEngine.<init>(DefaultHMacEngine.java:56) at cn.hutool.crypto.digest.mac.MacEngineFactory.createEngine(MacEngineFactory.java:42) at cn.hutool.crypto.digest.HMac.<init>(HMac.java:86) at cn.hutool.crypto.digest.HMac.<init>(HMac.java:74) at cn.hutool.crypto.digest.HMac.<init>(HMac.java:63) at cn.hutool.jwt.signers.HMacJWTSigner.<init>(HMacJWTSigner.java:28) at cn.hutool.jwt.signers.JWTSignerUtil.createSigner(JWTSignerUtil.java:239) at cn.hutool.jwt.signers.JWTSignerUtil.hs256(JWTSignerUtil.java:36) at cn.hutool.jwt.JWT.setKey(JWT.java:126) at cn.dev33.satoken.jwt.SaJwtTemplate.generateToken(SaJwtTemplate.java:119) at cn.dev33.satoken.jwt.SaJwtTemplate.createToken(SaJwtTemplate.java:109) at cn.dev33.satoken.jwt.SaJwtUtil.createToken(SaJwtUtil.java:100) at cn.dev33.satoken.jwt.StpLogicJwtForStateless.createTokenValue(StpLogicJwtForStateless.java:60) at cn.dev33.satoken.jwt.StpLogicJwtForStateless.createLoginSession(StpLogicJwtForStateless.java:99) at cn.dev33.satoken.stp.StpLogic.login(StpLogic.java:331) at cn.dev33.satoken.stp.StpLogic.login(StpLogic.java:293) at cn.dev33.satoken.stp.StpUtil.login(StpUtil.java:135) at ai.chat2db.server.start.controller.oauth.OauthController.doLogin(OauthController.java:73) at ai.chat2db.server.start.controller.oauth.OauthController.login(OauthController.java:63) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:207) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:152) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:118) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:884) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1081) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:974) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1011) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:914) at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:547) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885) at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:614) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:205) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) at ai.chat2db.server.start.config.interceptor.CorsFilter.doFilter(CorsFilter.java:37) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) at org.zalando.logbook.servlet.LogbookFilter.doFilter(LogbookFilter.java:76) at org.zalando.logbook.servlet.HttpFilter.doFilter(HttpFilter.java:32) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) at ai.chat2db.server.start.log.LogOncePerRequestFilter.doFilterInternal(LogOncePerRequestFilter.java:32) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:166) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:341) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:390) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:894) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:842)Caused by: java.lang.SecurityException: JCE cannot authenticate the provider BC at java.base/javax.crypto.JceSecurity.getInstance(JceSecurity.java:144) at java.base/javax.crypto.Mac.getInstance(Mac.java:272) at cn.hutool.crypto.SecureUtil.createMac(SecureUtil.java:1086) at cn.hutool.crypto.digest.mac.DefaultHMacEngine.init(DefaultHMacEngine.java:95) ... 80 common frames omittedCaused by: java.lang.IllegalStateException: zip file closed at java.base/java.util.zip.ZipFile.ensureOpen(ZipFile.java:840) at java.base/java.util.zip.ZipFile.getManifestName(ZipFile.java:1066) at java.base/java.util.zip.ZipFile$1.getManifestName(ZipFile.java:1125) at java.base/javax.crypto.JarVerifier.verifySingleJar(JarVerifier.java:464) at java.base/javax.crypto.JarVerifier.verifyJars(JarVerifier.java:320) at java.base/javax.crypto.JarVerifier.verify(JarVerifier.java:263) at java.base/javax.crypto.ProviderVerifier.verify(ProviderVerifier.java:130) at java.base/javax.crypto.JceSecurity.verifyProvider(JceSecurity.java:190) at java.base/javax.crypto.JceSecurity.getVerificationResult(JceSecurity.java:218) at java.base/javax.crypto.JceSecurity.getInstance(JceSecurity.java:140) ... 83 common frames omitted

使用openjdk,别用oracle的

无法执行二进制文件

-bash: /home/chat2db/jdk-17.0.1/bin/java: 无法执行二进制文件

可能是jdk版本不对,要对应系统



声明

本文内容仅代表作者观点,或转载于其他网站,本站不以此文作为商业用途
如有涉及侵权,请联系本站进行删除
转载本站原创文章,请注明来源及作者。