StackOverflow when trying to
nthx Jul 28, 2005 12:39 AMHi there!
I need help cause I cannot figure it out by myself. I got stackOverflow and don't know why... Here's the short code
public void test(){ TestRoot root = new TestRoot(); ((Persistable)root).getObjectByOID(id); }
Output:
[junit] Testcase: testGetObjectByOID took 4,575 sec [junit] Caused an ERROR [junit] null [junit] java.lang.StackOverflowError [junit] at java.lang.Exception.<init>(Exception.java:77) [junit] at java.lang.reflect.InvocationTargetException.<init>(InvocationTargetException.java:54) [junit] at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [junit] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:99) [junit] at org.jboss.aop.ClassAdvisor.invokeMethod(ClassAdvisor.java:1495) [junit] at org.jboss.aop.ClassAdvisor.invokeMethod(ClassAdvisor.java:1468) [junit] at org.nthx.pat.tests.TestRoot._added_m$0(TestRoot.java) [junit] at org.nthx.pat.tests.TestRoot.getObjectByOID(TestRoot.java) [junit] at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [junit] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:99) [junit] at org.jboss.aop.ClassAdvisor.invokeMethod(ClassAdvisor.java:1495) [junit] at org.jboss.aop.ClassAdvisor.invokeMethod(ClassAdvisor.java:1468) [junit] at org.nthx.pat.tests.TestRoot._added_m$0(TestRoot.java) [junit] at org.nthx.pat.tests.TestRoot.getObjectByOID(TestRoot.java) ......and so on..
My configurations:
<introduction expr="class(@pat.root)"> <interfaces> org.nthx.pat.Persistable </interfaces> </introduction> <bind pointcut="call(void $instanceof{org.nthx.pat.Persistable}->getObjectByOID(java.lang.Long))"> <advice aspect="org.nthx.pat.PersistableAspect" name="getObjectByOID"/> </bind> @pat.root public class TestRoot{} public interface Persistable { public Identifiable getObjectByOID(Long OID); } public class PersistableAspect { public Object getObjectByOID(Invocation invocation) throws Throwable { return null; } }
Any idea would be appreciated, cause I really don't know why is this happening. I see nothing making the loop ...
Is it becase I cut a nonexistent method? There is no mixin here..
Regards,
Tomasz