Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Strange error after upgrade to AspectJ 1.6.8

Hi Hermann,

The code looks fine.  I have seen something like that a while ago,
having to cast my mind back.  A similar situation is reported in
https://bugs.eclipse.org/bugs/show_bug.cgi?id=251151

There it turned out to be a problem with two versions of a type being
around in the VM - one had been woven and one had not.

But i guess you are going to tell me the classpath is completely
unchanged, all you have done is a recompile?  We could compare the
weaveinfo output between the two builds and check it is identical.

Andy

On 20 July 2010 15:13, prg@xxxxxxxxxxxxxxx <prg@xxxxxxxxxxxxxxx> wrote:
>
> Hello all,
>
> maybe someone can give me some hint as to what is broken here, or what to investigate
> further?
>
> In one of our larger J2EE Projects, I've just bumped the AspectJ version
> from 1.6.6 to 1.6.8. The Project is built with maven, compiled entirely with the AspectJ
> compiler and is deployed to a JBoss server, using Spring and Hibernate there (well, just
> it's generally a not so simple setup, as is the whole build process)
>
> Anyway, now we'll suddenly get an failure on deployment, at the point where
> the Hibernate SessionFactory should start up. Deeply buried in the stacktraces
> we see the following root cause
>
> Caused by: java.lang.reflect.InvocationTargetException
>     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>     at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:5
> 7)
>     at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImp
> l.java:45)
>     at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
>     at org.hibernate.engine.UnsavedValueFactory.instantiate(UnsavedValueFactory.java:45)
>     ... 151 more
> Caused by: java.lang.IncompatibleClassChangeError
>     at
> baag.boa.common.interfaces.DatenBeanGUIMethoden.ajc$interFieldInit$baag_boa_common_interfa
> ces_DatenBeanGUIMethoden$baag_boa_common_interfaces_DatenBean$beanTyp(DatenBeanGUIMethoden
> .aj:53)
>     at baag.boa.model.GDSettl.<init>(GDSettl.java:55)
>     ... 156 more
>
>
> GDSettl is one of the classes to be mapped by Hibernate, thus likely that's the first
> point where this class gets loaded.
>
> Looking at that Aspect, we'll find in Line 53 the following ITD:
>
>
> public aspect DatenBeanGUIMethoden
> {
>     @Transient
>     public BeanTyp DatenBean.getBeanTyp(){
>         if ( this.beanTyp==null )
>             this.beanTyp = new BeanTyp(this);
>         return this.beanTyp;
>     }
>     private transient BeanTyp DatenBean.beanTyp=null;
> ....
>
>
> Well -- I haven't looked at that Aspect since years. Is there anything obvious
> which might be broken with this code?
>
> Cheers
> Hermann Vosseler
>
>
> PS: we have no urgent pressing reason to upgrade the AspectJ version;
> our system works just fine with 1.6.6
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>


Back to the top