RE: AspectWerkzPreProcessor throwing exception on null class name

"Steve Caswell" <scaswell-rjMgWMNrobOBUy7/[email protected]>
Newsgroups gmane.comp.java.aspectwerkz.devel
Message-ID <[email protected]>
Alex,

Yes, NetBeans is an IDE, open source, supported primarily by Sun
(http://www.netbeans.org).

Here is what we are doing with NetBeans as it relates to AspectWerkz:

As part of an overall layered architecture, we are developing a business
layer using NetBeans as our IDE. Within NetBeans, we develop, compile, and
run various Java classes and related test cases. To make the development
cycle less painful, we use the online weaving functionality of AspectWerkz
to apply our aspects whenever a test case is executed (so that we don't have
an extra post-compiler step to modify the class file). We're using the
prepared bootclasspath approach. NetBeans lets us define the execution
command line, so that we can easily apply the -X argument and the additional
classpath jars.

All this works great except the numerous exceptions thrown as I mentioned.

Hope that helps clarify. I'll be happy to contribute a set of instructions
for setting up NetBeans to do the online weaving if you think other users
would find that helpful.

Thanks for make the change, that will make our integration much more smooth.

-----Original Message-----
From: aspectwerkz-devel-admin-81qHHgoATdGxIXFVlbCvtR2eb7JE58TQ@public.gmane.org
[mailto:aspectwerkz-devel-admin-81qHHgoATdGxIXFVlbCvtR2eb7JE58TQ@public.gmane.org] On Behalf Of Alex
Sent: Sunday, May 30, 2004 5:57 PM
To: aspectwerkz-devel-81qHHgoATdGxIXFVlbCvtR2eb7JE58TQ@public.gmane.org
Subject: Re: [aspectwerkz-devel] AspectWerkzPreProcessor throwing exception
on null class name


Good point Steve
I'll had that in 0.10.RC3. Hope to ship it next week.
(Note: defining a null named class is a deprecated method in
java.lang.ClassLoader - but I understand you cannot change this)

BTW: NetBeans is an IDE right ? Could you give some more details on what you
do with "integrating NetBeans and AW" ? Have an AW IDE extension or use AW
to add Aspects in the IDE for dev. purpose etc ?

Alex

----- Original Message ----- 
From: "Steve Caswell" <scaswell-rjMgWMNrobOBUy7/[email protected]>
To: <aspectwerkz-devel-81qHHgoATdGxIXFVlbCvtR2eb7JE58TQ@public.gmane.org>
Sent: Friday, May 28, 2004 3:38 AM
Subject: [aspectwerkz-devel] AspectWerkzPreProcessor throwing exception on
null class name


> I'm integrating AspectWerkz (0.10.RC2) with NetBeans 3.6, which is 
> working fine with one exception. For some reason that I have not been 
> able to
track
> down, there are several attempts to load classes with a null class 
> name. These get passed to
>
org.codehaus.aspectwerkz.hook.impl.ClassPreProcessorHelper.defineClass0Pre,
> which then calls 
> org.codehaus.aspectwerkz.transform.AspectWerkzPreProcessor.preProcess.
Since
> there is no check for name being null in preProcess, it throws an NPE.
>
> There doesn't appear to be any problem with this, as the application 
> continues to run fine. However, defineClass0Pre catches the NPE and 
> writes the stack trace. This happens about 20 times, so starting up 
> the
application
> is slowed considerably.
>
> Would the development team consider a modification that avoids calling 
> preProcess if the name passed to defineClass0Pre is null? I have made 
> this hack in my local source and it seems to work ok. I'll be happy to 
> post the modification.
>
>
> _______________________________________________
> aspectwerkz-devel mailing list aspectwerkz-devel-81qHHgoATdGxIXFVlbCvtR2eb7JE58TQ@public.gmane.org
> http://lists.codehaus.org/mailman/listinfo/aspectwerkz-devel
>
>

_______________________________________________
aspectwerkz-devel mailing list
aspectwerkz-devel-81qHHgoATdGxIXFVlbCvtR2eb7JE58TQ@public.gmane.org
http://lists.codehaus.org/mailman/listinfo/aspectwerkz-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.