Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] Cannot register non aspect

Hi Alex,
     I am using the test aspect in your bundle. I changed only these in
the build file because I am using 1.4
source="1.4" target="1.4". Is there a problem with this ? The only
reason for using this is LTW with JDK 1.4 in WebLogic.

awaj-boot.jar is created properly. LTW with JDK1.4 in WebLogic seems to
be working. I am seeing weave messages.

Jrockit is another option.

Thanks,
Mohan 

-----Original Message-----
From: aspectj-users-bounces@xxxxxxxxxxx
[mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Alexandre
Vasseur
Sent: Friday, December 23, 2005 2:53 PM
To: aspectj-users@xxxxxxxxxxx
Subject: Re: [aspectj-users] Cannot register non aspect

that is right Matthew, the message definitely means that one aspect
listed in aop.xml is actually wether not found, wether not seen as an
aspect.

On java 1.4, both code style and /*@*/AspectJ works.
Let me ellaborate:
- code style works on 1.4 without special consideration (unless you are
using Java 5 language features of course)
- @AspectJ that ships out of the box with AspectJ 1.5 works for 1.5 (as
it requires Java 5 annotations)
- but using the backport175 project and the plumbing (a bit outdated
today) I described in my blog, you can have a /*@*/AspectJ (that is
AspectJ annotation in javadoc) that the runtime will see as regular
java5 like annotation. For that to happen you 'll need to force the
weaver in -1.5 mode using aop.xml weaver/option as when running in 1.4,
the autodetection will see that there is no java 5.
http://blogs.codehaus.org/people/avasseur/archives/001121_aspectj_aspect
_and_java_13.html

I'd advise to use code style as it requires less plumbing and is
supported out of the box with the AspectJ 1.5 distribtion - but if you
need to stay in a plain Java land, you just can.

So one possible reason Mohan is that you are using this plumbing without
forcing the -1.5 mode.

Alex




On 12/22/05, Matthew Webster <matthew_webster@xxxxxxxxxx> wrote:
>
> Mohan,
>
> There are several possible reasons for this failure:
> 1. You mistyped the name in aop.xml
> 2. The aspect is not on the classpath
> 3. The aspect is not in the right place i.e. it was declared in a 
> package but built in the wrong directory (AspectJ rather annoyingly 
> still allows
> this)
> 4. The names class is not an aspect
>
> I presume your aspect was written using code-style rather than 
> @AspectJ style which is only supported under Java 5 I believe.
>
> Matthew Webster
>  AOSD Project
>  Java Technology Centre, MP146
>  IBM Hursley Park, Winchester,  SO21 2JN, England
>  Telephone: +44 196 2816139 (external) 246139 (internal)
>  Email: Matthew Webster/UK/IBM @ IBMGB, matthew_webster@xxxxxxxxxx 
> http://w3.hursley.ibm.com/~websterm/
>
> Please respond to aspectj-users@xxxxxxxxxxx
>
> Sent by:        aspectj-users-bounces@xxxxxxxxxxx
>
> To:        <aspectj-users@xxxxxxxxxxx>
> cc:
> Subject:        [aspectj-users] Cannot register non aspect
>
>
>
> Hi,
>         I was trying to enable LTW for JDK 1.4. So I am running the 
> test that uses AspectWerkz and AspectJ to do this. I get this error. 
> Has anybody tried this ?
> I want to use LTW for WebLogic which uses JDK 1.4.
>
>      [java] java.lang.RuntimeException: Cannot register non aspect:
> test.ltw13.S
>  ample$TestAspect , test.ltw13.Sample.TestAspect
>      [java]     at
> org.aspectj.weaver.bcel.BcelWeaver.addLibraryAspect(BcelWeave
>  r.java:176)
>      [java]     at
> org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.registe
>  rAspects(ClassLoaderWeavingAdaptor.java:313)
>      [java]     at
> org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.registe
>  rDefinitions(ClassLoaderWeavingAdaptor.java:172)
>
> Thanks,
> Mohan
>
> This message is for the designated recipient only and may contain 
> privileged, proprietary, or otherwise private information. If you have

> received it in error, please notify the sender immediately and delete 
> the original. Any other use of the email by you is 
> prohibited._______________________________________________
>  aspectj-users mailing list
>  aspectj-users@xxxxxxxxxxx
>  https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>
>
>
>
>
>
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>
>
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users


This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information.  If you have received it in error, please notify the sender immediately and delete the original.  Any other use of the email by you is prohibited.


Back to the top