Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 337079

Summary: ClassCastException at BcelGenericSignatureToTypeXConverter.typeArgument2TypeX for CWT on Spring's SqlMapClientFactoryBean
Product: [Tools] AspectJ Reporter: art y <artymt>
Component: CompilerAssignee: aspectj inbox <aspectj-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: stepper
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description art y CLA 2011-02-13 17:28:24 EST
Build Identifier: 20100218-1602

java.lang.ClassCastException
at org.aspectj.weaver.bcel.BcelGenericSignatureToTypeXConverter.typeArgument2TypeX(BcelGenericSignatureToTypeXConverter.java:169)
at org.aspectj.weaver.bcel.BcelGenericSignatureToTypeXConverter.classTypeSignature2TypeX(BcelGenericSignatureToTypeXConverter.java:87)
at org.aspectj.weaver.bcel.BcelGenericSignatureToTypeXConverter.fieldTypeSignature2TypeX(BcelGenericSignatureToTypeXConverter.java:114)
at org.aspe ... RETURN
  end public volatile Object getObject() throws java.lang.Exception
end public class org.springframework.orm.ibatis.SqlMapClientFactoryBean


Reproducible: Always

Steps to Reproduce:
I was trying to confirm Spring transaction.
1. On Eclipse (with AJDT), create (Google Web Application) Project.
2. Add Spring libraries (including org.springframework.orm-3.0.4.RELEASE.jar) to project (class path and build path).
3. On Eclipse (with AJDT), convert (Spring) project to AspectJ project.
4. Add org.springframework.orm-3.0.4.RELEASE.jar to AspectJ's Inpath.
5. Make the aspect file something like below:
@Aspect
public class JdoTransactionManagerAspect {
	Log logger = LogFactory.getLog( this.getClass());
	
	@Pointcut( "within( org.springframework.orm.jdo.JdoTransactionManager)")
	public static void jdoTransactionManagerWithinPointcut() {}
	
	@Pointcut( "execution( * do*(..))")
	public static void doMethodExecutionPointcut() {}
	
	@Before( "jdoTransactionManagerWithinPointcut() && doMethodExecutionPointcut()")
	public void beforeDoMethodExecution( JoinPoint joinPoint) {
		logger.info(
				String.format( 
						"Invoking one of transactional method in JdoTransactionManager class: %1$s", 
						joinPoint.getSignature().toString()
						)
				);
	}
	
	@Before( "execution( * org.springframework.orm.jdo.JdoTransactionManager.doCommit(..))")
	public void beforeDoCommitExecution( JoinPoint joinPoint) {
		logger.info(
				String.format( 
						"Invoking one of transactional method in JdoTransactionManager class: %1$s", 
						joinPoint.getSignature().toString()
						)
				);
	}
}
6. Try to run build.

Environment:
AJDT 2.1.1
AspectJ 1.6
jdk 1.6
Xp Sp3
Comment 1 Andrew Clement CLA 2011-02-23 11:01:57 EST
*** Bug 337949 has been marked as a duplicate of this bug. ***