Default proxy service of OWB uses unsafe but it is not that compatible with last versions of java (by design I mean) so switching to ClassLoaderProxyService makes it compatible but drops the package scope proxying capabilities.
Romain Manni-Bucau @rmannibucau <https://twitter.com/rmannibucau> | Blog <https://rmannibucau.metawerx.net/> | Old Blog <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book <https://www.packtpub.com/application-development/java-ee-8-high-performance> Le mar. 5 oct. 2021 à 09:54, Jean-Louis MONTEIRO <jeano...@gmail.com> a écrit : > I'm not too sure what you want to say or what you mean. > Can you elaborate or rephrase please? > > I haven't done anything but use OWB so not sure what you mean by not using > Unsafe. > > Le lun. 4 oct. 2021 à 17:11, Romain Manni-Bucau <rmannibu...@gmail.com> a > écrit : > > > Hi, > > > > Yes, I run 40 containers under java 17 since some weeks but since java > 11 i > > always disable unsafe usage to use classloader proxy service. > > It has limitations but is the proper java compliant way to run with jpms > > on. > > Alternative is to tune the JVM. > > > > Romain Manni-Bucau > > @rmannibucau <https://twitter.com/rmannibucau> | Blog > > <https://rmannibucau.metawerx.net/> | Old Blog > > <http://rmannibucau.wordpress.com> | Github < > > https://github.com/rmannibucau> | > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book > > < > > > https://www.packtpub.com/application-development/java-ee-8-high-performance > > > > > > > > > Le lun. 4 oct. 2021 à 16:37, Thomas Andraschko < > > andraschko.tho...@gmail.com> > > a écrit : > > > > > What environment? > > > FacesDataModelExtension.afterDeploymentValidation is called in > > > AfterDeploymentValidation, which is AFTER AfterBeanDiscovery > > > > > > maybe romain can help > > > no idea about java17 :D > > > > > > Am Mo., 4. Okt. 2021 um 16:24 Uhr schrieb Jean-Louis Monteiro < > > > jlmonte...@tomitribe.com>: > > > > > > > Hi all, > > > > > > > > Does anyone already tried running OWB under JDK 17? > > > > > > > > 2.0.22 seems to produce the following > > > > > > > > !doctype html><html lang="en"><head><title>HTTP Status 500 ? Internal > > > > Server Error</title><style type="text/css">body > > > > {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b > > > > {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 > > > > {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a > > > > {color:black;} .line > > > > > > > > > > > > > > {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP > > > > Status 500 ? Internal Server Error</h1><hr class="line" > > > > /><p><b>Type</b> Exception Report</p><p><b>Message</b> Can't > > > > define proxy > > > > > > > > > > com.sun.ts.tests.securityapi.idstore.idstorepermission.CustomIdentityStoreHandler$$OwbNormalScopeProxy0</p><p><b>Description</b> > > > > The server encountered an unexpected condition that prevented it from > > > > fulfilling the > > > > > > > > > > request.</p><p><b>Exception</b></p><pre>org.apache.webbeans.exception.ProxyGenerationException: > > > > Can't define proxy > > > > > > > > > > > > > > com.sun.ts.tests.securityapi.idstore.idstorepermission.CustomIdentityStoreHandler$$OwbNormalScopeProxy0 > > > > On Java 16 you can set --add-exports > > > > java.base/jdk.internal.misc=ALL-UNNAMED on the JVM > > > > > > > > > > org.apache.webbeans.proxy.Unsafe.onProxyGenerationError(Unsafe.java:295) > > > > > > > > org.apache.webbeans.proxy.Unsafe.defineAndLoadClass(Unsafe.java:281) > > > > > > > > > > > > > > org.apache.webbeans.proxy.AbstractProxyFactory.createProxyClass(AbstractProxyFactory.java:336) > > > > > > > > > > > > > > org.apache.webbeans.proxy.AbstractProxyFactory.createProxyClass(AbstractProxyFactory.java:306) > > > > > > > > > > > > > > org.apache.webbeans.proxy.NormalScopeProxyFactory.createProxyClass(NormalScopeProxyFactory.java:264) > > > > > > > > > > > > > > org.apache.webbeans.proxy.NormalScopeProxyFactory.createProxyClass(NormalScopeProxyFactory.java:192) > > > > > > > > > > > > > > org.apache.webbeans.proxy.NormalScopeProxyFactory.createNormalScopeProxy(NormalScopeProxyFactory.java:149) > > > > > > > > > > > > > > org.apache.webbeans.container.BeanManagerImpl.getReference(BeanManagerImpl.java:791) > > > > > > > > > > > > > > org.apache.webbeans.inject.instance.InstanceImpl.create(InstanceImpl.java:297) > > > > > > > > > > > > > > org.apache.webbeans.inject.instance.InstanceImpl.get(InstanceImpl.java:129) > > > > > > > > > > > > Wanted to try 2.0.23 but it fails with MyFaces > > > > > > > > Caused by: java.lang.IllegalStateException: It's not allowed to call > > > > getBeans(Type, Annotation...) before AfterBeanDiscovery > > > > at > > > > > > > > > > org.apache.webbeans.container.InjectableBeanManager.checkAfterBeanDiscoveryProcessed(InjectableBeanManager.java:423) > > > > at > > > > > > > > > > org.apache.webbeans.container.InjectableBeanManager.getBeans(InjectableBeanManager.java:129) > > > > at > > org.apache.myfaces.cdi.util.CDIUtils.lookup(CDIUtils.java:51) > > > > at > > > > > > > > > > org.apache.myfaces.cdi.model.FacesDataModelExtension.afterDeploymentValidation(FacesDataModelExtension.java:82) > > > > > > > > > > > > Any ideas? > > > > -- > > > > Jean-Louis Monteiro > > > > http://twitter.com/jlouismonteiro > > > > http://www.tomitribe.com > > > > > > > > > > > > -- > Jean-Louis >