Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] ServiceConfigurationError Error with AspectJ Load-Time Weaving

Hi

>.  Nothing related toAspectJ
this i also found out, its just strange that this occurs when I use load-time weaving.


>Those threads talk about a java advanced imaging jar - are you using that
Not that I know, I havent installed it at least

>Are you able to run with an ordinary Java launch configuration that is
>using -javaagent:xxxx in its vm arguments?I
If I do this, the application starts :)
But now I get:

[AClassLoader@15c44d6] info AspectJ Weaver Version 1.6.11 built on Tuesday Mar 15, 2011 at 15:31:04 GMT
[AClassLoader@15c44d6] info register classloader com.baseimplementation.plugin.AClassLoader@15c44d6
[AClassLoader@15c44d6] info using configuration file:/C:/workspaces/trunk/ParameterAspect/aspects.jar!/META-INF/aop.xml
[AClassLoader@15c44d6] info using configuration file:/C:/workspaces/trunk/ParameterAspect/aspects.jar!/META-INF/aop-ajc.xml
[AClassLoader@105a248]
 info no aspects registered. Disabling weaver for class loader 
com.baseimplementation.plugin.AClassLoader@105a248

I
 have added  -javaagent:lib/aspectjweaver.jar to the launchconfiguration
 and my jar which contains the compiled aspects and the aop.xml (also 
the aop-ajc.xml) to the classpath

My aop.xml looks like

<aspectj>
    <aspects>
        <aspect name="com.aspect.parameters.ParametersInterceptor"/>
        <include within="com.baseimplemetation.*"/>
    </aspects>
    <weaver options="-verbose"/>
</aspectj>

Is this all correct  ? (for me it seems strange to have apparently 2 AClassLoader instances (15c44d6 & 105a248))

Does
 the jar I create from the Aspect project needs to be a "normal" jar or a
 jar with aspect support (tried both with the same result).

Thanks again


----- Ursprüngliche Message -----
Von: Andy Clement <andrew.clement@xxxxxxxxx>
An: Andreas Joecker <sielesen@xxxxxxxx>; aspectj-users@xxxxxxxxxxx
Cc: 
Gesendet: 23:06 Mittwoch, 14.September 2011 
Betreff: Re: [aspectj-users] ServiceConfigurationError Error with AspectJ Load-Time Weaving

Hi Andreas,

All sounds very strange.  A few comments:

- Googling on "com.sun.media.imageioimpl.stream.ChannelImageOutputStreamSpi
could not be instantiated: java.lang.IllegalArgumentException:
vendorName == null!" turns up a few things.  Nothing related to
AspectJ.  It is perhaps the case that the use of an agent is
disturbing something enough to trigger this problem (e.g. slightly
modified class loading order).
https://forums.oracle.com/forums/thread.jspa?threadID=1133853
http://markmail.org/message/kbblf2lyfgpk4g6z

Those threads talk about a java advanced imaging jar - are you using that?

> But when I start the launchconfig, Eclipse deletes the include tag.

I believe this is because you are creating/editing with aop-ajc.xml
and that is the file AJDT will overwrite if you are using outxml.  You
should be creating/editing aop.xml instead, AJDT won't overwrite that
one.  It is OK to have both around, their contents are loaded and
merged into a single configuration when the weaver sets itself up.

Are you able to run with an ordinary Java launch configuration that is
using -javaagent:xxxx in its vm arguments?   (Obviously you'll need to
be using aop(-ajc).xml rather than aspectpath if doing it this way)

Andy

On 14 September 2011 06:17, Andreas Joecker <sielesen@xxxxxxxx> wrote:
> in the launchconfiguration of the application there are some VM arguments like
>
> -Djava.endorsed.dirs=....
> -Djava.library.path=...
>
> might this irritate the AspectJ behavior ?
>
> in a simple two project scenario I can Weave as much as I want (but there is also no ImageIO)
>
>
>
> ----- Ursprüngliche Message -----
> Von: Andreas Joecker <sielesen@xxxxxxxx>
> An: "aspectj-users@xxxxxxxxxxx" <aspectj-users@xxxxxxxxxxx>
> Cc:
> Gesendet: 15:00 Mittwoch, 14.September 2011
> Betreff: Re: [aspectj-users] ServiceConfigurationError Error with AspectJ Load-Time Weaving
>
> first of all thanks for your input.
>
 I checked the META-INF/aop-ajc.xml file in the AspectJ project and 
added the weaver options to it and also the include for the aspect.
>
> But when I start the launchconfig, Eclipse deletes the include tag.
>
> And the debug only prints out like this
>
> [WeavingURLClassLoader] debug weaving '.framework.preferences.PreferenceGroup'
>
> If I change the line
> <launchConfiguration type="org.eclipse.ajdt.launching.AspectJLTWApplication">
> to<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
>
> the launch target works. Changing back to AspectJLTWApplication let it fails again.
>
>
> ----- Ursprüngliche Message -----
> Von: oroger <olivier.roger@xxxxxxxxx>
> An: aspectj-users@xxxxxxxxxxx
> Cc:
> Gesendet: 14:35 Mittwoch, 14.September 2011
> Betreff: Re: [aspectj-users] ServiceConfigurationError Error with AspectJ Load-Time Weaving
>
> So you are using
> http://www.eclipse.org/aspectj/doc/released/devguide/ltw-configuration.html
> LTW
>
> I am far from begin an AspectJ expert but did you try to :
>
> 1- enable debug and/or verbose (<weaver options="-verbose -debug">)
> 2- if it is not done already, limit the scope of the aspect to your class
> package only (<include within="com.yourcompany.*"/>)
>
> I might give us some clue to find where the error come from.
>
> Hope this helps,
>
> Olivier
>
> --
> View this message in context: http://aspectj.2085585.n4.nabble.com/ServiceConfigurationError-Error-with-AspectJ-Load-Time-Weaving-tp3812526p3812687.html
> Sent from the AspectJ - users mailing list archive at Nabble.com.
> _______________________________________________
> 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
>


Back to the top