Hello Andy,

The dev build you provided solves the issue. We're not in a huge rush to 
upgrade to the 1.7 JVM so I think we can wait for the next AspectJ release. 
Thank you for the help!

Tom

On Nov 18, 2012, at 2:32 PM, Andy Clement wrote:

> Hi Tom,
> 
> I don't think that is a valid classname for the load (i.e. including
> the generics) and so it looks like a problem where a class reference
> in the constant pool has incorrectly included generics information.
> javap -private -verbose on the woven PlantMatrixServiceImpl class and
> look for that classname being referenced - I'm happy to look at the
> output if you want to send me that to me privately. Do you want to
> raise an AspectJ bug to pursue it further? You can do that here:
> https://bugs.eclipse.org/bugs/enter_bug.cgi?product=AspectJ
> 
> You could quickly try AspectJ 1.6.12 instead of the 1.7 version (since
> the 1.7 version had substantial changes in - a new version of the JDT
> compiler). It would be interesting to know if it had the same problem
> - it should be fine with the latest Spring.  That AspectJ version will
> not produce the extra verifier attributes that a 1.7 JVM would be
> looking for so you would *probably* have to run your JVM with option
> -XX:-UseSplitVerifier - which tells it to switch back to the Java6
> verification scheme.  (If this option is required and you don't supply
> it you will probably see errors about missing StackMaps).
> 
> Actually, there is a small possibility that it is addressed by a
> change last week that addressed a problem of mistakenly including some
> generics signatures in stackmap attributes. I've just created a new
> dev build that includes this fix.  You can grab it from here:
> 
> http://www.eclipse.org/downloads/download.php?file=/tools/aspectj/dev/aspectj-DEVELOPMENT-20121118123000.jar
> 
> cheers,
> Andy
> 
> On 16 November 2012 10:05, Tom Duffey <[email protected]> wrote:
>> Hello,
>> 
>> We are attempting to upgrade an application to the Java 7 platform. This is 
>> a web-based app using Spring 3.0.5 and AspectJ compile time weaving. We use 
>> Ant to build and set our iajc task to target the 1.7 JDK. Everything builds 
>> but we are experiencing runtime errors in the application that I'm having 
>> trouble understanding and believe might be related to the AspectJ compiler:
>> 
>> java.lang.NoClassDefFoundError: 
>> com/utilivisor/domain/model/DomainObject<com/utilivisor/domain/model/SimpleIdentity>
>>  at 
>> com.utilivisor.service.plantAnalysis.PlantMatrixServiceImpl.calculateOperatingModes(PlantMatrixServiceImpl.java:79)
>>  at 
>> com.utilivisor.service.plantAnalysis.PlantMatrixServiceImpl.calculateMatrix(PlantMatrixServiceImpl.java:53)
>>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>  at 
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>  at 
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>  at java.lang.reflect.Method.invoke(Method.java:601)
>>  at 
>> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
>>  at 
>> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
>>  at 
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
>>  at 
>> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
>>  at 
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
>>  at 
>> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
>>  at $Proxy391.calculateMatrix(Unknown Source)
>>  at 
>> com.utilivisor.job.plantAnalysis.CalculateOperatingModesJob.performJob(CalculateOperatingModesJob.java:47)
>>  at com.utilivisor.job.AbstractJob.executeInternal(AbstractJob.java:171)
>>  at 
>> org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
>>  at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
>>  at 
>> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525)
>> Caused by: java.lang.ClassNotFoundException: 
>> com.utilivisor.domain.model.DomainObject<com.utilivisor.domain.model.SimpleIdentity>
>>  at 
>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
>>  at 
>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
>>  ... 18 more
>> 
>> Line 79 of PlantMatrixServiceImpl:
>> 
>> OperatingModeCalculator calculator = new OperatingModeCalculator(matrix);
>> 
>> The DomainObject class it is complaining about is a generic class with a 
>> definition like:
>> 
>> public abstract class DomainObject<PK extends Identity> implements 
>> Serializable, Comparable<DomainObject> { ... }
>> 
>> The OperatingModeCalculator class above does not extend DomainObject so not 
>> sure why the error is listed as coming from there.
>> 
>> com.utilivisor is our package and the code is definitely there in a JAR in 
>> the WEB-INF/lib folder so I am confused. Any ideas how to fix or further 
>> troubleshoot this? More info about our environment:
>> 
>> - Oracle 64-bit JDK 1.7.0_09-b05 on Linux
>> - Tried AspectJ 1.7.1 and latest dev
>> - Spring 3.0.5, tried 3.0.7 and 3.1.0

--
Tom Duffey
[email protected]
414-751-0600 x102





_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to