users@glassfish.java.net

Re: Weird error while deploying EAR / WAR on WinXP / Linux

From: <glassfish_at_javadesktop.org>
Date: Sat, 14 Nov 2009 11:35:39 PST

After quite some hours of headache, I could narrow the problem. It comes from interceptors, and I could reproduce this bug (ok, I'm not sure it's one, but it smells like one...) on a trivial case.

If you make an EJB interceptor with an annotated method :
@AroundInvoke
public Object myMethod(InvocationContext context) throws Exception

then, creating another method of the same name in the same class leads to an Exception at runtime :
java.lang.IllegalArgumentException: argument type mismatch in the case you have one argument in the other method, not of the type InvocationContext
java.lang.IllegalArgumentException: too many argument if this method has more than one argument.

The stack trace is not trivial to link with what's really happenning...

Renaming that offending method is a straitghforward workaround.

What I cant explain is : why does it work on WinXP and not on Linux / Mac OS ? I also tested WinXP on a Mac Book, and saw that bug too...

I dont know if it's a known issue, my apologies in that case.

José
[Message sent by forum member 'jpaumard' ]

http://forums.java.net/jive/thread.jspa?messageID=371845