gateway打成war包启动报错

Blade 未结 1 356
hwb189
hwb189 2023-12-01 09:51

一、该问题的重现步骤是什么?

1. 

2. image.png

3.image.png


二、你期待的结果是什么?实际看到的又是什么?

gateway打包成功,通过tomcat启动是报错


三、你正在使用的是什么产品,什么版本?在什么操作系统上?

balde 2.9.0 window系统


四、请提供详细的错误堆栈信息,这很重要。


D:\tools\apache-tomcat-9.0.83\bin\catalina.bat run

[2023-11-29 03:29:09,770] 工件 blade-gateway:war: 正在等待服务器连接以启动工件部署…

Using CATALINA_BASE:   "C:\Users\zhangxuefeng\AppData\Local\JetBrains\IntelliJIdea2021.3\tomcat\86eb4124-3d0a-4a89-a800-6406960798c0"

Using CATALINA_HOME:   "D:\tools\apache-tomcat-9.0.83"

Using CATALINA_TMPDIR: "D:\tools\apache-tomcat-9.0.83\temp"

Using JRE_HOME:        "D:\Java\jdk1.8.0_311"

Using CLASSPATH:       "D:\tools\apache-tomcat-9.0.83\bin\bootstrap.jar;D:\tools\apache-tomcat-9.0.83\bin\tomcat-juli.jar"

Using CATALINA_OPTS:   ""

已连接到目标 VM, 地址: ''127.0.0.1:63437',传输: '套接字''

29-Nov-2023 15:29:11.958 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server.服务器版本: Apache Tomcat/9.0.83

29-Nov-2023 15:29:11.960 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 服务器构建:        Nov 9 2023 20:57:42 UTC

29-Nov-2023 15:29:11.961 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 服务器版本号:      9.0.83.0

29-Nov-2023 15:29:11.961 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 操作系统名称:      Windows 10

29-Nov-2023 15:29:11.961 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS.版本:           10.0

29-Nov-2023 15:29:11.961 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 架构:              amd64

29-Nov-2023 15:29:11.961 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Java 环境变量:     D:\Java\jdk1.8.0_311\jre

29-Nov-2023 15:29:11.961 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Java虚拟机版本:    1.8.0_311-b11

29-Nov-2023 15:29:11.961 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM.供应商:        Oracle Corporation

29-Nov-2023 15:29:11.961 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:     C:\Users\zhangxuefeng\AppData\Local\JetBrains\IntelliJIdea2021.3\tomcat\86eb4124-3d0a-4a89-a800-6406960798c0

29-Nov-2023 15:29:11.961 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:     D:\tools\apache-tomcat-9.0.83

29-Nov-2023 15:29:11.962 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数:       -Djava.util.logging.config.file=C:\Users\zhangxuefeng\AppData\Local\JetBrains\IntelliJIdea2021.3\tomcat\86eb4124-3d0a-4a89-a800-6406960798c0\conf\logging.properties

29-Nov-2023 15:29:11.962 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数:       -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager

29-Nov-2023 15:29:11.962 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数:       -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:63437,suspend=y,server=n

29-Nov-2023 15:29:11.962 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数:       -javaagent:C:\Users\zhangxuefeng\AppData\Local\JetBrains\IntelliJIdea2021.3\captureAgent\debugger-agent.jar

29-Nov-2023 15:29:11.962 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数:       -Dspring.profiles.active=test

29-Nov-2023 15:29:11.962 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数:       -Dfile.encoding=utf-8

29-Nov-2023 15:29:11.962 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数:       -Dcom.sun.management.jmxremote=

29-Nov-2023 15:29:11.963 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数:       -Dcom.sun.management.jmxremote.port=1099

29-Nov-2023 15:29:11.963 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数:       -Dcom.sun.management.jmxremote.ssl=false

29-Nov-2023 15:29:11.963 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数:       -Dcom.sun.management.jmxremote.password.file=C:\Users\zhangxuefeng\AppData\Local\JetBrains\IntelliJIdea2021.3\tomcat\86eb4124-3d0a-4a89-a800-6406960798c0\jmxremote.password

29-Nov-2023 15:29:11.963 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数:       -Dcom.sun.management.jmxremote.access.file=C:\Users\zhangxuefeng\AppData\Local\JetBrains\IntelliJIdea2021.3\tomcat\86eb4124-3d0a-4a89-a800-6406960798c0\jmxremote.access

29-Nov-2023 15:29:11.963 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数:       -Djava.rmi.server.hostname=127.0.0.1

29-Nov-2023 15:29:11.963 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数:       -Djdk.tls.ephemeralDHKeySize=2048

29-Nov-2023 15:29:11.963 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数:       -Djava.protocol.handler.pkgs=org.apache.catalina.webresources

29-Nov-2023 15:29:11.963 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数:       -Dignore.endorsed.dirs=

29-Nov-2023 15:29:11.964 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数:       -Dcatalina.base=C:\Users\zhangxuefeng\AppData\Local\JetBrains\IntelliJIdea2021.3\tomcat\86eb4124-3d0a-4a89-a800-6406960798c0

29-Nov-2023 15:29:11.964 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数:       -Dcatalina.home=D:\tools\apache-tomcat-9.0.83

29-Nov-2023 15:29:11.964 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 命令行参数:       -Djava.io.tmpdir=D:\tools\apache-tomcat-9.0.83\temp

29-Nov-2023 15:29:11.970 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent 使用APR版本[1.7.4]加载了基于APR的Apache Tomcat本机库[1.2.39]。

29-Nov-2023 15:29:11.970 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR功能:IPv6[true]、sendfile[true]、accept filters[false]、random[true]、UDS [true]。

29-Nov-2023 15:29:11.970 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL配置:useAprConnector[false],useOpenSSL[true]

29-Nov-2023 15:29:11.984 信息 [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL成功初始化 [OpenSSL 3.0.11 19 Sep 2023]

29-Nov-2023 15:29:12.391 信息 [main] org.apache.coyote.AbstractProtocol.init 初始化协议处理器 ["http-nio-8080"]

29-Nov-2023 15:29:12.426 信息 [main] org.apache.catalina.startup.Catalina.load 服务器在[764]毫秒内初始化

29-Nov-2023 15:29:12.493 信息 [main] org.apache.catalina.core.StandardService.startInternal 正在启动服务[Catalina]

29-Nov-2023 15:29:12.493 信息 [main] org.apache.catalina.core.StandardEngine.startInternal 正在启动 Servlet 引擎:[Apache Tomcat/9.0.83]

29-Nov-2023 15:29:12.515 信息 [main] org.apache.coyote.AbstractProtocol.start 开始协议处理句柄["http-nio-8080"]

29-Nov-2023 15:29:12.543 信息 [main] org.apache.catalina.startup.Catalina.start [118]毫秒后服务器启动

已连接到服务器

[2023-11-29 03:29:12,921] 工件 blade-gateway:war: 正在部署工件,请稍候…

29-Nov-2023 15:29:22.520 信息 [Catalina-utility-1] org.apache.catalina.startup.HostConfig.deployDirectory 把web 应用程序部署到目录 [D:\tools\apache-tomcat-9.0.83\webapps\manager]

29-Nov-2023 15:29:22.649 信息 [Catalina-utility-1] org.apache.jasper.servlet.TldScanner.scanJars 至少有一个JAR被扫描用于TLD但尚未包含TLD。 为此记录器启用调试日志记录,以获取已扫描但未在其中找到TLD的完整JAR列表。 在扫描期间跳过不需要的JAR可以缩短启动时间和JSP编译时间。

29-Nov-2023 15:29:22.716 信息 [Catalina-utility-1] org.apache.catalina.startup.HostConfig.deployDirectory Web应用程序目录[D:\tools\apache-tomcat-9.0.83\webapps\manager]的部署已在[195]毫秒内完成

29-Nov-2023 15:29:24.151 信息 [RMI TCP Connection(2)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars 至少有一个JAR被扫描用于TLD但尚未包含TLD。 为此记录器启用调试日志记录,以获取已扫描但未在其中找到TLD的完整JAR列表。 在扫描期间跳过不需要的JAR可以缩短启动时间和JSP编译时间。

15:29:24.833 [RMI TCP Connection(2)-127.0.0.1] DEBUG org.springframework.core.env.PropertySourcesPropertyResolver - Found key 'spring.profiles.active' in PropertySource 'systemProperties' with value of type String

15:29:24.839 [RMI TCP Connection(2)-127.0.0.1] DEBUG org.springframework.core.env.StandardEnvironment - Activating profiles [test]

----启动中,读取到的环境变量:[test],jar地址:[/D:/tools/apache-tomcat-9.0.83/webapps/blade_gateway_war/WEB-INF/classes/]----

15:29:25.389 [RMI TCP Connection(2)-127.0.0.1] INFO org.springblade.common.launch.LauncherServiceImpl - 初始系统配置:{"java.vendor":"Oracle Corporation","jboss.modules.system.pkgs":"com.intellij.rt","sun.java.launcher":"SUN_STANDARD","catalina.base":"C:\\Users\\zhangxuefeng\\AppData\\Local\\JetBrains\\IntelliJIdea2021.3\\tomcat\\86eb4124-3d0a-4a89-a800-6406960798c0","sun.management.compiler":"HotSpot 64-Bit Tiered Compilers","catalina.useNaming":"true","os.name":"Windows 10","sun.boot.class.path":"D:\\Java\\jdk1.8.0_311\\jre\\lib\\resources.jar;D:\\Java\\jdk1.8.0_311\\jre\\lib\\rt.jar;D:\\Java\\jdk1.8.0_311\\jre\\lib\\sunrsasign.jar;D:\\Java\\jdk1.8.0_311\\jre\\lib\\jsse.jar;D:\\Java\\jdk1.8.0_311\\jre\\lib\\jce.jar;D:\\Java\\jdk1.8.0_311\\jre\\lib\\charsets.jar;D:\\Java\\jdk1.8.0_311\\jre\\lib\\jfr.jar;D:\\Java\\jdk1.8.0_311\\jre\\classes;C:\\Users\\zhangxuefeng\\AppData\\Local\\JetBrains\\IntelliJIdea2021.3\\captureAgent\\debugger-agent.jar","java.util.logging.config.file":"C:\\Users\\zhangxuefeng\\AppData\\Local\\JetBrains\\IntelliJIdea2021.3\\tomcat\\86eb4124-3d0a-4a89-a800-6406960798c0\\conf\\logging.properties","org.apache.el.GET_CLASSLOADER_USE_PRIVILEGED":"false","blade.service.version":"2.9.0.HHJ","sun.desktop":"windows","com.sun.management.jmxremote":"","java.vm.specification.vendor":"Oracle Corporation","java.runtime.version":"1.8.0_311-b11","spring.datasource.dynamic.enabled":"false","dubbo.registry.password":"nacos","blade.env":"test","user.name":"zhangxuefeng","shared.loader":"","tomcat.util.scan.StandardJarScanFilter.jarsToScan":"log4j-taglib*.jar,log4j-web*.jar,log4javascript*.jar,slf4j-taglib*.jar","spring.zipkin.base-url":"http://172.16.104.104:30181","blade.dev-mode":"true","tomcat.util.buf.StringCache.byte.enabled":"true","dubbo.registry.username":"nacos","java.naming.factory.initial":"org.apache.naming.java.javaURLContextFactory","user.language":"zh","sun.boot.library.path":"D:\\Java\\jdk1.8.0_311\\jre\\bin","info.version":"2.9.0.HHJ","info.desc":"blade-gateway","com.sun.management.jmxremote.port":"1099","spring.cloud.nacos.config.namespace":"test","jdk.tls.ephemeralDHKeySize":"2048","java.version":"1.8.0_311","java.util.logging.manager":"org.apache.juli.ClassLoaderLogManager","user.timezone":"Asia/Singapore","sun.arch.data.model":"64","java.util.concurrent.ForkJoinPool.common.threadFactory":"org.apache.catalina.startup.SafeForkJoinWorkerThreadFactory","java.endorsed.dirs":"D:\\Java\\jdk1.8.0_311\\jre\\lib\\endorsed","java.rmi.server.randomIDs":"true","sun.cpu.isalist":"amd64","sun.jnu.encoding":"GBK","file.encoding.pkg":"sun.io","package.access":"sun.,org.apache.catalina.,org.apache.coyote.,org.apache.jasper.,org.apache.tomcat.","file.separator":"\\","java.specification.name":"Java Platform API Specification","java.class.version":"52.0","user.country":"CN","spring.cloud.nacos.discovery.server-addr":"127.0.0.1:8848","java.home":"D:\\Java\\jdk1.8.0_311\\jre","java.vm.info":"mixed mode","os.version":"10.0","spring.cloud.nacos.config.password":"nacos","com.sun.management.jmxremote.ssl":"false","path.separator":";","java.vm.version":"25.311-b11","user.variant":"","java.protocol.handler.pkgs":"org.apache.catalina.webresources","spring.cloud.nacos.config.server-addr":"127.0.0.1:8848","java.awt.printerjob":"sun.awt.windows.WPrinterJob","spring.cloud.nacos.discovery.namespace":"test","sun.io.unicode.encoding":"UnicodeLittle","awt.toolkit":"sun.awt.windows.WToolkit","spring.cloud.sentinel.transport.dashboard":"172.16.104.102:8858","package.definition":"sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.jasper.,org.apache.naming.,org.apache.tomcat.","user.script":"","java.naming.factory.url.pkgs":"org.apache.naming","user.home":"C:\\Users\\zhangxuefeng","blade.name":"blade-gateway","dubbo.metadata-report.password":"nacos","java.specification.vendor":"Oracle Corporation","spring.cloud.nacos.config.username":"nacos","tomcat.util.scan.StandardJarScanFilter.jarsToSkip":"annotations-api.jar,ant-junit*.jar,ant-launcher*.jar,ant*.jar,asm-*.jar,aspectj*.jar,bcel*.jar,biz.aQute.bnd*.jar,bootstrap.jar,catalina-ant.jar,catalina-ha.jar,catalina-ssi.jar,catalina-storeconfig.jar,catalina-tribes.jar,catalina.jar,cglib-*.jar,cobertura-*.jar,commons-beanutils*.jar,commons-codec*.jar,commons-collections*.jar,commons-compress*.jar,commons-daemon.jar,commons-dbcp*.jar,commons-digester*.jar,commons-fileupload*.jar,commons-httpclient*.jar,commons-io*.jar,commons-lang*.jar,commons-logging*.jar,commons-math*.jar,commons-pool*.jar,derby-*.jar,dom4j-*.jar,easymock-*.jar,ecj-*.jar,el-api.jar,geronimo-spec-jaxrpc*.jar,h2*.jar,ha-api-*.jar,hamcrest-*.jar,hibernate*.jar,httpclient*.jar,icu4j-*.jar,jasper-el.jar,jasper.jar,jaspic-api.jar,jaxb-*.jar,jaxen-*.jar,jaxws-rt-*.jar,jdom-*.jar,jetty-*.jar,jmx-tools.jar,jmx.jar,jsp-api.jar,jstl.jar,jta*.jar,junit-*.jar,junit.jar,log4j*.jar,mail*.jar,objenesis-*.jar,oraclepki.jar,org.hamcrest.core_*.jar,org.junit_*.jar,oro-*.jar,servlet-api-*.jar,servlet-api.jar,slf4j*.jar,taglibs-standard-spec-*.jar,tagsoup-*.jar,tomcat-api.jar,tomcat-coyote.jar,tomcat-dbcp.jar,tomcat-i18n-*.jar,tomcat-jdbc.jar,tomcat-jni.jar,tomcat-juli-adapters.jar,tomcat-juli.jar,tomcat-util-scan.jar,tomcat-util.jar,tomcat-websocket.jar,tools.jar,unboundid-ldapsdk-*.jar,websocket-api.jar,wsdl4j*.jar,xercesImpl.jar,xml-apis.jar,xmlParserAPIs-*.jar,xmlParserAPIs.jar,xom-*.jar","java.library.path":"D:\\Java\\jdk1.8.0_311\\bin;C:\\WINDOWS\\Sun\\Java\\bin;C:\\WINDOWS\\system32;C:\\WINDOWS;D:\\Program Files\\Kingbase\\ES\\V8\\KESRealPro\\V008R006C008B0014\\Interface\\compress\\v8r6_compress_win\\kb_x64\\release;C:\\Program Files\\Common Files\\Oracle\\Java\\javapath;D:\\Program Files\\VanDyke Software\\Clients\\;D:\\Java\\jdk1.8.0_311\\bin;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\Git\\cmd;D:\\Program Files\\TortoiseSVN\\bin;D:\\Program Files\\Redis\\;D:\\tools\\maven\\apache-maven-3.6.3\\bin;D:\\Program Files (x86)\\Tencent\\web开发者工具\\dll;D:\\tools\\mysql-8.0.28-winx64\\bin;D:\\tools\\apache-tomcat-9.0.83\\bin;C:\\Users\\zhangxuefeng\\AppData\\Local\\Microsoft\\WindowsApps;;.","java.vendor.url":"http://java.oracle.com/","java.vm.vendor":"Oracle Corporation","common.loader":"\"D:/tools/apache-tomcat-9.0.83/lib\",\"D:/tools/apache-tomcat-9.0.83/lib/*.jar\",\"${catalina.home}/lib\",\"${catalina.home}/lib/*.jar\"","java.runtime.name":"Java(TM) SE Runtime Environment","sun.java.command":"org.apache.catalina.startup.Bootstrap start","java.class.path":"D:\\tools\\apache-tomcat-9.0.83\\bin\\bootstrap.jar;D:\\tools\\apache-tomcat-9.0.83\\bin\\tomcat-juli.jar;C:\\Users\\zhangxuefeng\\AppData\\Local\\JetBrains\\IntelliJIdea2021.3\\captureAgent\\debugger-agent.jar","blade.is-local":"true","com.sun.management.jmxremote.access.file":"C:\\Users\\zhangxuefeng\\AppData\\Local\\JetBrains\\IntelliJIdea2021.3\\tomcat\\86eb4124-3d0a-4a89-a800-6406960798c0\\jmxremote.access","java.vm.specification.name":"Java Virtual Machine Specification","java.vm.specification.version":"1.8","catalina.home":"D:\\tools\\apache-tomcat-9.0.83","sun.cpu.endian":"little","sun.os.patch.level":"","java.io.tmpdir":"D:\\tools\\apache-tomcat-9.0.83\\temp","spring.cloud.nacos.discovery.password":"nacos","spring.cloud.nacos.config.ext-config[0].refresh":"true","java.vendor.url.bug":"http://bugreport.sun.com/bugreport/","dubbo.metadata-report.username":"nacos","server.loader":"","java.rmi.server.hostname":"127.0.0.1","os.arch":"amd64","java.awt.graphicsenv":"sun.awt.Win32GraphicsEnvironment","java.ext.dirs":"D:\\Java\\jdk1.8.0_311\\jre\\lib\\ext;C:\\WINDOWS\\Sun\\Java\\lib\\ext","spring.cloud.nacos.discovery.username":"nacos","user.dir":"D:\\tools\\apache-tomcat-9.0.83\\bin","spring.application.name":"blade-gateway","spring.profiles.active":"test","line.separator":"\r\n","java.vm.name":"Java HotSpot(TM) 64-Bit Server VM","ignore.endorsed.dirs":"","file.encoding":"UTF-8","com.sun.management.jmxremote.password.file":"C:\\Users\\zhangxuefeng\\AppData\\Local\\JetBrains\\IntelliJIdea2021.3\\tomcat\\86eb4124-3d0a-4a89-a800-6406960798c0\\jmxremote.password","java.specification.version":"1.8","intellij.debug.agent":"true","spring.cloud.nacos.config.ext-config[0].data-id":"blade-test.yaml","spring.cloud.nacos.config.ext-config[0].group":"DEFAULT_GROUP"}

                   ______  _             _       ___   ___

                   | ___ \| |           | |      \  \ /  /

                   | |_/ /| |  __ _   __| |  ___  \  V  /

                   | ___ \| | / _` | / _` | / _ \   > <

                   | |_/ /| || (_| || (_| ||  __/ /  .  \

                   \____/ |_| \__,_| \__,_| \___|/__/ \__\


:: BladeX 2.9.0.HHJ :: blade-gateway:test :: Running SpringBoot 2.3.12.RELEASE :: 


2023-11-29 15:29:30.396  INFO 13220 --- [on(2)-127.0.0.1] org.reflections.Reflections              : Reflections took 132 ms to scan 1 urls, producing 3 keys and 6 values 

2023-11-29 15:29:30.506  INFO 13220 --- [on(2)-127.0.0.1] org.reflections.Reflections              : Reflections took 33 ms to scan 1 urls, producing 4 keys and 9 values 

2023-11-29 15:29:30.534  INFO 13220 --- [on(2)-127.0.0.1] org.reflections.Reflections              : Reflections took 16 ms to scan 1 urls, producing 3 keys and 10 values 

2023-11-29 15:29:30.708  INFO 13220 --- [on(2)-127.0.0.1] org.reflections.Reflections              : Reflections took 166 ms to scan 243 urls, producing 0 keys and 0 values 

2023-11-29 15:29:30.721  INFO 13220 --- [on(2)-127.0.0.1] org.reflections.Reflections              : Reflections took 11 ms to scan 1 urls, producing 1 keys and 5 values 

2023-11-29 15:29:30.738  INFO 13220 --- [on(2)-127.0.0.1] org.reflections.Reflections              : Reflections took 10 ms to scan 1 urls, producing 1 keys and 7 values 

2023-11-29 15:29:30.757  INFO 13220 --- [on(2)-127.0.0.1] org.reflections.Reflections              : Reflections took 10 ms to scan 1 urls, producing 2 keys and 8 values 

2023-11-29 15:29:30.897  INFO 13220 --- [on(2)-127.0.0.1] org.reflections.Reflections              : Reflections took 130 ms to scan 243 urls, producing 0 keys and 0 values 

2023-11-29 15:29:34.302  WARN 13220 --- [on(2)-127.0.0.1] c.a.c.n.c.NacosPropertySourceBuilder     : Ignore the empty nacos configuration and get it based on dataId[blade-gateway] & group[DEFAULT_GROUP]

2023-11-29 15:29:34.306  WARN 13220 --- [on(2)-127.0.0.1] c.a.c.n.c.NacosPropertySourceBuilder     : Ignore the empty nacos configuration and get it based on dataId[blade-gateway.yaml] & group[DEFAULT_GROUP]

2023-11-29 15:29:34.310  INFO 13220 --- [on(2)-127.0.0.1] b.c.PropertySourceBootstrapConfiguration : Located property source: [BootstrapPropertySource {name='bootstrapProperties-blade-gateway-test.yaml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-blade-gateway.yaml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-blade-gateway,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-blade-test.yaml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-blade.yaml,DEFAULT_GROUP'}]

2023-11-29 15:29:34.385  INFO 13220 --- [on(2)-127.0.0.1] o.s.gateway.GateWayWarApplication        : The following profiles are active: test

2023-11-29 15:29:37.937  INFO 13220 --- [on(2)-127.0.0.1] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!

2023-11-29 15:29:37.950  INFO 13220 --- [on(2)-127.0.0.1] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Redis repositories in DEFAULT mode.

2023-11-29 15:29:38.045  INFO 13220 --- [on(2)-127.0.0.1] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 53ms. Found 0 Redis repository interfaces.

2023-11-29 15:29:38.245  WARN 13220 --- [on(2)-127.0.0.1] o.s.boot.actuate.endpoint.EndpointId     : Endpoint ID 'service-registry' contains invalid characters, please migrate to a valid format.

2023-11-29 15:29:38.290  WARN 13220 --- [on(2)-127.0.0.1] o.s.boot.actuate.endpoint.EndpointId     : Endpoint ID 'hystrix.stream' contains invalid characters, please migrate to a valid format.

2023-11-29 15:29:38.977  INFO 13220 --- [on(2)-127.0.0.1] o.s.cloud.context.scope.GenericScope     : BeanFactory id=1ae20353-b9d6-35de-8509-9012683f50df

2023-11-29 15:29:38.981  INFO 13220 --- [on(2)-127.0.0.1] s.c.l.p.BladePropertySourcePostProcessor : BladePropertySourcePostProcessor init.

2023-11-29 15:29:38.982  INFO 13220 --- [on(2)-127.0.0.1] s.c.l.p.BladePropertySourcePostProcessor : BladePropertySourcePostProcessor process @BladePropertySource bean.

2023-11-29 15:29:39.040  WARN 13220 --- [on(2)-127.0.0.1] s.c.l.p.BladePropertySourcePostProcessor : Not found @BladePropertySource on spring bean class.

2023-11-29 15:29:40.053  INFO 13220 --- [on(2)-127.0.0.1] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.client.loadbalancer.reactive.LoadBalancerBeanPostProcessorAutoConfiguration' of type [org.springframework.cloud.client.loadbalancer.reactive.LoadBalancerBeanPostProcessorAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2023-11-29 15:29:40.057  INFO 13220 --- [on(2)-127.0.0.1] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.client.loadbalancer.reactive.LoadBalancerBeanPostProcessorAutoConfiguration$ReactiveLoadBalancerConfig' of type [org.springframework.cloud.client.loadbalancer.reactive.LoadBalancerBeanPostProcessorAutoConfiguration$ReactiveLoadBalancerConfig] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2023-11-29 15:29:40.062  INFO 13220 --- [on(2)-127.0.0.1] trationDelegate$BeanPostProcessorChecker : Bean 'deferringLoadBalancerExchangeFilterFunction' of type [org.springframework.cloud.client.loadbalancer.reactive.DeferringLoadBalancerExchangeFilterFunction] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2023-11-29 15:29:40.078  INFO 13220 --- [on(2)-127.0.0.1] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 5678 ms

2023-11-29 15:29:41.135  WARN 13220 --- [on(2)-127.0.0.1] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.

2023-11-29 15:29:41.135  INFO 13220 --- [on(2)-127.0.0.1] c.n.c.sources.URLConfigurationSource     : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.

2023-11-29 15:29:41.190  INFO 13220 --- [on(2)-127.0.0.1] c.netflix.config.DynamicPropertyFactory  : DynamicPropertyFactory is initialized with configuration sources: com.netflix.config.ConcurrentCompositeConfiguration@c27c659

2023-11-29 15:29:45.720  WARN 13220 --- [on(2)-127.0.0.1] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.

2023-11-29 15:29:45.722  INFO 13220 --- [on(2)-127.0.0.1] c.n.c.sources.URLConfigurationSource     : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.

2023-11-29 15:29:46.075  WARN 13220 --- [on(2)-127.0.0.1] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cloud.gateway.config.GatewayClassPathWarningAutoConfiguration$SpringMvcFoundOnClasspathConfiguration': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.gateway.config.GatewayClassPathWarningAutoConfiguration$SpringMvcFoundOnClasspathConfiguration]: Constructor threw exception; nested exception is org.springframework.cloud.gateway.support.MvcFoundOnClasspathException

2023-11-29 15:29:46.229  INFO 13220 --- [on(2)-127.0.0.1] ConditionEvaluationReportLoggingListener : 


Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.

2023-11-29 15:29:46.355 ERROR 13220 --- [on(2)-127.0.0.1] o.s.b.d.LoggingFailureAnalysisReporter   : 


***************************

APPLICATION FAILED TO START

***************************


Description:


Spring MVC found on classpath, which is incompatible with Spring Cloud Gateway.


Action:


Please set spring.main.web-application-type=reactive or remove spring-boot-starter-web dependency.


29-Nov-2023 15:29:46.356 严重 [RMI TCP Connection(2)-127.0.0.1] org.apache.tomcat.util.modeler.BaseModelMBean.invoke 调用方法[manageApp]时发生异常

java.lang.IllegalStateException: 启动子级时出错

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:686)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:658)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:661)

at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1782)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:294)

at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)

at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)

at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:453)

at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:407)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:294)

at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)

at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)

at com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:468)

at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)

at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)

at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309)

at java.security.AccessController.doPrivileged(Native Method)

at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1408)

at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)

at sun.rmi.transport.Transport$1.run(Transport.java:200)

at sun.rmi.transport.Transport$1.run(Transport.java:197)

at java.security.AccessController.doPrivileged(Native Method)

at sun.rmi.transport.Transport.serviceCall(Transport.java:196)

at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573)

at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834)

at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)

at java.security.AccessController.doPrivileged(Native Method)

at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

at java.lang.Thread.run(Thread.java:748)

Caused by: org.apache.catalina.LifecycleException: 无法启动组件[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/blade_gateway_war]]

at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:419)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:186)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:683)

... 43 more

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cloud.gateway.config.GatewayClassPathWarningAutoConfiguration$SpringMvcFoundOnClasspathConfiguration': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.gateway.config.GatewayClassPathWarningAutoConfiguration$SpringMvcFoundOnClasspathConfiguration]: Constructor threw exception; nested exception is org.springframework.cloud.gateway.support.MvcFoundOnClasspathException

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1323)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1218)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:556)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)

at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:897)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551)

at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143)

at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:755)

at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)

at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:402)

at org.springframework.boot.SpringApplication.run(SpringApplication.java:312)

at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:173)

at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:153)

at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:95)

at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:172)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4904)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)

... 44 more

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.gateway.config.GatewayClassPathWarningAutoConfiguration$SpringMvcFoundOnClasspathConfiguration]: Constructor threw exception; nested exception is org.springframework.cloud.gateway.support.MvcFoundOnClasspathException

at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:217)

at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1315)

... 65 more

Caused by: org.springframework.cloud.gateway.support.MvcFoundOnClasspathException

at org.springframework.cloud.gateway.config.GatewayClassPathWarningAutoConfiguration$SpringMvcFoundOnClasspathConfiguration.(GatewayClassPathWarningAutoConfiguration.java:46)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:204)

... 67 more

29-Nov-2023 15:29:46.361 严重 [RMI TCP Connection(2)-127.0.0.1] org.apache.tomcat.util.modeler.BaseModelMBean.invoke 调用方法[createStandardContext]时发生异常

javax.management.RuntimeOperationsException: 调用方法[manageApp]时发生异常

at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:304)

at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)

at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)

at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:453)

at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:407)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:294)

at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)

at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)

at com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:468)

at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)

at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)

at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309)

at java.security.AccessController.doPrivileged(Native Method)

at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1408)

at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)

at sun.rmi.transport.Transport$1.run(Transport.java:200)

at sun.rmi.transport.Transport$1.run(Transport.java:197)

at java.security.AccessController.doPrivileged(Native Method)

at sun.rmi.transport.Transport.serviceCall(Transport.java:196)

at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573)

at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834)

at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)

at java.security.AccessController.doPrivileged(Native Method)

at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

at java.lang.Thread.run(Thread.java:748)

Caused by: java.lang.IllegalStateException: 启动子

1条回答
  •  admin
    admin (楼主)
    2023-12-01 10:45

    springcloud gateway 是由 WebFlux + Netty + Reactor 实现的响应式的 API 网关。它不能在传统的 servlet 容器中工作,也不能构建成 war 包。


    你可以看下具体报错的说明:

    ***************************
    APPLICATION FAILED TO START
    ***************************
    
    Description:
    
    Spring MVC found on classpath, which is incompatible with Spring Cloud Gateway.
    
    Action:
    
    Please set spring.main.web-application-type=reactive or remove spring-boot-starter-web dependency.


    参考资料见springcloud官网说明,你们可以考虑使用其他网关中间件替代,或者用jar、docker启动,把他当成一个中间件来部署,而不是服务部署。

    image.png

    作者追问:2023-12-01 10:45


    现在是因为需要把应用迁移到金蝶中间件,环境要求打成war包服务才可以使用,我们的其他项目均已正常改造并可正常启动服务,只是gateway项目改造后无法启动

    下面推荐改造的方式都使用过,也没有解决项目启动的问题


    ***************************


    APPLICATION FAILED TO START

    ***************************



    Description:



    Spring MVC found on classpath, which is incompatible with Spring Cloud Gateway.



    Action:



    Please set spring.main.web-application-type=reactive or remove spring-boot-starter-web dependency.

    咱有没有bladex架构 适应金蝶中间件部署模式或者帖子







    回答: 2023-12-01 10:45

    springcloud官网说了,不支持war,那自然就能用war到金碟启动

    0 讨论(0)
提交回复