在 RAD 7.5.5 中使用 AspectJ/AJDT

发布于 2024-12-29 08:05:39 字数 694 浏览 4 评论 0原文

我正在使用 RAD 7.5.5。我从下载网站安装了 AJDT 插件: http://archive.eclipse.org/tools/ajdt/34/update/

我将现有的 Java 项目之一转换为 AspectJ 项目,添加了一个方面以在 methodA() 的方法开始和结束时打印日志语句,重新构建项目并部署。

调用 methodA() 时出现以下异常:

抛出异常:java.lang.NoSuchMethodError: org/aspectj/runtime/reflect/Factory.makeMethodSig(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/ lang/String;)Lorg/aspectj/lang/reflect/MethodSignature;

我用谷歌搜索并发现这可能是由于aspectjrt.jar 的旧版本造成的。但 RAD 扩展了 Eclipse 3.4,因此我添加了与 Eclipse 3.4 (/RAD 7.5.5) 兼容的 AJDT 插件版本。有任何指示可能是什么问题吗?

I'm using RAD 7.5.5. I installed AJDT plugin from the download site:
http://archive.eclipse.org/tools/ajdt/34/update/

I converted one of the existing Java projects to an AspectJ project, added an aspect to print log statements on method start and end of a methodA(), rebuilt the project and deployed.

I'm getting the below exception when methodA() is called:

Exception thrown : java.lang.NoSuchMethodError: org/aspectj/runtime/reflect/Factory.makeMethodSig(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/aspectj/lang/reflect/MethodSignature;

I googled and found this could be caused because of an older version of aspectjrt.jar. But RAD extends Eclipse 3.4 and hence I added the version of AJDT plugin that is compatible with Eclipse 3.4 (/RAD 7.5.5). Any pointers to what could be the problem?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

隔纱相望 2025-01-05 08:05:39

确保aspectjrt.jar位于您的类路径中。另外,请确保它是AJDT 附带的aspectjrt.jar。

Make sure that aspectjrt.jar is on your classpath. Also, make sure that it is the aspectjrt.jar that comes with AJDT.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文