Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] AspectJ classes in Cortona VRML Browser

Hello,

I've tried to use classes compiled with AspectJ in the Cortona VRML Browser as 
part of the VRML file, but all I get is the following error message (repeated 
quite often):

org.aspectj.lang.NoAspectBoundException: Exception while initializing 
EventOut: java.lang.IllegalAccessError: EventOut: field 
ajc$perSingletonInstance is final
        at EventOut.aspectOf
        at Movement.eventIn_timeChanged
        at Movement.processEvent
        at vrml/node/Script.processEvents
        at com/parallelgraphics/cortona/vrml/PassiveScriptImpl.callUser
        at com/parallelgraphics/cortona/vrml/PassiveScriptImpl.execute

The same aspect used in a standalone application works fine, so I suspect it 
has something to do with using the Cortona engine.

The aspect looks like this (I've tried lots of other ones too):

public aspect EventOut
{
	// this is for the cortona class
	after() : call(public * Movement.*())
	{
		System.out.println("Cool " + thisJoinPoint + " was hit!");
	}
	// this is for the standalone class
	after() : call(public * TestClass.*())
	{
		System.out.println("Cool " + thisJoinPoint + " was hit!");
	}
}

I used the -target 1.1 compiler switches for both, the Cortona VRML class and 
the standalone application, so this should not be the problem.

I have no idea how I could make them work together, any help will be 
appreciated.

Additional Note:
I have tested this with another browser and it worked, so it might be a 
Cortona bug?


Background:
The Movement class is a subclass from the vrml.node.Script class which is used 
to move some objects of the VRML scene around.


Greetings Ben



Back to the top