`

It is indirectly referenced from required .class file 错误解析。。。。

 
阅读更多

有时候在变异一些类的时候出现类似It is indirectly referenced from required .class file的错误。

查询的原因可能是如下:

 

在spring2.0 技术手册的第4章第二节 关于Advice的实例BeforeAdviceDemo中

您会发现您书写的LogBeforeAdvice类中并未找到需继承的MethodBeforeAdvice接口,无法导入,原因为书上并未提及需要增加aop的jar包,您需要在工程/Propertise中的Java Build Path中的libraries 选项卡中添加spring-aop.jar,与下载包的路径是spring-framework-2.0.3-with-dependencies/spring-framework-2.0.3/dist/modules

添加之后,eclipse又会报出It is indirectly referenced from required .class file 的错误,其原因为Advice接口需要依赖于关于AOP标准的类,且其类并不在spring-aop.jar中,您需要再次添加依赖的包aopalliance.jar,于下载包的路径为spring-framework-2.0.3-with-dependencies/spring-framework-2.0.3/lib/aopalliance

分享到:
评论

相关推荐

    Java编程排错技巧

    It is indirectly referenced from required .class files  调试Reflact时,Eclipse一直提示The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files。...

    apache-ant-1.8.2.jar

    The type org.apache.tools.ant.Task cannot be resolved. It is indirectly referenced from required .class files错误....., 解决办法:在工程中加入此jar包

    apache-ant-1.8.2.jar DDD

    The type org.apache.tools.ant.Task cannot be resolved. It is indirectly referenced from required .class files 部署openfire4.2.1

    j2objc-annotations-1.1.jar

    The type com.google.j2objc.annotations.ReflectionSupport$Level cannot be resolved. It is indirectly referenced from required .class files

    httpcomponents-client-4.5.5-bin和src_20180518.zip

    It is indirectly referenced from required .class > ★BasicNameValuePair cannot be resolved to a type > ★HttpPost cannot be resolved to a type > ★NameValuePair cannot be resolved to a type > ★...

    xmlpull_1_0_5.jar和xstream-1.4.jar

    The type org.xmlpull.v1.XmlPullParser cannot be resolved. It is indirectly referenced from required .class files报错时导入xmlpull_1_0_5.jar

    spring-tx-4.2.2.RELEASE.jar

    The type org.springframework.dao.DataAccessException cannot be resolved. It is indirectly referenced from required .class files 解决方法: 导入spring-tx-4.2.2.RELEASE.jar包。

    validation-api-2.0.0.Final.jar

    validation-api-2.0.0.Final.jar 主要用于支持Maven项目,缺失可引起以下异常The type javax.validation.Payload cannot be resolved. It is indirectly referenced from required .class files

    FlexGraphics_V_1.79_D4-XE10.2_Downloadly.ir

    Added TFlexFileFormat.StreamSupport property (default True), which difines, is it necessary to open file stream or give the file name only. - FIX: If the TCustomProp.Assign method calls when the ...

    spring-tx.jar

    The type org.springframework.dao.DataAccessException cannot be resolved. It is indirectly referenced异常缺少的包

    微软内部资料-SQL性能优化2

    To reserve or commit memory and unintentionally not release it when it is no longer being used. A process can leak resources such as process memory, pool memory, user and GDI objects, handles, threads...

    The Component Object Model Specification

    Microsoft assumes no responsibility for any damages that might occur either directly or indirectly from these inaccuracies. Microsoft may have trademarks, copyrights, patents or pending patent ...

    hibernate-shards.jar

    of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence ...

    Pro MERN Stack(Apress,2017)

    Facebook’s React is a technology that competes indirectly with AngularJS. It is not a full-fledged MVC framework. It is a JavaScript library for building user interfaces (in some sense the View part)...

    Universal-USB-Installer

    the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be ...

    C# Game Programming Cookbook for Unity 3D - 2014

    4.2 The Timer Class....................................................43 4.2.1 Script Breakdown..........................................45 4.3 Spawn Scripts.............................................

    Bloodshed Dev-C++

    * Removed "Only show classes from current file" option in class browser settings. It used to be a checkbox, allowing only two states (on or off), but there is a third relevant option now: "Project ...

    WizFlow网页编辑

    of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence ...

    poi最新3.1jar包和src

    It does not support the new Excel 2007 .xlsx OOXML file format, which is not OLE2 based. HSSF provides a way to read spreadsheets create, modify, read and write XLS spreadsheets It provides: low ...

Global site tag (gtag.js) - Google Analytics