【问题标题】:AspectJ: Error can't determine superclass of missing typeAspectJ:错误无法确定缺少类型的超类
【发布时间】:2012-05-14 11:40:54
【问题描述】:

我在我们的应用程序中使用方面得到了错误。

我需要什么来解决这个错误或者这对我有什么影响?

[AppClassLoader@13b8f62] error can't determine superclass of missing type xxx.yyy.zzz.execution.SystemVersion
when weaving type xxx.yyy.zzz.execution.DefaultDServerConfigurator
when weaving classes 
when weaving 
 [Xlint:cantFindType]

【问题讨论】:

    标签: aspectj


    【解决方案1】:

    将选项 cantFindType 更改为

    {cantFindType = warning}
    

    ajc.properties 文件中解决了我的问题。

    你可以用-Xlintfile d:\temp\ajc.properties指定属性文件

    【讨论】:

      【解决方案2】:

      这意味着在编织类型xxx.yyy.zzz.execution.DefaultDServerConfigurator时,需要xxx.yyy.zzz.execution.SystemVersion类型,但由于缺少依赖关系,无法加载SystemVersion或其超类。

      基本上,这些方面需要额外的类文件/jar,这些文件/jar 在运行时不在您的类路径中。

      【讨论】:

      • 谢谢。实际上这是 maven 和 Eclipse 之间的奇怪行为。但是您的回答帮助我找出问题所在。
      • 是的,我以为会是这样。 :)
      • @Mur Votema,你是如何解决 Maven+Eclipse 的问题的?我看到了同样的错误(尽管使用 TomcatInstrumentableClassLoader)
      【解决方案3】:

      与 oracle 和 kamon-jdbc 有相同的问题,添加以下 resources/META-INF/aop.xml 文件有帮助:

       <!DOCTYPE aspectj PUBLIC "-//AspectJ//DTD//EN" "http://www.eclipse.org/aspectj/dtd/aspectj.dtd">
      
       <aspectj>
           <weaver options="-Xlint:ignore">
               <include within="oracle.jdbc..*"/>
           </weaver>
       </aspectj>
      

      【讨论】:

      • 谢谢! options="-Xlint:ignore" 成就了我的一天!
      猜你喜欢
      • 1970-01-01
      • 2019-08-12
      • 2021-11-02
      • 1970-01-01
      • 1970-01-01
      • 2017-12-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多