Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 918173

Summary: spring-mvc-webapp tests can't generate CGLIB subclass
Product: [Retired] JBoss Enterprise WFK Platform 2 Reporter: Stefan Miklosovic <smikloso>
Component: SpringAssignee: Tejas Mehta <tmehta>
Status: CLOSED NOTABUG QA Contact: Tomas Repel <trepel>
Severity: high Docs Contact:
Priority: unspecified    
Version: 2.2.0CC: kpiwko, oskutka, rruss
Target Milestone: ---   
Target Release: 2.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-11 14:53:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
error log while testing none

Description Stefan Miklosovic 2013-03-05 16:10:52 UTC
Created attachment 705536 [details]
error log while testing

Description of problem:
After generation of the project from the archetype org.jboss.spring.archetypes:spring-mvc-webapp, tests are failing because there is error when TestExecutionListener prepare test instance.

Mar 5, 2013 4:56:21 PM org.springframework.test.context.TestContextManager prepareTestInstance
SEVERE: Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@5454570a] to prepare test instance [org.jboss.wfk.test.spring.test.MemberDaoTest@6d1e7cc6]
org.springframework.aop.framework.AopConfigException: Could not generate CGLIB subclass of class [class org.jboss.wfk.test.spring.test.MemberDaoTest]: Common causes of this problem include using a final class or a non-visible class; nested exception is net.sf.cglib.core.CodeGenerationException: java.lang.reflect.InvocationTargetException-->null
	at org.springframework.aop.framework.Cglib2AopProxy.getProxy(Cglib2AopProxy.java:207)
	at org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.java:112)


Version-Release number of selected component (if applicable):
1.0.0.CR6

How reproducible:
Always

Steps to Reproduce:
1. mvn archetype:generate -DgroupId=org.jboss.wfk.test.spring -DartifactId=spring-mvc-webapp -Dversion=1.0.0.CR6 -DarchetypeArtifactId=spring-mvc-webapp -DarchetypeGroupId=org.jboss.spring.archetypes -DarchetypeVersion=1.0.0.CR6 -DarchetypeRepository=http://maven.apache.org -Penterprise
2. run package goal
  
Actual results:
Tests are failing

Expected results:
Tests are not failing.

Please look at attachments in order to see full error trace

Comment 1 Tejas Mehta 2013-03-07 16:05:17 UTC
Not able to replicate:

1.  mvn archetype:generate -DgroupId=org.jboss.wfk.test.spring -DartifactId=spring-mvc-webapp -Dversion=1.0.0.CR6 -DarchetypeArtifactId=spring-mvc-webapp -DarchetypeGroupId=org.jboss.spring.archetypes -DarchetypeVersion=1.0.0.CR6 -DarchetypeRepository=http://maven.apache.org -Penterprise

2. mvn clean package

Environment:

JDK: 
java version "1.7.0_09"
OpenJDK Runtime Environment (IcedTea7 2.3.4) (7u9-2.3.4-0ubuntu1.12.10.1)
OpenJDK 64-Bit Server VM (build 23.2-b09, mixed mode)

Comment 2 Tejas Mehta 2013-03-07 16:24:16 UTC
Not replicating with: 
JDK:
java version "1.7.0_15"
OpenJDK Runtime Environment (IcedTea7 2.3.7) (7u15-2.3.7-0ubuntu1~12.10)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)

Comment 3 Karel Piwko 2013-03-08 09:52:09 UTC
Stefan, 

can you please verify with same JDK version? And can you please ensure you're not using signed cglib, which might leaked from our MEAD repository into your local repository?

Comment 4 Stefan Miklosovic 2013-03-11 14:53:45 UTC
I tried that with openjdk 1.7.0_09 and it works, maybe using of signed cglib or just some unlucky match of dependencies was the issue. For me this issue is closed.