[JBoss JIRA] (WFLY-11357) Tests RemoteLocalCall*TestCase fail with security manager
by Thomas Jenkinson (Jira)
[ https://issues.jboss.org/browse/WFLY-11357?page=com.atlassian.jira.plugin... ]
Thomas Jenkinson reassigned WFLY-11357:
---------------------------------------
Assignee: Tomasz Adamski (was: Bartosz Baranowski)
> Tests RemoteLocalCall*TestCase fail with security manager
> ---------------------------------------------------------
>
> Key: WFLY-11357
> URL: https://issues.jboss.org/browse/WFLY-11357
> Project: WildFly
> Issue Type: Bug
> Components: EJB, Test Suite, Transactions
> Affects Versions: 15.0.0.Beta1
> Reporter: Martin Choma
> Assignee: Tomasz Adamski
> Priority: Major
> Labels: security-manager
>
> {noformat}
> org.jboss.as.test.multinode.remotecall (2)
> RemoteLocalCallProfileTestCase.testStatelessRemoteFromRemote
> RemoteLocalCallTestCase.testStatelessRemoteFromRemote
> {noformat}
> {noformat}
> Caused by: java.security.AccessControlException: WFSM000001: Permission check failed (permission "("java.io.FilePermission" "/store/work/tc-work/8edf911abfd02209/testsuite/integration/multinode/target/jbossas-multinode-client/standalone/data/ejb-xa-recovery" "write")" in code source "(vfs:/content/remotelocalcall-test-client.jar <no signer certificates>)" of "ModuleClassLoader for Module "deployment.remotelocalcall-test-client.jar" from Service Module Loader")
> at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:294)
> at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:191)
> at java.lang.SecurityManager.checkWrite(SecurityManager.java:979)
> at org.wildfly.security.manager.WildFlySecurityManager.checkWrite(WildFlySecurityManager.java:377)
> at java.io.File.mkdir(File.java:1311)
> at org.wildfly.transaction.client.provider.jboss.FileSystemXAResourceRegistry$XAResourceRegistryFile.<init>(FileSystemXAResourceRegistry.java:207)
> at org.wildfly.transaction.client.provider.jboss.FileSystemXAResourceRegistry.getXAResourceRegistryFile(FileSystemXAResourceRegistry.java:121)
> at org.wildfly.transaction.client.provider.jboss.JBossLocalTransactionProvider.getXAResourceRegistry(JBossLocalTransactionProvider.java:160)
> at org.wildfly.transaction.client.XAOutflowedResources.getOrEnlist(XAOutflowedResources.java:57)
> at org.wildfly.transaction.client.RemoteTransactionContext.outflowTransaction(RemoteTransactionContext.java:222)
> at org.jboss.ejb.protocol.remote.EJBClientChannel.writeTransaction(EJBClientChannel.java:567)
> at org.jboss.ejb.protocol.remote.EJBClientChannel.openSession(EJBClientChannel.java:623)
> at org.jboss.ejb.protocol.remote.RemoteEJBReceiver.createSession(RemoteEJBReceiver.java:149)
> at org.jboss.ejb.client.EJBSessionCreationInvocationContext.proceed(EJBSessionCreationInvocationContext.java:63)
> at org.jboss.ejb.protocol.remote.RemotingEJBClientInterceptor.handleSessionCreation(RemotingEJBClientInterceptor.java:66)
> at org.jboss.ejb.client.EJBSessionCreationInvocationContext.proceed(EJBSessionCreationInvocationContext.java:70)
> at org.jboss.ejb.client.TransactionPostDiscoveryInterceptor.handleSessionCreation(TransactionPostDiscoveryInterceptor.java:89)
> at org.jboss.ejb.client.EJBSessionCreationInvocationContext.proceed(EJBSessionCreationInvocationContext.java:70)
> at org.jboss.ejb.client.DiscoveryEJBClientInterceptor.handleSessionCreation(DiscoveryEJBClientInterceptor.java:150)
> at org.jboss.ejb.client.EJBSessionCreationInvocationContext.proceed(EJBSessionCreationInvocationContext.java:70)
> at org.jboss.ejb.client.NamingEJBClientInterceptor.handleSessionCreation(NamingEJBClientInterceptor.java:93)
> at org.jboss.ejb.client.EJBSessionCreationInvocationContext.proceed(EJBSessionCreationInvocationContext.java:70)
> at org.jboss.ejb.client.TransactionInterceptor.handleSessionCreation(TransactionInterceptor.java:100)
> at org.jboss.ejb.client.EJBSessionCreationInvocationContext.proceed(EJBSessionCreationInvocationContext.java:70)
> at org.jboss.ejb.client.EJBClientContext.createSession(EJBClientContext.java:834)
> at org.jboss.ejb.client.EJBClient.createSessionProxy(EJBClient.java:198)
> at org.jboss.ejb.client.EJBRootContext.lookupNative(EJBRootContext.java:157)
> ... 221 more
> {noformat}
> [1] https://ci.wildfly.org/viewLog.html?buildId=128138&buildTypeId=WF_MasterS...
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 7 months
[JBoss JIRA] (WFLY-11891) Add tests that enable JPA entity class bytecode enhancement
by Scott Marlow (Jira)
[ https://issues.jboss.org/browse/WFLY-11891?page=com.atlassian.jira.plugin... ]
Scott Marlow commented on WFLY-11891:
-------------------------------------
I captured a bit more of the relevant call stack + exception for the failure during EJB view class generation:
Below call stack shows EJB container about to generate view class via ClassFileWriter.
{quote}
10:43:45,828 ERROR [stderr] (MSC service thread 1-3) java.lang.Exception: Stack trace
10:43:45,829 ERROR [stderr] (MSC service thread 1-3) at java.lang.Thread.dumpStack(Thread.java:1336)
10:43:45,829 ERROR [stderr] (MSC service thread 1-3) at org.jboss.classfilewriter.ClassFile.defineInternal(ClassFile.java:298)
10:43:45,829 ERROR [stderr] (MSC service thread 1-3) at org.jboss.classfilewriter.ClassFile.define(ClassFile.java:286)
10:43:45,829 ERROR [stderr] (MSC service thread 1-3) at org.jboss.invocation.proxy.AbstractClassFactory.defineClass(AbstractClassFactory.java:202)
10:43:45,829 ERROR [stderr] (MSC service thread 1-3) at org.jboss.invocation.proxy.AbstractProxyFactory.getCachedMethods(AbstractProxyFactory.java:162)
10:43:45,829 ERROR [stderr] (MSC service thread 1-3) at org.jboss.as.ee.component.ViewConfiguration.addViewInterceptor(ViewConfiguration.java:119)
10:43:45,829 ERROR [stderr] (MSC service thread 1-3) at org.jboss.as.ee.component.NamespaceViewConfigurator.configure(NamespaceViewConfigurator.java:34)
10:43:45,830 ERROR [stderr] (MSC service thread 1-3) at org.jboss.as.ee.component.DefaultComponentViewConfigurator.configure(DefaultComponentViewConfigurator.java:91)
10:43:45,830 ERROR [stderr] (MSC service thread 1-3) at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:92)
10:43:45,830 ERROR [stderr] (MSC service thread 1-3) at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:176)
10:43:45,830 ERROR [stderr] (MSC service thread 1-3) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1738)
10:43:45,830 ERROR [stderr] (MSC service thread 1-3) at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1700)
10:43:45,830 ERROR [stderr] (MSC service thread 1-3) at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1558)
10:43:45,830 ERROR [stderr] (MSC service thread 1-3) at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
10:43:45,830 ERROR [stderr] (MSC service thread 1-3) at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
10:43:45,831 ERROR [stderr] (MSC service thread 1-3) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
10:43:45,831 ERROR [stderr] (MSC service thread 1-3) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
10:43:45,831 ERROR [stderr] (MSC service thread 1-3) at java.lang.Thread.run(Thread.java:748)
{quote}
But, ByteBuddy fails defining the class.
{quote}
then exception is thrown:
10:43:45,828 ERROR [stderr] (MSC service thread 1-3) java.lang.Exception: Stack trace
10:43:45,829 ERROR [stderr] (MSC service thread 1-3) at java.lang.Thread.dumpStack(Thread.java:1336)
10:43:45,829 ERROR [stderr] (MSC service thread 1-3) at org.jboss.classfilewriter.ClassFile.defineInternal(ClassFile.java:298)
10:43:45,829 ERROR [stderr] (MSC service thread 1-3) at org.jboss.classfilewriter.ClassFile.define(ClassFile.java:286)
10:43:45,829 ERROR [stderr] (MSC service thread 1-3) at org.jboss.invocation.proxy.AbstractClassFactory.defineClass(AbstractClassFactory.java:202)
10:43:45,829 ERROR [stderr] (MSC service thread 1-3) at org.jboss.invocation.proxy.AbstractProxyFactory.getCachedMethods(AbstractProxyFactory.java:162)
10:43:45,829 ERROR [stderr] (MSC service thread 1-3) at org.jboss.as.ee.component.ViewConfiguration.addViewInterceptor(ViewConfiguration.java:119)
10:43:45,829 ERROR [stderr] (MSC service thread 1-3) at org.jboss.as.ee.component.NamespaceViewConfigurator.configure(NamespaceViewConfigurator.java:34)
10:43:45,830 ERROR [stderr] (MSC service thread 1-3) at org.jboss.as.ee.component.DefaultComponentViewConfigurator.configure(DefaultComponentViewConfigurator.java:91)
10:43:45,830 ERROR [stderr] (MSC service thread 1-3) at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:92)
10:43:45,830 ERROR [stderr] (MSC service thread 1-3) at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:176)
10:43:45,830 ERROR [stderr] (MSC service thread 1-3) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1738)
10:43:45,830 ERROR [stderr] (MSC service thread 1-3) at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1700)
10:43:45,830 ERROR [stderr] (MSC service thread 1-3) at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1558)
10:43:45,830 ERROR [stderr] (MSC service thread 1-3) at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
10:43:45,830 ERROR [stderr] (MSC service thread 1-3) at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
10:43:45,831 ERROR [stderr] (MSC service thread 1-3) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
10:43:45,831 ERROR [stderr] (MSC service thread 1-3) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
10:43:45,831 ERROR [stderr] (MSC service thread 1-3) at java.lang.Thread.run(Thread.java:748)
10:45:23,663 ERROR [stderr] (MSC service thread 1-3) java.lang.ClassFormatError: WFLYJPA0073: Transformation of class org/jboss/as/test/integration/jpa/transaction/SFSBXPC$$$view3 failed
10:45:23,663 ERROR [stderr] (MSC service thread 1-3) at org.jboss.modules.ModuleClassLoader.defineClassInternal(ModuleClassLoader.java:460)
10:45:23,663 ERROR [stderr] (MSC service thread 1-3) at org.jboss.modules.ModuleClassLoader.defineClassInternal(ModuleClassLoader.java:480)
10:45:23,663 ERROR [stderr] (MSC service thread 1-3) at org.jboss.modules.ClassDefiner.defineClass(ClassDefiner.java:144)
10:45:23,663 ERROR [stderr] (MSC service thread 1-3) at org.jboss.as.server.deployment.ModuleClassFactory.defineClass(ModuleClassFactory.java:56)
10:45:23,663 ERROR [stderr] (MSC service thread 1-3) at org.jboss.classfilewriter.ClassFile.defineInternal(ClassFile.java:299)
10:45:23,664 ERROR [stderr] (MSC service thread 1-3) at org.jboss.classfilewriter.ClassFile.define(ClassFile.java:286)
10:45:23,664 ERROR [stderr] (MSC service thread 1-3) at org.jboss.invocation.proxy.AbstractClassFactory.defineClass(AbstractClassFactory.java:202)
10:45:23,664 ERROR [stderr] (MSC service thread 1-3) at org.jboss.invocation.proxy.AbstractProxyFactory.getCachedMethods(AbstractProxyFactory.java:162)
10:45:23,664 ERROR [stderr] (MSC service thread 1-3) at org.jboss.as.ee.component.ViewConfiguration.addViewInterceptor(ViewConfiguration.java:119)
10:45:23,664 ERROR [stderr] (MSC service thread 1-3) at org.jboss.as.ee.component.NamespaceViewConfigurator.configure(NamespaceViewConfigurator.java:34)
10:45:23,664 ERROR [stderr] (MSC service thread 1-3) at org.jboss.as.ee.component.DefaultComponentViewConfigurator.configure(DefaultComponentViewConfigurator.java:91)
10:45:23,664 ERROR [stderr] (MSC service thread 1-3) at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:92)
10:45:23,664 ERROR [stderr] (MSC service thread 1-3) at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:176)
10:45:23,664 ERROR [stderr] (MSC service thread 1-3) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1738)
10:45:23,665 ERROR [stderr] (MSC service thread 1-3) at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1700)
10:45:23,665 ERROR [stderr] (MSC service thread 1-3) at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1558)
10:45:23,665 ERROR [stderr] (MSC service thread 1-3) at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
10:45:23,665 ERROR [stderr] (MSC service thread 1-3) at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
10:45:23,665 ERROR [stderr] (MSC service thread 1-3) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
10:45:23,665 ERROR [stderr] (MSC service thread 1-3) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
10:45:23,665 ERROR [stderr] (MSC service thread 1-3) at java.lang.Thread.run(Thread.java:748)
10:45:23,666 ERROR [stderr] (MSC service thread 1-3) Caused by: java.lang.IllegalStateException: WFLYJPA0073: Transformation of class org/jboss/as/test/integration/jpa/transaction/SFSBXPC$$$view3 failed
10:45:23,666 ERROR [stderr] (MSC service thread 1-3) at org.jboss.as.jpa.classloader.JPADelegatingClassFileTransformer.transform(JPADelegatingClassFileTransformer.java:68)
10:45:23,666 ERROR [stderr] (MSC service thread 1-3) at org.jboss.as.jpa.classloader.JPADelegatingClassFileTransformer.transform(JPADelegatingClassFileTransformer.java:49)
10:45:23,666 ERROR [stderr] (MSC service thread 1-3) at org.jboss.as.server.deployment.module.DelegatingClassFileTransformer.transform(DelegatingClassFileTransformer.java:60)
10:45:23,666 ERROR [stderr] (MSC service thread 1-3) at org.jboss.modules.JLIClassTransformer.transform(JLIClassTransformer.java:55)
10:45:23,666 ERROR [stderr] (MSC service thread 1-3) at org.jboss.modules.ModuleClassLoader.defineClassInternal(ModuleClassLoader.java:458)
10:45:23,666 ERROR [stderr] (MSC service thread 1-3) ... 20 more
10:45:23,666 ERROR [stderr] (MSC service thread 1-3) Caused by: org.hibernate.jpa.internal.enhance.EnhancingClassTransformerImpl$1: Error performing enhancement of org/jboss/as/test/integration/jpa/transaction/SFSBXPC$$$view3
10:45:23,667 ERROR [stderr] (MSC service thread 1-3) at org.hibernate.jpa.internal.enhance.EnhancingClassTransformerImpl.transform(EnhancingClassTransformerImpl.java:47)
10:45:23,667 ERROR [stderr] (MSC service thread 1-3) at org.jboss.as.jpa.classloader.JPADelegatingClassFileTransformer.transform(JPADelegatingClassFileTransformer.java:66)
10:45:23,667 ERROR [stderr] (MSC service thread 1-3) ... 24 more
10:45:23,667 ERROR [stderr] (MSC service thread 1-3) Caused by: org.hibernate.bytecode.enhance.spi.EnhancementException: Failed to enhance class org/jboss/as/test/integration/jpa/transaction/SFSBXPC$$$view3
10:45:23,667 ERROR [stderr] (MSC service thread 1-3) at org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl.enhance(EnhancerImpl.java:142)
10:45:23,667 ERROR [stderr] (MSC service thread 1-3) at org.hibernate.jpa.internal.enhance.EnhancingClassTransformerImpl.transform(EnhancingClassTransformerImpl.java:44)
10:45:23,667 ERROR [stderr] (MSC service thread 1-3) ... 25 more
10:45:23,668 ERROR [stderr] (MSC service thread 1-3) Caused by: java.lang.IllegalStateException: Cannot resolve type description for org.jboss.as.test.integration.jpa.transaction.SFSBXPC$$$view3
10:45:23,668 ERROR [stderr] (MSC service thread 1-3) at net.bytebuddy.pool.TypePool$Resolution$Illegal.resolve(TypePool.java:159)
10:45:23,668 ERROR [stderr] (MSC service thread 1-3) at net.bytebuddy.pool.TypePool$Default$WithLazyResolution$LazyTypeDescription.delegate(TypePool.java:1407)
10:45:23,668 ERROR [stderr] (MSC service thread 1-3) at net.bytebuddy.description.type.TypeDescription$AbstractBase$OfSimpleType$WithDelegation.getModifiers(TypeDescription.java:8115)
10:45:23,668 ERROR [stderr] (MSC service thread 1-3) at net.bytebuddy.dynamic.scaffold.InstrumentedType$Factory$Default$1.represent(InstrumentedType.java:359)
10:45:23,668 ERROR [stderr] (MSC service thread 1-3) at net.bytebuddy.ByteBuddy.redefine(ByteBuddy.java:731)
10:45:23,668 ERROR [stderr] (MSC service thread 1-3) at org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl.lambda$enhance$0(EnhancerImpl.java:137)
10:45:23,668 ERROR [stderr] (MSC service thread 1-3) at org.hibernate.bytecode.internal.bytebuddy.ByteBuddyState.rewrite(ByteBuddyState.java:149)
10:45:23,668 ERROR [stderr] (MSC service thread 1-3) at org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl.enhance(EnhancerImpl.java:136)
10:45:23,669 ERROR [stderr] (MSC service thread 1-3) ... 26 more
{quote}
> Add tests that enable JPA entity class bytecode enhancement
> -----------------------------------------------------------
>
> Key: WFLY-11891
> URL: https://issues.jboss.org/browse/WFLY-11891
> Project: WildFly
> Issue Type: Enhancement
> Components: JPA / Hibernate
> Affects Versions: 16.0.0.Final
> Reporter: Scott Marlow
> Assignee: Scott Marlow
> Priority: Minor
> Attachments: bytebuddy.log, javassist.log
>
>
> Pick a few unit tests and add the following settings to enable [entity bytecode enhancement|http://docs.jboss.org/hibernate/orm/5.3/userguide/html_single...]:
> {code}
> <property name="hibernate.enhancer.enableDirtyTracking" value="true"/>
> <property name="hibernate.enhancer.enableLazyInitialization" value="true"/>
> <property name="hibernate.enhancer.enableAssociationManagement" value="true"/>
> {code}
> Steps to reproduce:
> * Build WildFly
> * cd testsuite/integration/basic
> * mvn clean install -Dtest=org.jboss.as.test.integration.jpa.transaction.TransactionTestCase
> * mvn clean install -Dtest=org.jboss.as.test.integration.jpa.hibernate.management.ManagementTestCase
> * mvn clean install -Dtest=org.jboss.as.test.integration.jpa.entitylistener.EntityListenersTestCase
> * mvn clean install -Dtest=org.jboss.as.test.integration.jpa.secondlevelcache.JPA2LCTestCase
> Note that the org.jboss.as.test.integration.jpa.transaction.TransactionTestCase test should pass since javassist is specified in the persistence.xml but that seems to be ignored (we still get the ByteBuddy failure).
> To workaround failures, prestart wildfly via: ./standalone.sh -Dhibernate.bytecode.provider=javassist and then run tests.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 7 months
[JBoss JIRA] (WFLY-11907) NPE trying to use Resteasy Client inside CDI Async Event
by Matej Novotny (Jira)
[ https://issues.jboss.org/browse/WFLY-11907?page=com.atlassian.jira.plugin... ]
Matej Novotny edited comment on WFLY-11907 at 3/26/19 10:52 AM:
----------------------------------------------------------------
[~mkopecky] what exactly does RestEasy expect from CDI in {{ResteasyClientBuilder.newBuilder().build();}}?
Because doing events in async manner means that a different thread pool will be used and with that comes a "loss of context" since contexts are mostly thread bound.
CDI will [activate request scope during the asynchronous notification of observer|http://docs.jboss.org/cdi/spec/2.0/cdi-spec.html#request_context] (meaning you won't get context not active exception), however, the state of the context is *not* preserved (no context propagation). Any request scoped beans will be created anew.
was (Author: manovotn):
[~mkopecky] what exactly does RestEasy expect from CDI in {{ResteasyClientBuilder.newBuilder().build();}}?
Because doing events in async manner means that a different thread pool will be used and with that comes a "loss of context" since contexts are mostly thread bound.
CDI will activate request scope during the asynchronous notification of observer (meaning you won't get context not active exception), however, the state of the context is *not* preserved (no context propagation). Any request scoped beans will be created anew.
> NPE trying to use Resteasy Client inside CDI Async Event
> --------------------------------------------------------
>
> Key: WFLY-11907
> URL: https://issues.jboss.org/browse/WFLY-11907
> Project: WildFly
> Issue Type: Bug
> Components: CDI / Weld, REST
> Affects Versions: 14.0.0.Final, 16.0.0.Final
> Reporter: Cody Lerum
> Assignee: Matej Novotny
> Priority: Major
>
> When attempting to use the Resteasy Client inside a CDI Async Event a NPE is thrown.
> {code}
> 12:49:33,513 ERROR [stderr] (Weld Thread Pool -- 4) java.lang.RuntimeException: java.lang.NullPointerException
> 12:49:33,514 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.resteasy.plugins.providers.RegisterBuiltin.register(RegisterBuiltin.java:49)
> 12:49:33,514 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder.getProviderFactory(ResteasyClientBuilder.java:362)
> 12:49:33,514 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder.build(ResteasyClientBuilder.java:395)
> 12:49:33,514 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder.build(ResteasyClientBuilder.java:38)
> 12:49:33,514 ERROR [stderr] (Weld Thread Pool -- 4) at com.outjected.demo.ResteasyClientEventObserver.load(ResteasyClientEventObserver.java:28)
> 12:49:33,514 ERROR [stderr] (Weld Thread Pool -- 4) at com.outjected.demo.ResteasyClientEventObserver.observeAsync(ResteasyClientEventObserver.java:23)
> 12:49:33,514 ERROR [stderr] (Weld Thread Pool -- 4) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 12:49:33,514 ERROR [stderr] (Weld Thread Pool -- 4) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 12:49:33,515 ERROR [stderr] (Weld Thread Pool -- 4) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 12:49:33,515 ERROR [stderr] (Weld Thread Pool -- 4) at java.lang.reflect.Method.invoke(Method.java:498)
> 12:49:33,515 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:95)
> 12:49:33,515 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:85)
> 12:49:33,515 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.weld.injection.MethodInvocationStrategy$DefaultMethodInvocationStrategy.invoke(MethodInvocationStrategy.java:109)
> 12:49:33,515 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:330)
> 12:49:33,515 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:308)
> 12:49:33,515 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:286)
> 12:49:33,515 ERROR [stderr] (Weld Thread Pool -- 4) at javax.enterprise.inject.spi.ObserverMethod.notify(ObserverMethod.java:124)
> 12:49:33,515 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.weld.util.Observers.notify(Observers.java:166)
> 12:49:33,516 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.weld.event.ObserverNotifier.notifyAsyncObserver(ObserverNotifier.java:413)
> 12:49:33,516 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.weld.event.ObserverNotifier.lambda$notifyAsyncObservers$5(ObserverNotifier.java:356)
> 12:49:33,516 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.weld.event.ObserverNotifier.lambda$null$8(ObserverNotifier.java:438)
> 12:49:33,516 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.weld.security.spi.SecurityServices.lambda$getSecurityContextAssociator$0(SecurityServices.java:80)
> 12:49:33,516 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.weld.event.ObserverNotifier.lambda$createSupplier$9(ObserverNotifier.java:435)
> 12:49:33,516 ERROR [stderr] (Weld Thread Pool -- 4) at java.util.concurrent.CompletableFuture$AsyncSupply.run$$$capture(CompletableFuture.java:1590)
> 12:49:33,516 ERROR [stderr] (Weld Thread Pool -- 4) at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java)
> 12:49:33,516 ERROR [stderr] (Weld Thread Pool -- 4) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> 12:49:33,516 ERROR [stderr] (Weld Thread Pool -- 4) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> 12:49:33,517 ERROR [stderr] (Weld Thread Pool -- 4) at java.lang.Thread.run(Thread.java:748)
> 12:49:33,517 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.threads.JBossThread.run(JBossThread.java:485)
> 12:49:33,517 ERROR [stderr] (Weld Thread Pool -- 4) Caused by: java.lang.NullPointerException
> 12:49:33,517 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.resteasy.plugins.providers.RegisterBuiltin.registerProviders(RegisterBuiltin.java:60)
> 12:49:33,517 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.resteasy.plugins.providers.RegisterBuiltin.register(RegisterBuiltin.java:45)
> 12:49:33,517 ERROR [stderr] (Weld Thread Pool -- 4) ... 28 more
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 7 months
[JBoss JIRA] (WFLY-11907) NPE trying to use Resteasy Client inside CDI Async Event
by Matej Novotny (Jira)
[ https://issues.jboss.org/browse/WFLY-11907?page=com.atlassian.jira.plugin... ]
Matej Novotny commented on WFLY-11907:
--------------------------------------
[~mkopecky] what exactly does RestEasy expect from CDI in {{ResteasyClientBuilder.newBuilder().build();}}?
Because doing events in async manner means that a different thread pool will be used and with that comes a "loss of context" since contexts are mostly thread bound.
CDI will activate request scope during the asynchronous notification of observer (meaning you won't get context not active exception), however, the state of the context is *not* preserved (no context propagation). Any request scoped beans will be created anew.
> NPE trying to use Resteasy Client inside CDI Async Event
> --------------------------------------------------------
>
> Key: WFLY-11907
> URL: https://issues.jboss.org/browse/WFLY-11907
> Project: WildFly
> Issue Type: Bug
> Components: CDI / Weld, REST
> Affects Versions: 14.0.0.Final, 16.0.0.Final
> Reporter: Cody Lerum
> Assignee: Matej Novotny
> Priority: Major
>
> When attempting to use the Resteasy Client inside a CDI Async Event a NPE is thrown.
> {code}
> 12:49:33,513 ERROR [stderr] (Weld Thread Pool -- 4) java.lang.RuntimeException: java.lang.NullPointerException
> 12:49:33,514 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.resteasy.plugins.providers.RegisterBuiltin.register(RegisterBuiltin.java:49)
> 12:49:33,514 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder.getProviderFactory(ResteasyClientBuilder.java:362)
> 12:49:33,514 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder.build(ResteasyClientBuilder.java:395)
> 12:49:33,514 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder.build(ResteasyClientBuilder.java:38)
> 12:49:33,514 ERROR [stderr] (Weld Thread Pool -- 4) at com.outjected.demo.ResteasyClientEventObserver.load(ResteasyClientEventObserver.java:28)
> 12:49:33,514 ERROR [stderr] (Weld Thread Pool -- 4) at com.outjected.demo.ResteasyClientEventObserver.observeAsync(ResteasyClientEventObserver.java:23)
> 12:49:33,514 ERROR [stderr] (Weld Thread Pool -- 4) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 12:49:33,514 ERROR [stderr] (Weld Thread Pool -- 4) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 12:49:33,515 ERROR [stderr] (Weld Thread Pool -- 4) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 12:49:33,515 ERROR [stderr] (Weld Thread Pool -- 4) at java.lang.reflect.Method.invoke(Method.java:498)
> 12:49:33,515 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:95)
> 12:49:33,515 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:85)
> 12:49:33,515 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.weld.injection.MethodInvocationStrategy$DefaultMethodInvocationStrategy.invoke(MethodInvocationStrategy.java:109)
> 12:49:33,515 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:330)
> 12:49:33,515 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:308)
> 12:49:33,515 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:286)
> 12:49:33,515 ERROR [stderr] (Weld Thread Pool -- 4) at javax.enterprise.inject.spi.ObserverMethod.notify(ObserverMethod.java:124)
> 12:49:33,515 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.weld.util.Observers.notify(Observers.java:166)
> 12:49:33,516 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.weld.event.ObserverNotifier.notifyAsyncObserver(ObserverNotifier.java:413)
> 12:49:33,516 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.weld.event.ObserverNotifier.lambda$notifyAsyncObservers$5(ObserverNotifier.java:356)
> 12:49:33,516 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.weld.event.ObserverNotifier.lambda$null$8(ObserverNotifier.java:438)
> 12:49:33,516 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.weld.security.spi.SecurityServices.lambda$getSecurityContextAssociator$0(SecurityServices.java:80)
> 12:49:33,516 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.weld.event.ObserverNotifier.lambda$createSupplier$9(ObserverNotifier.java:435)
> 12:49:33,516 ERROR [stderr] (Weld Thread Pool -- 4) at java.util.concurrent.CompletableFuture$AsyncSupply.run$$$capture(CompletableFuture.java:1590)
> 12:49:33,516 ERROR [stderr] (Weld Thread Pool -- 4) at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java)
> 12:49:33,516 ERROR [stderr] (Weld Thread Pool -- 4) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> 12:49:33,516 ERROR [stderr] (Weld Thread Pool -- 4) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> 12:49:33,517 ERROR [stderr] (Weld Thread Pool -- 4) at java.lang.Thread.run(Thread.java:748)
> 12:49:33,517 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.threads.JBossThread.run(JBossThread.java:485)
> 12:49:33,517 ERROR [stderr] (Weld Thread Pool -- 4) Caused by: java.lang.NullPointerException
> 12:49:33,517 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.resteasy.plugins.providers.RegisterBuiltin.registerProviders(RegisterBuiltin.java:60)
> 12:49:33,517 ERROR [stderr] (Weld Thread Pool -- 4) at org.jboss.resteasy.plugins.providers.RegisterBuiltin.register(RegisterBuiltin.java:45)
> 12:49:33,517 ERROR [stderr] (Weld Thread Pool -- 4) ... 28 more
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 7 months
[JBoss JIRA] (WFLY-11898) Add ability to group distributed session attributes to avoid cost of SESSION granularity
by Paul Ferraro (Jira)
[ https://issues.jboss.org/browse/WFLY-11898?page=com.atlassian.jira.plugin... ]
Paul Ferraro updated WFLY-11898:
--------------------------------
Description:
Since SESSION granularity requires the replication of *all* session attribute if *any* attribute was modified in a given request, most distributed web applications should leverage ATTRIBUTE granularity whenever to possible to reduce the replication payload costs per request.
However, if session attribute contains any reference to another session attribute, they are forced to use SESSION granularity to avoid losing referential integrity on failover and duplication of serialized data.
The proposal is to allow users the ability to annotate their session attribute classes such that they can group specific attribute together, while still being able to leverage ATTRIBUTE granularity for the remainder of their session attributes.
>From the user's perspective, I envision something like this:
{code:java}
@SessionAttributeGroup("order")
public class Order implements Serializable {
List<OrderItem> items;
}
@SessionAttributeGroup("order")
public class OrderItem implements Serializable {
//...
}
{code}
Thus the code:
{code:java}
session.setAttribute("order", order);
session.setAttribute("customized-item", item);
{code}
will result in both attributes being store within a single cache entry.
Internally, we use the @SessionAttributeGroup as the attribute name, and a Map<String, Object> as the attribute value, keyed by the actual attribute name.
was:
Since SESSION granularity requires the replication of *all* session attribute if *any* attribute was modified in a given request, most distributed web applications should leverage ATTRIBUTE granularity whenever to possible to reduce the replication payload costs per request.
However, if session attribute contains any reference to another session attribute, they are forced to use SESSION granularity to avoid losing referential integrity on failover and duplication of serialized data.
The proposal is to allow users the ability to annotate their session attribute classes such that they can group specific attribute together, while still being able to leverage ATTRIBUTE granularity for the remainder of their session attributes.
>From the user's perspective, I envision something like this:
@SessionAttributeGroup("order")
public class Order implements Serializable {
List<OrderItem> items;
}
@SessionAttributeGroup("order")
public class OrderItem implements Serializable {
//...
}
Thus the code:
session.setAttribute("order", order);
session.setAttribute("customized-item", item);
will result in both attributes being store within a single cache entry.
Internally, we use the @SessionAttributeGroup as the attribute name, and a Map<String, Object> as the attribute value, keyed by the actual attribute name.
> Add ability to group distributed session attributes to avoid cost of SESSION granularity
> ----------------------------------------------------------------------------------------
>
> Key: WFLY-11898
> URL: https://issues.jboss.org/browse/WFLY-11898
> Project: WildFly
> Issue Type: Feature Request
> Components: Clustering
> Affects Versions: 16.0.0.Final
> Reporter: Paul Ferraro
> Assignee: Paul Ferraro
> Priority: Major
>
> Since SESSION granularity requires the replication of *all* session attribute if *any* attribute was modified in a given request, most distributed web applications should leverage ATTRIBUTE granularity whenever to possible to reduce the replication payload costs per request.
> However, if session attribute contains any reference to another session attribute, they are forced to use SESSION granularity to avoid losing referential integrity on failover and duplication of serialized data.
> The proposal is to allow users the ability to annotate their session attribute classes such that they can group specific attribute together, while still being able to leverage ATTRIBUTE granularity for the remainder of their session attributes.
> From the user's perspective, I envision something like this:
> {code:java}
> @SessionAttributeGroup("order")
> public class Order implements Serializable {
> List<OrderItem> items;
> }
> @SessionAttributeGroup("order")
> public class OrderItem implements Serializable {
> //...
> }
> {code}
> Thus the code:
> {code:java}
> session.setAttribute("order", order);
> session.setAttribute("customized-item", item);
> {code}
> will result in both attributes being store within a single cache entry.
> Internally, we use the @SessionAttributeGroup as the attribute name, and a Map<String, Object> as the attribute value, keyed by the actual attribute name.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 7 months