Hi,
I've got the simplest throwAdvice defined:
the advice:Code:<aop:config> <aop:pointcut id="integrationMethods" expression="execution(* my.package..integration..*(..))" /> <aop:aspect ref="theAdvice"> <aop:after-throwing pointcut-ref="integrationMethods" throwing="exception" method="wrapException" /> </aop:aspect> </aop:config> <bean id="theAdvice" class="my.package.IntegrationLayerExceptionAdvice"/>
The idea is to automatically wrap all exceptions coming from the integration layer.Code:public class IntegrationLayerExceptionAdvice { public void wrapException(Exception exception) { exception = new IntegrationLayerException(exception.getMessage(), exception.getCause()); } }
Deploying this under weblogic 8.1sp5 i get:
The problem seems rather obscure, i could only find one related post (http://forum.springframework.org/sho...d.php?p=75684). The asm* and cglib jars are in WEB-INF/lib so i don't think the solution offered there applies.Code:2006-11-08 11:37:28,842 DEBUG [org.springframework.core.LocalVariableTableParameterNameDiscoverer] - IOException whilst attempting to read .class file for class [my.package.IntegrationLayerExceptionAdvice] - unable to determine parameter names for method wrapException java.io.IOException: Class not found at org.objectweb.asm.ClassReader.a(Unknown Source) at org.objectweb.asm.ClassReader.<init>(Unknown Source) at org.objectweb.asm.ClassReader.<init>(Unknown Source) at org.springframework.core.LocalVariableTableParameterNameDiscoverer.visitMethod(LocalVariableTableParameterNameDiscoverer.java:98) at org.springframework.core.LocalVariableTableParameterNameDiscoverer.getParameterNames(LocalVariableTableParameterNameDiscoverer.java:50) at org.springframework.core.PrioritizedParameterNameDiscoverer.getParameterNames(PrioritizedParameterNameDiscoverer.java:54) at org.springframework.aop.aspectj.AbstractAspectJAdvice.bindArgumentsByName(AbstractAspectJAdvice.java:370) at org.springframework.aop.aspectj.AbstractAspectJAdvice.calculateArgumentBindings(AbstractAspectJAdvice.java:331) at org.springframework.aop.aspectj.AbstractAspectJAdvice.afterPropertiesSet(AbstractAspectJAdvice.java:297) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1062)
Thanks
Jorg


Reply With Quote