Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] Configure IAJC Ant task toignorealreadyweaved-in.class files

I am still getting the same error with AspectJ 1.5.3

Note that TParameterizer.class is a compiled aspect.

java.lang.ClassFormatError: Repetitive field name/signature in class file com/nextpage/tester/aspects/tester/TParameterizer
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
	at java.lang.Class.getDeclaredMethods0(Native Method)
	at java.lang.Class.privateGetDeclaredMethods(Class.java:2365)
	at java.lang.Class.getDeclaredMethods(Class.java:1763)
	at com.sun.xml.bind.v2.model.nav.ReflectionNavigator.getDeclaredMethods(ReflectionNavigator.java:214)
	at com.sun.xml.bind.v2.model.nav.ReflectionNavigator.getDeclaredMethods(ReflectionNavigator.java:22)
	at com.sun.xml.bind.v2.model.impl.ClassInfoImpl.findGetterSetterProperties(ClassInfoImpl.java:783)
	at com.sun.xml.bind.v2.model.impl.ClassInfoImpl.getProperties(ClassInfoImpl.java:249)
	at com.sun.xml.bind.v2.model.impl.RuntimeClassInfoImpl.getProperties(RuntimeClassInfoImpl.java:87)
	at com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:127)
	at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:49)
	at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:41)
	at com.sun.xml.bind.v2.model.impl.ClassInfoImpl.getBaseClass(ClassInfoImpl.java:155)
	at com.sun.xml.bind.v2.model.impl.RuntimeClassInfoImpl.getBaseClass(RuntimeClassInfoImpl.java:56)
	at com.sun.xml.bind.v2.model.impl.RuntimeClassInfoImpl.getBaseClass(RuntimeClassInfoImpl.java:40)
	at com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:142)
	at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:49)
	at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:41)
	at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:189)
	at com.sun.xml.bind.v2.model.impl.RegistryInfoImpl.<init>(RegistryInfoImpl.java:51)
	at com.sun.xml.bind.v2.model.impl.ModelBuilder.addRegistry(ModelBuilder.java:232)
	at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:201)
	at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:327)
	at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:198)
	at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:76)
	at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:55)
	at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:124)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:132)
	at javax.xml.bind.ContextFinder.find(ContextFinder.java:286)
	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:358)
	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:323)
	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:244)

-----Original Message-----
From: aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Alec Lebedev
Sent: Wednesday, June 27, 2007 1:21 PM
To: aspectj-users@xxxxxxxxxxx
Subject: RE: [aspectj-users] Configure IAJC Ant task toignorealreadyweaved-in.class files

According to this http://www.eclipse.org/aspectj/doc/next/devguide/printable.html#weaving-class-files-more-than-once all aspects and classes are reweavable by default as of AspectJ 5. I believe I am using version 1.5.2. I will update to the latest version and retry.

-----Original Message-----
From: aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Eric Bodden
Sent: Wednesday, June 27, 2007 1:12 PM
To: aspectj-users@xxxxxxxxxxx
Subject: Re: [aspectj-users] Configure IAJC Ant task to ignorealreadyweaved-in.class files

I think reweaving mode only became relatively recently default. So you
might try to set -Xreweavable explicitly.

Eric

On 27/06/07, Alec Lebedev <alec.lebedev@xxxxxxxxxxxx> wrote:
>
>
>
>
> Keeping woven classes separate from unwoven works OK, but I agree that
> weaving should be idempotent. The aspectj libraries I am using are a
> year-old. Has this bug been recently fixed?
>
>
>
>  ________________________________
>
>
> From: aspectj-users-bounces@xxxxxxxxxxx
> [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Ron
> Bodkin
>  Sent: Wednesday, June 27, 2007 11:29 AM
>  To: aspectj-users@xxxxxxxxxxx
>  Subject: RE: [aspectj-users] Configure IAJC Ant task to ignore
> alreadyweaved-in.class files
>
>
>
>
> Hi Alec,
>
>
>
> I'd recommend structuring your build so that you keep the unwoven classes in
> one place and the woven ones elsewhere. That way you can always reweave the
> unwoven version. On the other hand, I thought AspectJ is supposed to reweave
> classes properly, i.e., unweave and then reweave, as many times as you want.
> Isn't this a weaver bug?
>
>
>
>  ________________________________
>
>
> From: aspectj-users-bounces@xxxxxxxxxxx
> [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of
> Alec Lebedev
>  Sent: Wednesday, June 27, 2007 10:17 AM
>  To: aspectj-users@xxxxxxxxxxx
>  Subject: [aspectj-users] Configure IAJC Ant task to ignore already
> weaved-in.class files
>
>
>
> I am getting the following JVM exception when running the classes that have
> been weaved-in with the IAJC Ant target multiple times.
>
> "java.lang.ClassFormatError: Repetitive field name/signature in class file
> com/mycompany/MyClass"
>
>
>
> The reason why sometimes I end up running IAJC against the same compiled
> code multiple times is that I don't know if the code has changed since the
> last time IAJC was run. The only way I was able to solve the problem is by
> recompiling all my classes before running IAJC Ant target, which is very
> time-consuming.
>
>
>
> Is there a way to configure IAJC Ant task to only weave an aspect in a
> .class file if this aspect has not been weaved in the file before?
>
>
>
> Thanks.
>
>
>
> Alec
>
>
>
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>


-- 
Eric Bodden
Sable Research Group
McGill University, Montréal, Canada
_______________________________________________
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