在Websphere上使用Aspectj [英] using Aspectj on Websphere

查看:246
本文介绍了在Websphere上使用Aspectj的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在Spring源工具套件中使用Aspectj编译时加载..当我们尝试在websphere服务器上部署这个项目时,我们得到以下异常。这个项目在tomcat服务器上正常工作..是有一些问题使用库作为AspectJ编译器已经存在于Spring Source Tool中。

we are using Aspectj compile time loading in Spring source tool suite..when we are trying to deploy this project on websphere server ,we are getting following exception .this project work fine on the tomcat server..is there is some problem with libraries as AspectJ compiler is are already there in Spring Source Tool.

Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions
(1) are:
PropertyAccessException 1: org.springframework.beans.MethodInvocationException: 
Property 'exceptionProp' threw exception; nested exception is java.lang.NoSuchMethodError:   org/aspectj/runtime/internal/AroundClosure.linkClosureAndJoinPoint(I)
Lorg/aspectj/lang/ProceedingJoinPoint


推荐答案

WebSphere附带了它自己的AspectJ Runtime版本。它安装在:

WebSphere ships with it's own version of AspectJ Runtime. It is installed in:

base _ $ {version} /lib/aspectjrt.jar

base_${version}/lib/aspectjrt.jar

翻转类加载器从'父亲优先'到'父亲最后'的订单将无效 - 您必须采取不同的路线。

Flipping the class loader order from 'parent first' to 'parent last' won't work -- you'll have to take a different route.


  1. 创建共享库(在WebSphere管理控制台中)

  2. 将您的AspectJ版本添加到此共享库

  3. 为您的应用程序或服务器创建新的类加载器并将此类加载器附加到它。

有关如何操作的说明可以在IBM的网站上找到:

Instructions on how do to this can be found on IBM's website:

http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.nd.doc/info /ae/ae/tcws_sharedlib.html

这篇关于在Websphere上使用Aspectj的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆