[jboss-jira] [JBoss JIRA] (WFLY-10953) Spring Boot Application fails to boot
Giovanni Lovato (JIRA)
issues at jboss.org
Thu Aug 30 09:39:00 EDT 2018
[ https://issues.jboss.org/browse/WFLY-10953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Giovanni Lovato updated WFLY-10953:
-----------------------------------
Description:
When a Spring Boot {{@Service}} has a {{@Transactional}} method and an {{@Autowired}} constructor, the app fails to boot with this exception:
{code}
org.springframework.aop.framework.AopConfigException: Unable to instantiate proxy using Objenesis, and regular proxy instantiation via default constructor fails as well; nested exception is java.lang.NoSuchMethodException: com.example.demo.MessageService$$EnhancerBySpringCGLIB$$afee8fff.<init>()
at org.springframework.aop.framework.ObjenesisCglibAopProxy.createProxyClassAndInstance(ObjenesisCglibAopProxy.java:82)
at org.springframework.aop.framework.CglibAopProxy.getProxy(CglibAopProxy.java:205)
... 44 more
Caused by: java.lang.NoSuchMethodException: com.example.demo.MessageService$$EnhancerBySpringCGLIB$$afee8fff.<init>()
at java.lang.Class.getConstructor0(Class.java:3302)
at java.lang.Class.getDeclaredConstructor(Class.java:2512)
at org.springframework.aop.framework.ObjenesisCglibAopProxy.createProxyClassAndInstance(ObjenesisCglibAopProxy.java:76)
... 45 more
{code}
Removing the {{@Transactional}} method or the injected repository from the service, makes the app start.
Worth noting: the app runs find in WildFly 12.
was:
When a Spring Boot {{@Service}} has a {{@Transactional}} method and an {{@Autowired}} constructor, the app fails to boot with this exception:
{code}
org.springframework.aop.framework.AopConfigException: Unable to instantiate proxy using Objenesis, and regular proxy instantiation via default constructor fails as well; nested exception is java.lang.NoSuchMethodException: com.example.demo.MessageService$$EnhancerBySpringCGLIB$$afee8fff.<init>()
at org.springframework.aop.framework.ObjenesisCglibAopProxy.createProxyClassAndInstance(ObjenesisCglibAopProxy.java:82)
at org.springframework.aop.framework.CglibAopProxy.getProxy(CglibAopProxy.java:205)
... 44 more
Caused by: java.lang.NoSuchMethodException: com.example.demo.MessageService$$EnhancerBySpringCGLIB$$afee8fff.<init>()
at java.lang.Class.getConstructor0(Class.java:3302)
at java.lang.Class.getDeclaredConstructor(Class.java:2512)
at org.springframework.aop.framework.ObjenesisCglibAopProxy.createProxyClassAndInstance(ObjenesisCglibAopProxy.java:76)
... 45 more
{code}
Removing the {{@Transactional}} method or the injected repository from the service, makes the app start.
> Spring Boot Application fails to boot
> -------------------------------------
>
> Key: WFLY-10953
> URL: https://issues.jboss.org/browse/WFLY-10953
> Project: WildFly
> Issue Type: Bug
> Affects Versions: 13.0.0.Final, 14.0.0.Beta2
> Reporter: Giovanni Lovato
> Assignee: Jason Greene
>
> When a Spring Boot {{@Service}} has a {{@Transactional}} method and an {{@Autowired}} constructor, the app fails to boot with this exception:
> {code}
> org.springframework.aop.framework.AopConfigException: Unable to instantiate proxy using Objenesis, and regular proxy instantiation via default constructor fails as well; nested exception is java.lang.NoSuchMethodException: com.example.demo.MessageService$$EnhancerBySpringCGLIB$$afee8fff.<init>()
> at org.springframework.aop.framework.ObjenesisCglibAopProxy.createProxyClassAndInstance(ObjenesisCglibAopProxy.java:82)
> at org.springframework.aop.framework.CglibAopProxy.getProxy(CglibAopProxy.java:205)
> ... 44 more
> Caused by: java.lang.NoSuchMethodException: com.example.demo.MessageService$$EnhancerBySpringCGLIB$$afee8fff.<init>()
> at java.lang.Class.getConstructor0(Class.java:3302)
> at java.lang.Class.getDeclaredConstructor(Class.java:2512)
> at org.springframework.aop.framework.ObjenesisCglibAopProxy.createProxyClassAndInstance(ObjenesisCglibAopProxy.java:76)
> ... 45 more
> {code}
> Removing the {{@Transactional}} method or the injected repository from the service, makes the app start.
> Worth noting: the app runs find in WildFly 12.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the jboss-jira
mailing list