using Aspectj on Websphere

淺唱寂寞╮ 提交于 2019-12-01 04:56:45

问题


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

回答1:


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

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. Create a Shared Library (in the WebSphere Admin Console)
  2. Add your version of AspectJ to this Shared Library
  3. Create a new Classloader for your application or server and attach this classloader to it.

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



来源:https://stackoverflow.com/questions/6110948/using-aspectj-on-websphere

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!