Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] On Using AspectJ in mainstream projects

Thanks that helped. Thanks to everyone who helped with their comments. I
finally got the following working:

-Conversion of checked to softexceptions and converting them to custom
exceptions. This helped streamline error handling to one single place
and code looks so much cleaner.

-Catching all unchecked exceptions in code and creating custom
exceptions. This helped avoid having multiple try/catch blocks. The
visualizer really helped me navigate thru the advices.


Open Issues:
1) Evaluating AspectJ for mainstream development: Overall, I am
convinced about the functionality/benefits of AOP; and I wish it were
part of standard J2SE. I would like to hear from users who are using
Aspectj in production environments and how safe it is to include it in
your daily development schedule. What sort of problems should I be
prepared for? I mean, I feel like I am introducing yet another
dependency with this tool (along with a number of pre-existing ones we
already have), the version numbers that work with a specific JDK etc..,
how stable the runtime is, the ide that we can really count on to have
support for this technology, and the kind of support/help I can get
should I get stuck somewhere. I think this is the biggest issue for me
which might make me want to wait a little longer before I can decide to
adopt AspectJ for in-house development.

2)Minor issue: The only other caveat I found is that any code that needs
to catch checked exceptions has a compiler warning icon (unhandled
exception...xxxexception) next to it (because it is supposed to catch
checked exception, even though we are converting it to soft/unchecked).
The code still runs because aspectj compiler weaves the needed bytecode
by converting it to a runtime exception.
-
Sudhakar Ramakrishnan

-----Original Message-----
From: Adrian Colyer [mailto:adrian.colyer@xxxxxxxxx] 
Sent: Wednesday, August 31, 2005 1:30 AM
To: aspectj-users@xxxxxxxxxxx
Subject: Re: [aspectj-users] java.lang.ClassNotFoundException:
org/aspectj/lang/SoftException

This one really means what it says : at runtime, the type
org.aspectj.lang.SoftException could not be found. In Eclipse it is
possible to have a different runtime (launch) classpath to your build
classpath. This type should indeed be found in aspectjrt.jar - have
you tried selecting Run... and looking at the launch profile for the
failing run? You should see aspectjrt.jar included on the classpath
tab?

On 31/08/05, Sudhakar Ramakrishnan <sramakrishnan@xxxxxxxx> wrote:
> 
> What is the cause of this exception when using Eclipse 3.0 to run your
> aspectj programs? I checked the project java-build path etc, and
> aspectjrt.jar is there etc..
> 
> The program compiles but at runtime it is not able to find this
> Org.aspectj.lang.softexception
> 
> java.lang.ClassNotFoundException: org/aspectj/lang/SoftException
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Unknown Source)
>         at Hello.HelloWorld.main(HelloWorld.java:45)
> 
> -
> Sudhakar Ramakrishnan
> x3520, ESRI
> 
> 
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
> 


-- 
-- Adrian
adrian.colyer@xxxxxxxxx
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users


Back to the top