Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] Applet problems...

Hi Eyon,

I did this a while ago (although I don't have access to the sources) and had
just one notable problem with cflow pointcuts. I was able to weave into the
applet in the build process. I then used the woven jar included the AspectJ
rt jar as one of the runtime dependencies in the applet. What kind of issues
are you running into?

The issue I ran into was that cflow will use ThreadLocal on VM's that have
it (since AspectJ 1.2 I think). Unfortunately Sun's Java plugin doesn't
grant the right to use ThreadLocals by default! At the time I was able to
work around by using an old aspectjrt.jar that didn't have the ThreadLocal
optimization for cflow implementations, but that's not a good choice now.
You could have users change their plugin security settings, possibly sign
the applet, or lobby for an enhancement. See bugzilla bug 71257 for more on
this: https://bugs.eclipse.org/bugs/show_bug.cgi?id=71257 

-----Original Message-----
From: aspectj-users-bounces@xxxxxxxxxxx
[mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Eyon Land
Sent: Tuesday, August 16, 2005 11:51 AM
To: aspectj-users@xxxxxxxxxxx
Subject: [aspectj-users] Applet problems...

AspectJ Gurus,  I realize this may not be enough info
to identify the problem...

Does anyone have a working Hello World Applet that was
written with some aspects?

Perhaps just looking at a real JApplet that uses
AspectJ would give me a clue!

Thanks for your help!
Eyon


--- Eyon Land <myjavaland@xxxxxxxxx> wrote:

> All,
> 
> I'm trying to load an applet I called
> com.ray.score.ui.MainApplet that was built with
> AspectJ.  I carefully put the aspectjrt.jar as one
> of
> of my archive files that this applet depends on but
> I
> get the following error...
> 
> 
> java.lang.NoClassDefFoundError:
> org/aspectj/lang/NoAspectBoundException
> 	at
>
com.ray.score.ui.MainApplet.<init>(MainApplet.java:39)
> 	at
>
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
> 	at
>
sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
> Source)
> 	at
>
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
> Source)
> 	at
> java.lang.reflect.Constructor.newInstance(Unknown
> Source)
> 	at java.lang.Class.newInstance0(Unknown Source)
> 	at java.lang.Class.newInstance(Unknown Source)
> 	at sun.applet.AppletPanel.createApplet(Unknown
> Source)
> 	at sun.plugin.AppletViewer.createApplet(Unknown
> Source)
> 	at sun.applet.AppletPanel.runLoader(Unknown Source)
> 	at sun.applet.AppletPanel.run(Unknown Source)
> 	at java.lang.Thread.run(Unknown Source)
> 
> 
> The workaround for this problem was to unjar all the
> class files (including the aspectjrt.jar and create
> one big massive jar file.  When I do this, the
> applet
> works fine.  However, I'd prefer to leave the
> classes
> in their respective jar files.
> 
> Here's the applet tag I used when I got the error
> mentioned above...
> 
> <APPLET
>     CODE='com.ray.score.ui.MainApplet'
>     WIDTH='700'
>     HEIGHT='525'>
>     <PARAM NAME="CODE"
> VALUE="com.ray.score.ui.MainApplet" >
>     <PARAM NAME="ARCHIVE" 
>          VALUE ="applet_resource/aspectjrt.jar,
> applet_resource/activation.jar ,
> applet_resource/aopalliance.jar ,
> applet_resource/axis.jar ,
> applet_resource/commons-collections.jar ,
> applet_resource/commons-discovery.jar ,
> applet_resource/commons-logging.jar ,
> applet_resource/jaxrpc.jar ,
> applet_resource/log4j-1.2.9.jar ,
> applet_resource/mail.jar , applet_resource/saaj.jar
> ,
> applet_resource/scorelib.jar ,
> applet_resource/spring-aop.jar ,
> applet_resource/spring-beans.jar ,
> applet_resource/spring-context.jar ,
> applet_resource/spring-core.jar ,
> applet_resource/spring-remoting.jar ,
> applet_resource/wsdl4j.jar ,
> applet_resource/ssc_applet.jar" >
>     <PARAM NAME="type"
> VALUE="application/x-java-applet;version=1.5">
>     <PARAM NAME="scriptable" VALUE="false">
>     </APPLET>
> 
> 
> If it matters, the com.ray.score.MainApplet is in
> ssc_applet.jar.
> 
> Thanks for your help!
> Eyon
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
>
https://dev.eclipse.org/mailman/listinfo/aspectj-users
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users



Back to the top