It is indirectly referenced from required .class file 错误解决方法

本文介绍了一种常见的Java开发中遇到的'Itisindirectlyreferencedfromrequired.classfile'错误及其解决方法。该错误通常由于项目中缺失某些依赖包引起。文章通过调整项目的JDK版本设置来解决此问题。

今天在导入一个项目时出现It is indirectly referenced from required .class file 的错误,查了一下网,都说是

 

错误提示: It is indirectly referenced from required .class file 错误的解决

原因:你正要使用的类调用了另一个类,而这个类又调用了其他类,这种关系可能会有好多层。而在这个调用的过程中,某个类所在的包的缺失就会造成以上那个错误。

解决方法:导入缺失的包

 

我机器上装了JDK1.5和JDK1.6,然后我修改了下项目默认调用的JDK为JDK1.5,问题解决

2025-10-10 11:28:00 [main] ERROR o.s.boot.SpringApplication - Application run failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'deviceFourgToDeviceFourgVoMapperImpl' defined in file [C:\Users\Administrator\IdeaProjects\RuoYi-Cloud-Plus\qz-project\TechnicalSupport\target\classes\tl\qzgaj\TechnicalSupport\domain\DeviceFourgToDeviceFourgVoMapperImpl.class]: Failed to instantiate [tl.qzgaj.TechnicalSupport.domain.DeviceFourgToDeviceFourgVoMapperImpl]: Constructor threw exception at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1357) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1242) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:569) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:529) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:339) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:373) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:337) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202);Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [tl.qzgaj.TechnicalSupport.domain.DeviceFourgToDeviceFourgVoMapperImpl]: Constructor threw exception;Caused by: java.lang.Error: Unresolved compilation problems: The type org.dromara.common.mybatis.core.domain.BaseEntity cannot be resolved. It is indirectly referenced from required type tl.qzgaj.TechnicalSupport.domain.DeviceFourg The method getCreateTime() is undefined for the type DeviceFourg The method getCreateTime() is undefined for the type DeviceFourg
最新发布
10-11
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值