Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] NoClassDefFound Error

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

--
Tom Duffey
tduffey@xxxxxxxxxxxxxx
414-751-0600 x102







Back to the top