[JBoss JIRA] (WFLY-11956) @PostConstruct on @ApplicationScoped bean called too late in case @Valid is annotated on a business method
by Ronald Sigal (Jira)
[ https://issues.jboss.org/browse/WFLY-11956?page=com.atlassian.jira.plugin... ]
Ronald Sigal commented on WFLY-11956:
-------------------------------------
Ok, [~eli.macdonald], RESTEASY-2227 is fixed in RESTEasy 3.7.0.Final, which has been pulled into Wildfly 17, so I'll set Fix Version to 17.0.0.Beta1 and resolve the issue.
> @PostConstruct on @ApplicationScoped bean called too late in case @Valid is annotated on a business method
> ----------------------------------------------------------------------------------------------------------
>
> Key: WFLY-11956
> URL: https://issues.jboss.org/browse/WFLY-11956
> Project: WildFly
> Issue Type: Bug
> Components: Bean Validation, REST
> Affects Versions: 16.0.0.Final
> Reporter: Joerg Baesner
> Assignee: Ronald Sigal
> Priority: Major
> Fix For: 17.0.0.Beta1
>
> Attachments: logging.txt, playground.zip
>
>
> Having a bean class with {{@ApplicationScoped}}, which has a {{@PostConstruct}} and is implementing the following _Interface_:
> {code}
> @Path("/validated")
> public interface ValidatedJaxRsInterface {
>
> @GET
> @Valid
> @Produces(MediaType.APPLICATION_JSON)
> GreetingModel getHelloGreeting();
> }
> {code}
> will result in calling the {{getHelloGreeting}} method of the implementation class twice *_before_* the {{@PostConstruct}} is getting executed.
> This can be reproduced with the attached reproducer application...
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 2 months
[JBoss JIRA] (WFLY-11956) @PostConstruct on @ApplicationScoped bean called too late in case @Valid is annotated on a business method
by Ronald Sigal (Jira)
[ https://issues.jboss.org/browse/WFLY-11956?page=com.atlassian.jira.plugin... ]
Ronald Sigal updated WFLY-11956:
--------------------------------
Fix Version/s: 17.0.0.Beta1
> @PostConstruct on @ApplicationScoped bean called too late in case @Valid is annotated on a business method
> ----------------------------------------------------------------------------------------------------------
>
> Key: WFLY-11956
> URL: https://issues.jboss.org/browse/WFLY-11956
> Project: WildFly
> Issue Type: Bug
> Components: Bean Validation, REST
> Affects Versions: 16.0.0.Final
> Reporter: Joerg Baesner
> Assignee: Ronald Sigal
> Priority: Major
> Fix For: 17.0.0.Beta1
>
> Attachments: logging.txt, playground.zip
>
>
> Having a bean class with {{@ApplicationScoped}}, which has a {{@PostConstruct}} and is implementing the following _Interface_:
> {code}
> @Path("/validated")
> public interface ValidatedJaxRsInterface {
>
> @GET
> @Valid
> @Produces(MediaType.APPLICATION_JSON)
> GreetingModel getHelloGreeting();
> }
> {code}
> will result in calling the {{getHelloGreeting}} method of the implementation class twice *_before_* the {{@PostConstruct}} is getting executed.
> This can be reproduced with the attached reproducer application...
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 2 months
[JBoss JIRA] (WFLY-11833) Stateful Session Bean affinity URI instead of cluster
by Richard Achmatowicz (Jira)
[ https://issues.jboss.org/browse/WFLY-11833?page=com.atlassian.jira.plugin... ]
Richard Achmatowicz commented on WFLY-11833:
--------------------------------------------
There are a couple of problems with this code.
Remember that this case involves a client invoking a method on a SLSB which creates a SFSB on the server (using an injected @EJB instance on in the SLSB) and then returns the proxy to the client. This involves three EJB client proxies:
* the proxy used by the remote client to make the invocation on the SLSB (remote client proxy)
* a proxy created for the @EJB injected instance to allow invocations on the Home interface (for creating the SFSB instance) (home instance proxy)
* a proxy created for the new SFSB instance, and which is returned to the client (SFSB proxy)
The first problem is that the SFSB proxy is being assigned Affinity.LOCAL when it is created, which assumes that the proxy will only be used locally. THis does not take into account the fact that the proxy will be returned as a result to the remote client.
The second problem is that when an EJB client in a deployment makes an in-container invocation on an EJB in another deployment (or even the same deployment), the results and the exceptions of that invocation are cloned before being returned (I assume so that they can be moved from the EJB's classloading environment to the caller's classloading environment). In particular, if the result of the invocation is a proxy, the proxy gets cloned. A proxy is basically a wrapped instance of EJBInvocationHandler. JBoss Marshalling is used to do this and has a class called SerializedEJBInvocationHandler which is responsible for marshalling and unmarshalling an EJBInvocationHandler. This class normally carries a strong affinity (it its Locator) and a weak affinity. When marshalled, SerializedEJBInvocationHandler only includes the Locator and does not include the weak affinity in the serialised state. When unmarshalled, it uses readReplace() to take the Locator, create an EJBInvocationHandler instance and incorrectly sets the weak affinity based on the strong affinity. The real weak affinity is getting lost. Consequently, during the EJB client Home interface invocation to create the SFSB, where a proxy for the new bean is created and returned as a result, the proxy affinities get whacked from (strong, weak) = (Cluster("ejb"), Node("node-1") to (strong, weak) = (Cluster("ejb"), Cluster("ejb")), which is not correct. This is the proxy that gets sent back to the remote client.
> Stateful Session Bean affinity URI instead of cluster
> -----------------------------------------------------
>
> Key: WFLY-11833
> URL: https://issues.jboss.org/browse/WFLY-11833
> Project: WildFly
> Issue Type: Bug
> Components: Clustering, EJB
> Affects Versions: 16.0.0.Final
> Environment: WildFly cluster having SFSB deployed.
> Reporter: Joerg Baesner
> Assignee: Richard Achmatowicz
> Priority: Major
> Labels: downstream_dependency
> Attachments: stateful-timeout.zip
>
>
> Deployed is an application with the following setup:
> * Containing a SFSB (_with passivationCapable="true"_)
> * A SLSB exposing a _remote_ method to a standalone client returning an instance of the SFSB
> Scenario:
> A standalone client is invoking the _remote_ method on the Stateless Session Bean and a new instance of the Stateful Session Bean is returned.
> The issue is that the affinity of the returned Stateful Session Bean is URI instead of Cluster.
> See the attached Gradle reproducer application
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 2 months
[JBoss JIRA] (WFLY-12112) kubernetes.KUBE_PING warns about usage of deprecated properties even when unused
by Radoslav Husar (Jira)
[ https://issues.jboss.org/browse/WFLY-12112?page=com.atlassian.jira.plugin... ]
Radoslav Husar updated WFLY-12112:
----------------------------------
Priority: Minor (was: Major)
> kubernetes.KUBE_PING warns about usage of deprecated properties even when unused
> --------------------------------------------------------------------------------
>
> Key: WFLY-12112
> URL: https://issues.jboss.org/browse/WFLY-12112
> Project: WildFly
> Issue Type: Bug
> Components: Clustering
> Affects Versions: 16.0.0.Final, 17.0.0.Alpha1
> Reporter: Radoslav Husar
> Assignee: Radoslav Husar
> Priority: Minor
>
> {noformat}
> 12:26:03,871 WARN [org.jgroups.protocols.kubernetes.KUBE_PING] (ServerService Thread Pool -- 68) OPENSHIFT_KUBE_PING_NAMESPACE is deprecated, please remove it and use KUBERNETES_NAMESPACE instead
> 12:26:03,871 WARN [org.jgroups.protocols.kubernetes.KUBE_PING] (ServerService Thread Pool -- 68) OPENSHIFT_KUBE_PING_LABELS is deprecated, please remove it and use KUBERNETES_LABELS instead
> {noformat}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 2 months
[JBoss JIRA] (WFLY-12112) kubernetes.KUBE_PING warns about usage of deprecated properties even when unused
by Radoslav Husar (Jira)
[ https://issues.jboss.org/browse/WFLY-12112?page=com.atlassian.jira.plugin... ]
Radoslav Husar commented on WFLY-12112:
---------------------------------------
The fix is already available upstream, needs a component upgrade.
> kubernetes.KUBE_PING warns about usage of deprecated properties even when unused
> --------------------------------------------------------------------------------
>
> Key: WFLY-12112
> URL: https://issues.jboss.org/browse/WFLY-12112
> Project: WildFly
> Issue Type: Bug
> Components: Clustering
> Affects Versions: 16.0.0.Final, 17.0.0.Alpha1
> Reporter: Radoslav Husar
> Assignee: Radoslav Husar
> Priority: Major
>
> {noformat}
> 12:26:03,871 WARN [org.jgroups.protocols.kubernetes.KUBE_PING] (ServerService Thread Pool -- 68) OPENSHIFT_KUBE_PING_NAMESPACE is deprecated, please remove it and use KUBERNETES_NAMESPACE instead
> 12:26:03,871 WARN [org.jgroups.protocols.kubernetes.KUBE_PING] (ServerService Thread Pool -- 68) OPENSHIFT_KUBE_PING_LABELS is deprecated, please remove it and use KUBERNETES_LABELS instead
> {noformat}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 2 months
[JBoss JIRA] (WFLY-12112) kubernetes.KUBE_PING warns about usage of deprecated properties even when unused
by Radoslav Husar (Jira)
Radoslav Husar created WFLY-12112:
-------------------------------------
Summary: kubernetes.KUBE_PING warns about usage of deprecated properties even when unused
Key: WFLY-12112
URL: https://issues.jboss.org/browse/WFLY-12112
Project: WildFly
Issue Type: Bug
Components: Clustering
Affects Versions: 17.0.0.Alpha1, 16.0.0.Final
Reporter: Radoslav Husar
Assignee: Radoslav Husar
{noformat}
12:26:03,871 WARN [org.jgroups.protocols.kubernetes.KUBE_PING] (ServerService Thread Pool -- 68) OPENSHIFT_KUBE_PING_NAMESPACE is deprecated, please remove it and use KUBERNETES_NAMESPACE instead
12:26:03,871 WARN [org.jgroups.protocols.kubernetes.KUBE_PING] (ServerService Thread Pool -- 68) OPENSHIFT_KUBE_PING_LABELS is deprecated, please remove it and use KUBERNETES_LABELS instead
{noformat}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 2 months
[JBoss JIRA] (WFWIP-162) IllegalStateException when TrustManager with SunX509 algorithm and with OCSP
by Jan Stourac (Jira)
[ https://issues.jboss.org/browse/WFWIP-162?page=com.atlassian.jira.plugin.... ]
Jan Stourac updated WFWIP-162:
------------------------------
Steps to Reproduce:
{code}
./bin/standalone.sh
./bin/jboss-cli.sh -c
/subsystem=elytron/key-store=serverTS:add(credential-reference={clear-text=weneedthatforjava},path=<PATH_TO_ocsp-truststore.jks>)
/subsystem=elytron/trust-manager=tm:add(key-store=serverTS, ocsp={}, algorithm=SunX509)
# now see that operation ends with error
# following commands succeed
/subsystem=elytron/trust-manager=tm:add(key-store=serverTS, ocsp={})
/subsystem=elytron/trust-manager=tm:add(key-store=serverKS, certificate-revocation-list={}, algorithm=SunX509)
{code}
was:
{code}
./bin/standalone.sh
./bin/jboss-cli.sh -c
/subsystem=elytron/key-store=serverTS:add(credential-reference={clear-text=weneedthatforjava},path=<PATH_TO_ocsp-truststore.jks>)
/subsystem=elytron/trust-manager=tm:add(key-store=serverTS, ocsp={}, algorithm=SunX509)
# now see that operation ends with error
# # following commands succeeds
/subsystem=elytron/trust-manager=tm:add(key-store=serverTS, ocsp={})
/subsystem=elytron/trust-manager=tm:add(key-store=serverKS, certificate-revocation-list={}, algorithm=SunX509)
{code}
> IllegalStateException when TrustManager with SunX509 algorithm and with OCSP
> ----------------------------------------------------------------------------
>
> Key: WFWIP-162
> URL: https://issues.jboss.org/browse/WFWIP-162
> Project: WildFly WIP
> Issue Type: Bug
> Components: Security
> Environment: WildFly built with following branches in use:
> {code}
> https://github.com/nekdozjam/wildfly-elytron/tree/ELY-1617
> https://github.com/nekdozjam/wildfly-core/tree/WFCORE-3947
> {code}
> Reporter: Jan Stourac
> Assignee: Martin Mazanek
> Priority: Major
> Attachments: ocsp-truststore.jks
>
>
> I can see an error when I try to create 'trust-manager' with OCSP enabled and SunX509 algorithm specified. When I don't specify SunX509 algorithm, operation succeeds.
> Here are noticed error messages:
> {code}
> {
> "outcome" => "failed",
> "failure-description" => {"WFLYCTL0080: Failed services" => {"org.wildfly.security.trust-manager.tm" => "Failed to start service
> Caused by: java.lang.IllegalStateException: ELY04026: Could not create trust manager [org.wildfly.security.ssl.X509RevocationTrustManager]
> Caused by: java.security.InvalidAlgorithmParameterException: SunX509 TrustManagerFactory does not use ManagerFactoryParameters"}},
> "rolled-back" => true
> }
> {code}
> In server.log, there is following text:
> {code}
> 17:14:48,560 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service org.wildfly.security.trust-manager.tm: org.jboss.msc.service.StartException in service org.wildfly.security.trust-manager.tm: Failed to start service
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1730)
> at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1558)
> at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
> at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
> at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
> at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.IllegalStateException: ELY04026: Could not create trust manager [org.wildfly.security.ssl.X509RevocationTrustManager]
> at org.wildfly.security.ssl.X509RevocationTrustManager.<init>(X509RevocationTrustManager.java:108)
> at org.wildfly.security.ssl.X509RevocationTrustManager.<init>(X509RevocationTrustManager.java:56)
> at org.wildfly.security.ssl.X509RevocationTrustManager$Builder.build(X509RevocationTrustManager.java:293)
> at org.wildfly.extension.elytron.SSLDefinitions$2.lambda$createX509RevocationExtendedTrustManager$1(SSLDefinitions.java:732)
> at org.wildfly.extension.elytron.TrivialService.start(TrivialService.java:53)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1738)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1700)
> ... 6 more
> Caused by: java.security.InvalidAlgorithmParameterException: SunX509 TrustManagerFactory does not use ManagerFactoryParameters
> at sun.security.ssl.TrustManagerFactoryImpl$SimpleFactory.getInstance(TrustManagerFactoryImpl.java:257)
> at sun.security.ssl.TrustManagerFactoryImpl.engineInit(TrustManagerFactoryImpl.java:90)
> at javax.net.ssl.TrustManagerFactory.init(TrustManagerFactory.java:273)
> at org.wildfly.security.ssl.X509RevocationTrustManager.<init>(X509RevocationTrustManager.java:98)
> ... 12 more
> 17:14:48,562 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("add") failed - address: ([
> ("subsystem" => "elytron"),
> ("trust-manager" => "tm")
> ]) - failure description: {"WFLYCTL0080: Failed services" => {"org.wildfly.security.trust-manager.tm" => "Failed to start service
> Caused by: java.lang.IllegalStateException: ELY04026: Could not create trust manager [org.wildfly.security.ssl.X509RevocationTrustManager]
> Caused by: java.security.InvalidAlgorithmParameterException: SunX509 TrustManagerFactory does not use ManagerFactoryParameters"}}
> {code}
> I'm attaching kestore file that I used for this. Password is 'weneedthatforjava'.
> Note that when I try 'certificate-revocation-list' instead or if I omit 'algorithm' attribute at all, the operation succeeds.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 2 months