Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] problems with thisJoinPoint and J2ME

Hi,

I have written the following test-aspect, which brings my application to crash and at the moment I don't know why, maybe you can give me an hint for a solution. Here is my aspect-code:

public aspect MethodCallTraceAspect
{
pointcut tracePoints() : call(* sms.library.ValidityChecker.isPhoneNumberValid(..));

before() : tracePoints()
{
 System.out.println("Before");
 System.out.println("Entering " + thisJoinPoint);
}

}

Everything compiles well, but when I start to run it, the WTK emulator crashes and I get the following output:
-----------------------
[exec] Method............: e653bc 'org/aspectj/runtime/reflect/Factory.<ini
t> (virtual)'
    [exec] Stack Chunk.......: e60750
[exec] ALERT: java/lang/NoSuchMethodError: No such method getClassLoader.()
Ljava/lang/ClassLoader;.
    [exec] Frame Pointer.....: e60764
    [exec] Current IP........: e653b0 = e653a0 + offset 16
    [exec] Previous Frame....: df0bd0
    [exec] Previous IP.......: e67832 (offset 14)
    [exec] Frame size........: 3 (3 arguments, 0 local variables)
    [exec] Argument[0].......: e60728
    [exec] Argument[1].......: e67c74
    [exec] Argument[2].......: e68a74
    [exec] Operand[1]........: e60728
    [exec] Operand[2]........: e68a74

    [exec] Method............: e6796c 'be.<clinit> (static)'
    [exec] Stack Chunk.......: df0a14
    [exec] Frame Pointer.....: df0bd0
    [exec] Current IP........: e67832 = e67824 + offset 14
    [exec] Previous Frame....: df0ba8
    [exec] Previous IP.......: 10155b6b (offset 0)
    [exec] Frame size........: 1 (0 arguments, 1 local variables)
    [exec] Local[0]..........: 100ec0fc
    [exec] Operand[1]........: e60728

[exec] Method............: 100ee6d0 'java/lang/Class.runCustomCode (static)
'
    [exec] Stack Chunk.......: df0a14
    [exec] Frame Pointer.....: df0ba8
    [exec] Current IP........: 10155b6b = 10155b6b + offset 0
    [exec] Previous Frame....: df0b90
    [exec] Previous IP.......: e682b4 (offset 0)
    [exec] Frame size........: 0 (0 arguments, 0 local variables)
    [exec] Operand[1]........: 100016a5
    [exec] Operand[2]........: e68a74
    [exec] Operand[3]........: 5

    [exec] Method............: e68518 'aj.h (virtual)'
    [exec] Stack Chunk.......: df0a14
    [exec] Frame Pointer.....: df0b90
    [exec] Current IP........: e682b4 = e682b4 + offset 0
    [exec] Previous Frame....: df0b70
    [exec] Previous IP.......: e6830d (offset 49)
    [exec] Frame size........: 2 (1 arguments, 1 local variables)
    [exec] Argument[0].......: df4238
    [exec] Local[1]..........: df42f8

    [exec] Method............: e684d8 'aj.f (virtual)'
    [exec] Stack Chunk.......: df0a14
    [exec] Frame Pointer.....: df0b70
    [exec] Current IP........: e6830d = e682dc + offset 49
    [exec] Previous Frame....: df0b54
    [exec] Previous IP.......: e68278 (offset 4)
    [exec] Frame size........: 1 (1 arguments, 0 local variables)
    [exec] Argument[0].......: df4238

    [exec] Method............: e685b8 'aj.b (static)'
    [exec] Stack Chunk.......: df0a14
    [exec] Frame Pointer.....: df0b54
    [exec] Current IP........: e68278 = e68274 + offset 4
    [exec] Previous Frame....: df0b38
    [exec] Previous IP.......: e680d6 (offset 50)
    [exec] Frame size........: 1 (1 arguments, 0 local variables)
    [exec] Argument[0].......: df4238

    [exec] Method............: e68108 'a.commandAction (virtual)'
    [exec] Stack Chunk.......: df0a14
    [exec] Frame Pointer.....: df0b38
    [exec] Current IP........: e680d6 = e680a4 + offset 50
    [exec] Previous Frame....: df0b14
    [exec] Previous IP.......: 1012c32c (offset 284)
    [exec] Frame size........: 3 (3 arguments, 0 local variables)
    [exec] Argument[0].......: df2f98
    [exec] Argument[1].......: df4288
    [exec] Argument[2].......: df41dc

[exec] Method............: 100d59c4 'javax/microedition/lcdui/Display$Displ
ayAccessor.commandAction (virtual)'
    [exec] Stack Chunk.......: df0a14
    [exec] Frame Pointer.....: df0b14
    [exec] Current IP........: 1012c32c = 1012c210 + offset 284
    [exec] Previous Frame....: df0ac8
    [exec] Previous IP.......: 1014cd72 (offset 10)
    [exec] Frame size........: 13 (2 arguments, 11 local variables)
    [exec] Argument[0].......: df2bb8
    [exec] Argument[1].......: 1
    [exec] Local[2]..........: df3018
    [exec] Local[3]..........: df2f98
    [exec] Local[4]..........: 0
    [exec] Local[5]..........: df4288
    [exec] Local[6]..........: df41dc
    [exec] Local[7]..........: 0
    [exec] Local[8]..........: df16f0
    [exec] Local[9]..........: df16e4
    [exec] Local[10]..........: 2
    [exec] Local[11]..........: 4
    [exec] Local[12]..........: 16

[exec] Method............: 100e9010 'javax/microedition/lcdui/Display$Displ
ayManagerImpl.commandAction (virtual)'
    [exec] Stack Chunk.......: df0a14
    [exec] Frame Pointer.....: df0ac8
    [exec] Current IP........: 1014cd72 = 1014cd68 + offset 10
    [exec] Previous Frame....: df0aa8
    [exec] Previous IP.......: 1014e645 (offset 68)
    [exec] Frame size........: 2 (2 arguments, 0 local variables)
    [exec] Argument[0].......: df11d0
    [exec] Argument[1].......: 1

[exec] Method............: 100ea48c 'com/sun/midp/lcdui/DefaultEventHandler
.commandEvent (virtual)'
    [exec] Stack Chunk.......: df0a14
    [exec] Frame Pointer.....: df0aa8
    [exec] Current IP........: 1014e645 = 1014e601 + offset 68
    [exec] Previous Frame....: df0a80
    [exec] Previous IP.......: 1013522f (offset 47)
    [exec] Frame size........: 4 (2 arguments, 2 local variables)
    [exec] Argument[0].......: df0d68
    [exec] Argument[1].......: 1
    [exec] Local[2]..........: df0d5c
    [exec] Local[3]..........: df0a84

[exec] Method............: 100daf98 'com/sun/midp/lcdui/AutomatedEventHandl
er.commandEvent (virtual)'
    [exec] Stack Chunk.......: df0a14
    [exec] Frame Pointer.....: df0a80
    [exec] Current IP........: 1013522f = 10135200 + offset 47
    [exec] Previous Frame....: df0a58
    [exec] Previous IP.......: 1014de2a (offset 250)
    [exec] Frame size........: 4 (2 arguments, 2 local variables)
    [exec] Argument[0].......: df0d68
    [exec] Argument[1].......: 1
    [exec] Local[2]..........: df0ac8
    [exec] Local[3]..........: 1014de21
----------------------------------------
and so on, and so on, and so on....
and it ends with:
---------------------------------------
    [exec] 5
    [exec] 0
    [exec] 0
    [exec] 0
    [exec] 0
    [exec] e60728
    [exec] e67c74
    [exec] e68a74
    [exec] df0bd0
    [exec] e67832
    [exec] df0be8
    [exec] e653bc
    [exec] e60750
    [exec] 0
    [exec] e60728
    [exec] e68a74

    [exec] Execution completed.
    [exec] 521668 bytecodes executed
    [exec] 209 thread switches
    [exec] 537 classes in the system (including system classes)
    [exec] 5030 dynamic objects allocated (267248 bytes)
    [exec] 19 garbage collections (239608 bytes collected)
    [exec] Execution completed.
    [exec] 521668 bytecodes executed
    [exec] 209 thread switches
    [exec] 537 classes in the system (including system classes)
    [exec] 5030 dynamic objects allocated (267248 bytes)
    [exec] 19 garbage collections (239608 bytes collected)
---------------------------------------------------------------------

Maybe this output is correct and has somthing to do with the fact, that I am using an obfuscator. But why then my application crashes, cause usually, it shouldn't terminate the program. Any ideas?

Thanks in advance,
Sebasian



Back to the top