Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-dev] Queries from a newbie..

> You don't. You deploy the class-files and they are
> purely Java compliant.

By "class" files, do you mean the .aj files as such ?
Here is what I did :

1. Created aspect classes and built the project
("Build Project" option of course)
2. Export my project from Eclipse as a jar

The contents of the jar (just sample) :

sathya$ jar -tvf PersonBeanWithAspect.jar 
    25 Fri Aug 13 16:32:42 IST 2004
META-INF/MANIFEST.MF
  1437 Fri Aug 13 16:32:14 IST 2004
test/ejb/PersonBean.class
  1991 Fri Aug 13 16:32:14 IST 2004
test/ejb/TestPersonBean.class
  1212 Fri Aug 13 16:27:24 IST 2004
test/ejb/AspectBeforeFind.aj
...

3. I deploy this jar now and start up my server. When
the event occurs I get this error :

java.lang.NoClassDefFoundError:
test/ejb/AspectBeforeFind
        at
test.ejb.TestPersonBean.getFirstNameWithID(TestPersonBean.java:186)
        at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at
java.lang.reflect.Method.invoke(Method.java:324)

But when I go to command line, and compile the aspect
class with ajc, I get the .class file which now works
fine when deployed.

Do I need to change any preferences ? In the  AspectJ
preferences in Eclipse, I also tried checking the "No
weaving" option which is described as generating class
files. But I dont see any class files being generated.


Pl help me out.

Thanks so much,
Sathya 

=====
Happiness is purely a state of mind that is in no way related to external factors.


		
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail


Back to the top