欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Error starting ApplicationContext. To display the conditions report re-run your application 排查

程序员文章站 2021-12-18 16:31:32
...

jar包启动项目失败,并报错:Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 报错排查及解决;

关于这个报错,错误原因有很多种,初次遇到还需要耐心的看报错日志,如下是我的项目日志:

C:\dxpClient_xxl>java -jar xxl-job-executor-dxp-client-2.3.0.jar

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.3.0.RELEASE)

16:38:27.932 logback [main] INFO  c.x.j.e.e.DxpClientExecutorApplication - Starting DxpClientExecutorApplication on WIN-V0IR22QV38I with PID 4828 (C:\dxpClient_xxl\xxl-job-executor-dxp-client-2.3.0.jar started by Administrator in C:\dxpClient_xxl)
16:38:27.948 logback [main] INFO  c.x.j.e.e.DxpClientExecutorApplication - The following profiles are active: prod96
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (jar:file:/C:/dxpClient_xxl/xxl-job-executor-dxp-client-2.3.0.jar!/BOOT-INF/lib/groovy-2.5.11.jar!/) to method java.lang.Object.finalize()
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
16:38:31.198 logback [main] INFO  o.s.b.w.e.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8085 (http)
16:38:31.213 logback [main] INFO  o.a.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8085"]
16:38:31.213 logback [main] INFO  o.a.catalina.core.StandardService - Starting service [Tomcat]
16:38:31.213 logback [main] INFO  o.a.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.35]
16:38:31.338 logback [main] INFO  o.a.c.c.C.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext
16:38:31.338 logback [main] INFO  o.s.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 3031 ms
BeetlSQL 运行在 product=false,md charset=UTF-8
16:38:32.057 logback [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting...
16:38:32.495 logback [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed.
16:38:32.713 logback [main] INFO  c.x.j.e.e.d.base.BaseQueueHelper - >>>> 初始化(启动) disruptor[FileEventQueueHelper]{}.
16:38:32.745 logback [main] INFO  c.x.j.e.e.d.base.BaseQueueHelper - <<<< disruptor[FileEventQueueHelper] 已启动.
16:38:32.917 logback [main] WARN  o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dxpRcvJobHandler': Unsatisfied dependency expressed through field 'iRcvService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'rcvServiceImpl': Unsatisfied dependency expressed through field 'iEnteTransportRecvFilesService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'enteTransportRecvFilesService' defined in class path resource [org/beigege/customs/eport/config/CxfConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.beigege.customs.eport.service.IEnteTransportRecvFilesService]: Factory method 'enteTransportRecvFilesService' threw exception; nested exception is java.lang.NoClassDefFoundError: javax/xml/ws/BindingProvider
16:38:32.917 logback [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Shutdown initiated...
16:38:33.026 logback [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Shutdown completed.
16:38:33.042 logback [main] INFO  o.a.catalina.core.StandardService - Stopping service [Tomcat]
16:38:33.057 logback [main] INFO  o.s.b.a.l.ConditionEvaluationReportLoggingListener -

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
16:38:33.057 logback [main] ERROR o.s.boot.SpringApplication - Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dxpRcvJobHandler': Unsatisfied dependency expressed through field 'iRcvService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'rcvServiceImpl': Unsatisfied dependency expressed through field 'iEnteTransportRecvFilesService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'enteTransportRecvFilesService' defined in class path resource [org/beigege/customs/eport/config/CxfConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.beigege.customs.eport.service.IEnteTransportRecvFilesService]: Factory method 'enteTransportRecvFilesService' threw exception; nested exception is java.lang.NoClassDefFoundError: javax/xml/ws/BindingProvider
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:643)
        at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:130)
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1422)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:895)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750)
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
        at com.xha.job.export.executor.DxpClientExecutorApplication.main(DxpClientExecutorApplication.java:10)
        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:49)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:107)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
        at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'rcvServiceImpl': Unsatisfied dependency expressed through field 'iEnteTransportRecvFilesService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'enteTransportRecvFilesService' defined in class path resource [org/beigege/customs/eport/config/CxfConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.beigege.customs.eport.service.IEnteTransportRecvFilesService]: Factory method 'enteTransportRecvFilesService' threw exception; nested exception is java.lang.NoClassDefFoundError: javax/xml/ws/BindingProvider
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:643)
        at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:130)
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1422)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
        at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1306)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1226)
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640)
        ... 28 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'enteTransportRecvFilesService' defined in class path resource [org/beigege/customs/eport/config/CxfConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.beigege.customs.eport.service.IEnteTransportRecvFilesService]: Factory method 'enteTransportRecvFilesService' threw exception; nested exception is java.lang.NoClassDefFoundError: javax/xml/ws/BindingProvider
        at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:656)
        at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:484)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
        at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1306)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1226)
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640)
        ... 41 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.beigege.customs.eport.service.IEnteTransportRecvFilesService]: Factory method 'enteTransportRecvFilesService' threw exception; nested exception is java.lang.NoClassDefFoundError: javax/xml/ws/BindingProvider
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
        at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651)
        ... 54 common frames omitted
Caused by: java.lang.NoClassDefFoundError: javax/xml/ws/BindingProvider
        at java.base/java.lang.ClassLoader.defineClass1(Native Method)
        at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
        at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
        at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:555)
        at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458)
        at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
        at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:151)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
        at org.beigege.customs.eport.util.EnteTransportServiceUtil.createEnteTransportService(EnteTransportServiceUtil.java:69)
        at org.beigege.customs.eport.util.EnteTransportServiceUtil.createEnteTransportRecvFilesService(EnteTransportServiceUtil.java:56)
        at org.beigege.customs.eport.config.CxfConfig.enteTransportRecvFilesService(CxfConfig.java:78)
        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.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
        ... 55 common frames omitted
Caused by: java.lang.ClassNotFoundException: javax.xml.ws.BindingProvider
        at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:476)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
        at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:151)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
        ... 74 common frames omitted
16:38:33.073 logback [main] WARN  o.s.boot.SpringApplication - Unable to close ApplicationContext
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'exportSqlManager': Cannot resolve reference to bean 'exportSqlManagerBeetlSqlDataSourceBean' while setting bean property 'cs'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'exportSqlManagerBeetlSqlDataSourceBean': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: org.springframework.boot.web.ser[email protected]47e2e487 has not been refreshed yet
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:342)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:113)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1699)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1444)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207)
        at org.springframework.context.event.AbstractApplicationEventMulticaster.retrieveApplicationListeners(AbstractApplicationEventMulticaster.java:245)
        at org.springframework.context.event.AbstractApplicationEventMulticaster.getApplicationListeners(AbstractApplicationEventMulticaster.java:197)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:134)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:403)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:360)
        at org.springframework.boot.availability.AvailabilityChangeEvent.publish(AvailabilityChangeEvent.java:81)
        at org.springframework.boot.availability.AvailabilityChangeEvent.publish(AvailabilityChangeEvent.java:67)
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.doClose(ServletWebServerApplicationContext.java:167)
        at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:978)
        at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:814)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:325)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
        at com.xha.job.export.executor.DxpClientExecutorApplication.main(DxpClientExecutorApplication.java:10)
        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:49)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:107)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
        at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'exportSqlManagerBeetlSqlDataSourceBean': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: org.springframework.boot.web.ser[email protected]47e2e487 has not been refreshed yet
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:178)
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:135)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1821)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getObjectForBeanInstance(AbstractAutowireCapableBeanFactory.java:1266)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:330)
        ... 31 common frames omitted
Caused by: java.lang.IllegalStateException: org.springframework.boot.web.ser[email protected]47e2e487 has not been refreshed yet
        at org.springframework.context.support.AbstractApplicationContext.assertBeanFactoryActive(AbstractApplicationContext.java:1095)
        at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1107)
        at org.beetl.sql.starter.ConnectionSourceFactory.getObject(ConnectionSourceFactory.java:28)
        at org.beetl.sql.starter.ConnectionSourceFactory.getObject(ConnectionSourceFactory.java:15)
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:171)
        ... 37 common frames omitted

核心的报错为:org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dxpRcvJobHandler': Unsatisfied dependency expressed through field 'iRcvService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'rcvServiceImpl': Unsatisfied dependency expressed through field 'iEnteTransportRecvFilesService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'enteTransportRecvFilesService' defined in class path resource [org/beigege/customs/eport/config/CxfConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.beigege.customs.eport.service.IEnteTransportRecvFilesService]: Factory method 'enteTransportRecvFilesService' threw exception; nested exception is java.lang.NoClassDefFoundError: javax/xml/ws/BindingProvider

我也是很懵逼,因为是在idea中启动完全正常,在同一台电脑java -jar方式启动就报错,看日志似乎是引用了同事的包beigege,导致的,咨询大佬,确定是java.lang.NoClassDefFoundError: javax/xml/ws/BindingProvider,引用的beigege的包里缺少javax/xml/ws/BindingProvider这个类导致的,我需要查一下,在pom上引入即可:

<dependency>
            <groupId>javax.xml.ws</groupId>
            <artifactId>jaxws-api</artifactId>
            <version>2.3.1</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish</groupId>
            <artifactId>javax.jws</artifactId>
            <version>3.2-b06</version>
        </dependency>

引入后顺利启动项目。

maven仓库查询地址:仓库服务 (aliyun.com)Error starting ApplicationContext. To display the conditions report re-run your application 排查https://developer.aliyun.com/mvn/search

最后放几个我查到的资料,遇到同样问题的朋友可以看看:

​​​​​​解决Error starting ApplicationContext. To display the conditions report re-run your application_狠情的博客-CSDN博客

Error starting ApplicationContext. To display the conditions report re-run your application with 'de_风中孤寂-CSDN博客

运行时报错Unsatisfied dependency expressed through field 常见错误原因_努力奋斗的小猿的博客-CSDN博客_unsatisfieddependency