[
https://issues.apache.org/jira/browse/WICKET-7005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17691537#comment-17691537
]
Maxim Solodovnik edited comment on WICKET-7005 at 2/21/23 11:47 AM:
--------------------------------------------------------------------
Reproducible for me :(
{code}
Apache Maven 3.9.0 (9b58d2bad23a66be161c4664ef21ce219c2c8584)
Maven home: /opt/maven
Java version: 17.0.5, vendor: Private Build, runtime:
/usr/lib/jvm/java-17-openjdk-amd64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.19.0-32-generic", arch: "amd64", family: "unix"
Ubuntu 22.04.2 LTS
{code}
got
{code}
Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException:
error while injecting object [org.example.DemoComponent@5fe7cb6] of type
[org.example.DemoComponent]
at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
at
org.example.BaseTestParallelInjection.lambda$runInjection$2(BaseTestParallelInjection.java:60)
... 73 more
Caused by: java.lang.RuntimeException: error while injecting object
[org.example.DemoComponent@5fe7cb6] of type [org.example.DemoComponent]
at org.apache.wicket.injection.Injector.inject(Injector.java:122)
at
org.apache.wicket.spring.injection.annot.SpringComponentInjector.inject(SpringComponentInjector.java:124)
at
org.example.BaseTestParallelInjection.lambda$runInjection$0(BaseTestParallelInjection.java:47)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.IllegalArgumentException: Could not create type
at net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:170)
at
net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:399)
at
org.apache.wicket.proxy.bytebuddy.ByteBuddyProxyFactory.createOrGetProxyClass(ByteBuddyProxyFactory.java:105)
at
org.apache.wicket.proxy.bytebuddy.ByteBuddyProxyFactory.createProxy(ByteBuddyProxyFactory.java:75)
at
org.apache.wicket.proxy.LazyInitProxyFactory.createProxy(LazyInitProxyFactory.java:160)
at
org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory.getFieldValue(AnnotProxyFieldValueFactory.java:166)
at org.apache.wicket.injection.Injector.inject(Injector.java:111)
... 6 more
Caused by: java.lang.IllegalStateException: Cannot inject already loaded type:
class org.example.beans.WicketProxy_ServiceA
at
net.bytebuddy.dynamic.loading.ClassInjector$UsingReflection.injectRaw(ClassInjector.java:286)
at
net.bytebuddy.dynamic.loading.ClassInjector$AbstractBase.inject(ClassInjector.java:118)
at
net.bytebuddy.dynamic.loading.ClassLoadingStrategy$Default$InjectionDispatcher.load(ClassLoadingStrategy.java:241)
at
net.bytebuddy.dynamic.loading.ClassLoadingStrategy$Default.load(ClassLoadingStrategy.java:148)
at
net.bytebuddy.dynamic.TypeResolutionStrategy$Passive.initialize(TypeResolutionStrategy.java:101)
at
net.bytebuddy.dynamic.DynamicType$Default$Unloaded.load(DynamicType.java:6317)
at
org.apache.wicket.proxy.bytebuddy.ByteBuddyProxyFactory.lambda$createOrGetProxyClass$0(ByteBuddyProxyFactory.java:119)
at net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:168)
... 12 more
{code}
I'll try to debug later this week (don't have much free time :((( )
was (Author: solomax):
Reproducible for me :(
{code}
Apache Maven 3.9.0 (9b58d2bad23a66be161c4664ef21ce219c2c8584)
Maven home: /opt/maven
Java version: 17.0.5, vendor: Private Build, runtime:
/usr/lib/jvm/java-17-openjdk-amd64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.19.0-32-generic", arch: "amd64", family: "unix"
Ubuntu 22.04.2 LTS
{code}
got
{code}
Caused by: java.lang.IllegalStateException: Cannot inject already loaded type:
class org.example.beans.WicketProxy_ServiceA
at
net.bytebuddy.dynamic.loading.ClassInjector$UsingReflection.injectRaw(ClassInjector.java:286)
at
net.bytebuddy.dynamic.loading.ClassInjector$AbstractBase.inject(ClassInjector.java:118)
at
net.bytebuddy.dynamic.loading.ClassLoadingStrategy$Default$InjectionDispatcher.load(ClassLoadingStrategy.java:241)
at
net.bytebuddy.dynamic.loading.ClassLoadingStrategy$Default.load(ClassLoadingStrategy.java:148)
at
net.bytebuddy.dynamic.TypeResolutionStrategy$Passive.initialize(TypeResolutionStrategy.java:101)
at
net.bytebuddy.dynamic.DynamicType$Default$Unloaded.load(DynamicType.java:6317)
at
org.apache.wicket.proxy.bytebuddy.ByteBuddyProxyFactory.lambda$createOrGetProxyClass$0(ByteBuddyProxyFactory.java:119)
at net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:168)
... 12 more
{code}
I'll try to debug later this week (don't have much free time :((( )
> ByteBuddy IllegalStateException: Cannot inject already loaded type
> ------------------------------------------------------------------
>
> Key: WICKET-7005
> URL: https://issues.apache.org/jira/browse/WICKET-7005
> Project: Wicket
> Issue Type: Bug
> Components: wicket-ioc
> Affects Versions: 9.11.0
> Reporter: Miroslav Silhavy
> Priority: Major
> Attachments: WICKET-7005.zip
>
>
> Sometimes we get following exception in our application. It happens during
> our regression application tests running on parallel.
> We're running Wicket 9.11.0 with byteBuddy enabled
> (-Dwicket.ioc.useByteBuddy=true) on Java 17. We applied a workaround by
> changing this spring component to extend a single interface instead of being
> sole class. When using cglib there was no issue.
>
>
> {code:java}
> Caused by: java.lang.RuntimeException: error while injecting object [[Page
> class = com.project.core.web.page.login.LoginPage, id = 1, render count = 0]]
> of type [com.project.core.web.page.login.LoginPage]
> at org.apache.wicket.injection.Injector.inject(Injector.java:122)
> at
> org.apache.wicket.spring.injection.annot.SpringComponentInjector.inject(SpringComponentInjector.java:124)
> at
> org.apache.wicket.spring.injection.annot.SpringComponentInjector.onInstantiation(SpringComponentInjector.java:130)
> at
> org.apache.wicket.application.ComponentInstantiationListenerCollection$1.notify(ComponentInstantiationListenerCollection.java:38)
> at
> org.apache.wicket.application.ComponentInstantiationListenerCollection$1.notify(ComponentInstantiationListenerCollection.java:34)
> at
> org.apache.wicket.util.listener.ListenerCollection.notify(ListenerCollection.java:81)
> at
> org.apache.wicket.application.ComponentInstantiationListenerCollection.onInstantiation(ComponentInstantiationListenerCollection.java:33)
> at org.apache.wicket.Component.<init>(Component.java:691)
> at org.apache.wicket.MarkupContainer.<init>(MarkupContainer.java:180)
> at org.apache.wicket.Page.<init>(Page.java:171)
> at org.apache.wicket.Page.<init>(Page.java:160)
> at org.apache.wicket.markup.html.WebPage.<init>(WebPage.java:99)
> at
> com.project.core.web.page.base.AbstractprojectPage.<init>(AbstractprojectPage.java:64)
> at
> com.project.core.web.page.base.AbstractprojectPage.<init>(AbstractprojectPage.java:54)
> at
> com.project.core.web.page.base.projectPageImpl.<init>(projectPageImpl.java:66)
> at
> com.project.core.web.page.base.projectSimplePage.<init>(projectSimplePage.java:17)
> at com.project.core.web.page.login.LoginPage.<init>(LoginPage.java:86)
> at com.project.core.web.page.login.LoginPage.<init>(LoginPage.java:78)
> ... 151 common frames omitted
> Caused by: java.lang.IllegalArgumentException: Could not create type
> at net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:170)
> at
> net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:399)
> at
> org.apache.wicket.proxy.bytebuddy.ByteBuddyProxyFactory.createOrGetProxyClass(ByteBuddyProxyFactory.java:105)
> at
> org.apache.wicket.proxy.bytebuddy.ByteBuddyProxyFactory.createProxy(ByteBuddyProxyFactory.java:75)
> at
> org.apache.wicket.proxy.LazyInitProxyFactory.createProxy(LazyInitProxyFactory.java:160)
> at
> org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory.getFieldValue(AnnotProxyFieldValueFactory.java:166)
> at org.apache.wicket.injection.Injector.inject(Injector.java:111)
> ... 168 common frames omitted
> Caused by: java.lang.IllegalStateException: Cannot inject already loaded
> type: class
> com.project.core.web.page.base.WicketProxy_DoubleClickPreventionSupport
> at
> net.bytebuddy.dynamic.loading.ClassInjector$UsingReflection.injectRaw(ClassInjector.java:286)
> at
> net.bytebuddy.dynamic.loading.ClassInjector$AbstractBase.inject(ClassInjector.java:118)
> at
> net.bytebuddy.dynamic.loading.ClassLoadingStrategy$Default$InjectionDispatcher.load(ClassLoadingStrategy.java:241)
> at
> net.bytebuddy.dynamic.loading.ClassLoadingStrategy$Default.load(ClassLoadingStrategy.java:148)
> at
> net.bytebuddy.dynamic.TypeResolutionStrategy$Passive.initialize(TypeResolutionStrategy.java:101)
> at
> net.bytebuddy.dynamic.DynamicType$Default$Unloaded.load(DynamicType.java:6166)
> at
> org.apache.wicket.proxy.bytebuddy.ByteBuddyProxyFactory.lambda$createOrGetProxyClass$0(ByteBuddyProxyFactory.java:119)
> at net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:168)
> ... 174 common frames omitted
> {code}
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)