Hi, I tried to build a rough-and-ready timer for service method calls by using an advisor. We already use these for transaction management etc and never had an issue. However after many successful calls I suddenly get:
Exception in thread "Thread-26" java.lang.VerifyError: (class: Invocation$MonthlyTimeSeriesFactory$create$12f5e314f65, method: invokeDelegateMethod signature: ()V) Inconsistent args_size for opc_invokeinterface at $MonthlyTimeSeriesFactory_12f5e31494f.create($MonthlyTimeSeriesFactory_12f5e31494f.java) at $MonthlyTimeSeriesFactory_12f5e31493d.create($MonthlyTimeSeriesFactory_12f5e31493d.java) at com.albourne.db.series.TimeSeriesRetrievalSingleTimeSeriesBuilder.createSeriesFromBuffer(TimeSeriesRetrievalSingleTimeSeriesBuilder.java:122) Without advice this works fine. Interestingly it also works fine when using the built-in tapestry logger. The advisor itself could not be simpler (attached below). Anybody seen this before or any ideas what I should avoid? Thanks, Adriaan final class MethodTimeAdvice implements MethodAdvice { private final String simpleName_; private final MethodTimeCollector methodTimeCollector_; public MethodTimeAdvice(String simpleName, MethodTimeCollector methodTimeCollector) { simpleName_ = simpleName; methodTimeCollector_ = methodTimeCollector; } @Override public void advise(Invocation invocation) { StopWatch stopWatch = new StopWatch(); stopWatch.start(); try { invocation.proceed(); } catch (RuntimeException ex) { logTime(invocation, stopWatch); throw ex; } stopWatch.stop(); logTime(invocation, stopWatch); } private void logTime(Invocation invocation, StopWatch stopWatch) { String methodId = simpleName_ + "." + invocation.getMethodName() + "[" + invocation.getParameterCount() + "]"; methodTimeCollector_.logTime(methodId, stopWatch.getTime()); } } Adding the advice is also straigtforward @PreventServiceDecoration public class MethodTimeLoggerImpl implements MethodTimeLogger { private final MethodTimeCollector methodTimeCollector_; public MethodTimeLoggerImpl(MethodTimeCollector methodTimeCollector) { methodTimeCollector_ = methodTimeCollector; } @Override public void addMethodLogger(MethodAdviceReceiver methodAdviceReceiver) { MethodAdvice advice = new MethodTimeAdvice(methodAdviceReceiver .getInterface().getSimpleName(), methodTimeCollector_); methodAdviceReceiver.adviseAllMethods(advice); } } --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org