Re: T5 IoC Advice: Inconsistent args_size for opc_invokeinterface

2011-04-17 Thread Adriaan Joubert
Hi Howard,

Sorry, should have included it. I'm running

java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)

on Ubuntu 10.10.

I've had the feeling this may be a tough one to pin down. I can work
around it for now by excluding some methods, so can wait for the ASM
implementation and then try again.

Cheers,

Adriaan

On 17 April 2011 22:15, Howard Lewis Ship  wrote:
> What JDK are you compiling for, executing under?
>
> It's very hard to say what the problem really is ... a bug in the
> wrappers around Tapestry or a bug in Javassist.  I'm hoping that the
> 5.3 code, based on wrappers around ASM, will be faster, more
> efficient, and more stable.
>
> On Sun, Apr 17, 2011 at 12:30 AM, Adriaan Joubert  
> wrote:
>>> Which Tapestry-IoC version are you using?
>>
>> I tried with both 5.1.0.5 and 5.2.4.
>>
>> I should also mention that I thought this may have something to do
>> with other advisors (we use them for transaction management as well as
>> checking that a slave database has caught up to a certain point). I've
>> marked all of these to prevent decoration and the specific method
>> where it fails every time is not decorated other than by the timing
>> advice.
>>
>> After more experimentation I can get this to run through with only
>> excluding a handful of methods from the timing advice, all of them in
>> a single service. These methods are always called from methods in
>> other services, so the advice will appear more than once on the call
>> chain. However in many other cases this does not cause any problems. I
>> can't see anything special about any of the methods causing the
>> problems, or the service for that matter, but they do create the
>> problem in a reproducible fashion.
>>
>> A typical signature is
>>
>> public MonthlyStandardReturnsSeries create(TimeSeries timeSeries,
>> MonthRange itv, double[] values);
>>
>> so nothing special. I have methods in the same service that use
>> generic types, e.g. and they cause no problems. Any hint what to look
>> for would be great - seems that this is usually a call out of the
>> javassist generated code, so it is kind-of hard to debug.
>>
>> Cheers,
>>
>> Adriaan
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5 IoC Advice: Inconsistent args_size for opc_invokeinterface

2011-04-17 Thread Howard Lewis Ship
What JDK are you compiling for, executing under?

It's very hard to say what the problem really is ... a bug in the
wrappers around Tapestry or a bug in Javassist.  I'm hoping that the
5.3 code, based on wrappers around ASM, will be faster, more
efficient, and more stable.

On Sun, Apr 17, 2011 at 12:30 AM, Adriaan Joubert  wrote:
>> Which Tapestry-IoC version are you using?
>
> I tried with both 5.1.0.5 and 5.2.4.
>
> I should also mention that I thought this may have something to do
> with other advisors (we use them for transaction management as well as
> checking that a slave database has caught up to a certain point). I've
> marked all of these to prevent decoration and the specific method
> where it fails every time is not decorated other than by the timing
> advice.
>
> After more experimentation I can get this to run through with only
> excluding a handful of methods from the timing advice, all of them in
> a single service. These methods are always called from methods in
> other services, so the advice will appear more than once on the call
> chain. However in many other cases this does not cause any problems. I
> can't see anything special about any of the methods causing the
> problems, or the service for that matter, but they do create the
> problem in a reproducible fashion.
>
> A typical signature is
>
> public MonthlyStandardReturnsSeries create(TimeSeries timeSeries,
> MonthRange itv, double[] values);
>
> so nothing special. I have methods in the same service that use
> generic types, e.g. and they cause no problems. Any hint what to look
> for would be great - seems that this is usually a call out of the
> javassist generated code, so it is kind-of hard to debug.
>
> Cheers,
>
> Adriaan
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5 IoC Advice: Inconsistent args_size for opc_invokeinterface

2011-04-17 Thread Adriaan Joubert
> Which Tapestry-IoC version are you using?

I tried with both 5.1.0.5 and 5.2.4.

I should also mention that I thought this may have something to do
with other advisors (we use them for transaction management as well as
checking that a slave database has caught up to a certain point). I've
marked all of these to prevent decoration and the specific method
where it fails every time is not decorated other than by the timing
advice.

After more experimentation I can get this to run through with only
excluding a handful of methods from the timing advice, all of them in
a single service. These methods are always called from methods in
other services, so the advice will appear more than once on the call
chain. However in many other cases this does not cause any problems. I
can't see anything special about any of the methods causing the
problems, or the service for that matter, but they do create the
problem in a reproducible fashion.

A typical signature is

public MonthlyStandardReturnsSeries create(TimeSeries timeSeries,
MonthRange itv, double[] values);

so nothing special. I have methods in the same service that use
generic types, e.g. and they cause no problems. Any hint what to look
for would be great - seems that this is usually a call out of the
javassist generated code, so it is kind-of hard to debug.

Cheers,

Adriaan

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5 IoC Advice: Inconsistent args_size for opc_invokeinterface

2011-04-16 Thread Thiago H. de Paula Figueiredo
On Sat, 16 Apr 2011 09:22:52 -0300, Adriaan Joubert   
wrote:



Hi,


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


Which Tapestry-IoC version are you using?

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



T5 IoC Advice: Inconsistent args_size for opc_invokeinterface

2011-04-16 Thread Adriaan Joubert
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