Caused by: org.springframework.beans.BeanInstantiationException Create breakpoint : Failed toinstant

org.springframework.beans.factory.BeancreationException Create breakpoint : Error creating bean with’automaticConstruct’: Injection of resource dependencies failed; nested exception isnameorg. p r i n g f r a m e w o r k . b e a n s . f a c t o r y . B e a n C r e a t i o n E x c e p t i o n : E r r o r c r e a t i n g b e a n w i t h n a m e t a b l e M a p p e r ′ d e f i n e d i n U R L [ j a r : f i l e : / c : / a p a c h e − m a v e n − 3.61 / r e s p / c o m / c m o s / m t p − c o m m o n / m t p − c l o u d − 0.1 / m t p − c o m m o n − m t p − c l o u d − 0.1 j a r ! / c o m / m t p / m a p p e r / T a b l e M a p p e r . c l a s s ] : C a n n o t r e s o l v e r e f e r e n c e t o b e a n ′ s q l s e s s i o n T e m p l a t e w h i l e s e t t i n g b e a n p r o p e r t y ′ s q l s e s s i o n T e m p l a t e ′ ; n e s t e d e x c e p t i o n i s o r g . s p r i n g f r a m e w o r k . b e a n s f a c t o r y . U n s a t i s f i e d D e p e n d e n c y E x c e p t i o n : E r r o r c r e a t i n g b e a n w i t h n a m e d a t a S o u r c e S c r i p t D a t a b a s e I n i t i a l i z e r ′ d e f i n e d i n c l a s s p a t h r e s o u r c e [ o r g / s p r i n g f r a m e w o r k / b o o t / a u t o c o n f i g u r e / s q l / i n i t / D a t a S o u r c e I n i t i a l i z a t i o n c o n f i g u r a t i o n . c l a s s ] : U n s a t i s f i e d d e p e n d e n c y e x p r e s s e d t h r o u g h m e t h o d ′ d a t a S o u r c e S c r i p t D a t a b a s e I n i t i a l i z e r ′ p a r a m e t e l 0 ; n e s t e d e x c e p t i o n i s o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y , B e a n C r e a t i o n E x c e p t i o n : E r r o r c r e a t i n g b e a n w i t h n a m e ′ d a t a S o u r c e ′ d e f i n e d i n c l a s s p a t h r e s o u r c e o r g / s p r i n g f r a m e w o r k / b o o t / a u t o c o n f i q u r e / i d b c / D a t a S o u r c e c o n f i q u r a t i o n pringframework.beans.factory.BeanCreationException: Error creating bean with nametableMapper' defined in URL [jar:file:/c:/apache-maven-3.61/resp/com/cmos/mtp-common/mtp-cloud-0.1/mtp-common-mtp-cloud-0.1jar!/com/mtp/mapper/TableMapper.class]: Cannot resolve reference to bean 'sqlsessionTemplatewhile setting bean property 'sqlsessionTemplate'; nested exception is org.springframework.beansfactory.UnsatisfiedDependencyException: Error creating bean with namedataSourceScriptDatabaseInitializer' defined in class path resource[org/springframework/boot/autoconfigure/sql/init/DataSourceInitializationconfiguration.class]:Unsatisfied dependency expressed through method 'dataSourceScriptDatabaseInitializer' parametel0; nested exception is org.springframework.beans.factory,BeanCreationException: Error creatingbean with name 'dataSource' defined in class path resourceorg/springframework/boot/autoconfiqure/idbc/DataSourceconfiquration pringframework.beans.factory.BeanCreationException:ErrorcreatingbeanwithnametableMapperdefinedinURL[jar:file:/c:/apachemaven3.61/resp/com/cmos/mtpcommon/mtpcloud0.1/mtpcommonmtpcloud0.1jar!/com/mtp/mapper/TableMapper.class]:CannotresolvereferencetobeansqlsessionTemplatewhilesettingbeanpropertysqlsessionTemplate;nestedexceptionisorg.springframework.beansfactory.UnsatisfiedDependencyException:ErrorcreatingbeanwithnamedataSourceScriptDatabaseInitializerdefinedinclasspathresource[org/springframework/boot/autoconfigure/sql/init/DataSourceInitializationconfiguration.class]:UnsatisfieddependencyexpressedthroughmethoddataSourceScriptDatabaseInitializerparametel0;nestedexceptionisorg.springframework.beans.factory,BeanCreationException:ErrorcreatingbeanwithnamedataSourcedefinedinclasspathresourceorg/springframework/boot/autoconfiqure/idbc/DataSourceconfiqurationGeneric.class : Beaninstantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory methoddataSource’threwexception:nestedexception is iava.lang.BootstrapMethodError: iava.lang
在这里插入图片描述

Caused by: org.springframework.beans.BeanInstantiationException Create breakpoint : Failed toinstantiate [javax.sql.DataSource]: Factory method ‘dataSource’ threw exception; nestedexception is java.lang.BootstrapMethodError: java.lang.NoclassDefFoundError:com/mchange/v2/c3p0/AbstractComboPooledDataSource
在这里插入图片描述
错误原因,定时任务jar包问题
原jar包:

<dependency>
    <groupId>org.quartz-scheduler</groupId>
    <artifactId>quartz</artifactId>
    <version>2.2.1</version>
</dependency>

改之后

<!-- https://mvnrepository.com/artifact/org.quartz-scheduler/quartz -->
<dependency>
    <groupId>org.quartz-scheduler</groupId>
    <artifactId>quartz</artifactId>
    <version>2.3.2</version>
</dependency>
  • 20
    点赞
  • 21
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值