[JBoss JIRA] (WFLY-11566) ConstraintDeclarationException on JAX-RS/EJB Methods with List/Set query parameter
by Marek Kopecký (Jira)
[ https://issues.jboss.org/browse/WFLY-11566?page=com.atlassian.jira.plugin... ]
Marek Kopecký commented on WFLY-11566:
--------------------------------------
[~ron_sigal] (cc [~asoldano]): You are assignee of this jira. What is the status of this issue? Do you have some ETA? Is there some plan about this?
> ConstraintDeclarationException on JAX-RS/EJB Methods with List/Set query parameter
> ----------------------------------------------------------------------------------
>
> Key: WFLY-11566
> URL: https://issues.jboss.org/browse/WFLY-11566
> Project: WildFly
> Issue Type: Bug
> Components: Bean Validation, EJB, REST
> Affects Versions: 14.0.0.Final, 15.0.1.Final
> Reporter: Alexander Wagner
> Assignee: Ron Sigal
> Priority: Critical
> Attachments: WFLY-11566-3.tar
>
>
> You got an exception if you call methods on JAX-RS endpoints which are also e.g. a stateless EJB and have Set or List as query parameters.
> As a workaround we use the "@Context UriInfo info" as parameter an read the parameter manually. As a downside this parameters are missing than in automated api generation with e.g. swagger. Without the @NotEmpty annotation it works fine. Without the generic type parameter ie just List it works fine. Making it a simple CDI bean makes it work fine.
> This issue is caused by [commit - WFLY-9628 Allow to switch to Hibernate Validator 6.0 / Bean Validation 2.0|https://github.com/wildfly/wildfly/commit/02f230d91f55f86ee6cadf53832...]
> Steps to reproduce:
> {code:java}
> @Stateless
> @Path("/")
> public class Resource {
> @POST
> @Path("put/list")
> @Consumes(MediaType.APPLICATION_JSON)
> public String putList(@NotEmpty List<String> a) {
> return "Hello bars " + a.stream().collect(Collectors.joining(", "));
> }
> }
> {code}
> {noformat}
> [mkopecky@dhcp-10-40-5-71 bin]$ curl -d '["a","b","c"]' -H "Content-Type: application/json" -X POST http://localhost:8080/jaxrs-wf/put/list
> javax.validation.ConstraintDeclarationException: HV000151: A method overriding another method must not redefine the parameter constraint configuration, but method Resource$$$view1#putList(List) redefines the configuration of Resource#putList(List).
> [mkopecky@dhcp-10-40-5-71 bin]$
> {noformat}
> {noformat}
> javax.validation.ConstraintDeclarationException: HV000151: A method overriding another method must not redefine the parameter constraint configuration, but method Resource$$$view1#putList(List) redefines the configuration of Resource#putList(List).
> at org.hibernate.validator.internal.metadata.aggregated.rule.OverridingMethodMustNotAlterParameterConstraints.apply(OverridingMethodMustNotAlterParameterConstraints.java:24)
> at org.hibernate.validator.internal.metadata.aggregated.ExecutableMetaData$Builder.assertCorrectnessOfConfiguration(ExecutableMetaData.java:461)
> at org.hibernate.validator.internal.metadata.aggregated.ExecutableMetaData$Builder.build(ExecutableMetaData.java:377)
> at org.hibernate.validator.internal.metadata.aggregated.BeanMetaDataImpl$BuilderDelegate.build(BeanMetaDataImpl.java:788)
> at org.hibernate.validator.internal.metadata.aggregated.BeanMetaDataImpl$BeanMetaDataBuilder.build(BeanMetaDataImpl.java:648)
> at org.hibernate.validator.internal.metadata.BeanMetaDataManager.createBeanMetaData(BeanMetaDataManager.java:192)
> at org.hibernate.validator.internal.metadata.BeanMetaDataManager.lambda$getBeanMetaData$0(BeanMetaDataManager.java:160)
> at java.util.concurrent.ConcurrentMap.computeIfAbsent(ConcurrentMap.java:324)
> at org.hibernate.validator.internal.metadata.BeanMetaDataManager.getBeanMetaData(BeanMetaDataManager.java:159)
> at org.hibernate.validator.internal.engine.ValidationContext$ValidationContextBuilder.forValidateParameters(ValidationContext.java:619)
> at org.hibernate.validator.internal.engine.ValidatorImpl.validateParameters(ValidatorImpl.java:254)
> at org.hibernate.validator.internal.engine.ValidatorImpl.validateParameters(ValidatorImpl.java:224)
> at org.jboss.resteasy.plugins.validation.GeneralValidatorImpl.validateAllParameters(GeneralValidatorImpl.java:177)
> at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:118)
> at org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:509)
> at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:399)
> at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$0(ResourceMethodInvoker.java:363)
> at org.jboss.resteasy.core.interception.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:355)
> at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:365)
> at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:337)
> at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:310)
> at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:439)
> at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:229)
> at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:135)
> at org.jboss.resteasy.core.interception.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:355)
> at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:138)
> at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:215)
> at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:227)
> at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
> at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:791)
> at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
> at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
> at io.opentracing.contrib.jaxrs2.server.SpanFinishingFilter.doFilter(SpanFinishingFilter.java:55)
> at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
> at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
> at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
> at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
> at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
> at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
> at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132)
> at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
> at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
> at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
> at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
> at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
> at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
> at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
> at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
> at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
> at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
> at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
> at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
> at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
> at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
> at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
> at io.undertow.server.Connectors.executeRootHandler(Connectors.java:360)
> at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)
> at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
> at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
> at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
> at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
> at java.lang.Thread.run(Thread.java:748)
> {noformat}
> Links:
> * [forum|https://developer.jboss.org/thread/278822]
> * WFLY-11566
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 11 months
[JBoss JIRA] (WFLY-11664) EJB client 4 is unable to discover EJB after WildFly crash during previous call and reboot
by Michal Jurc (Jira)
[ https://issues.jboss.org/browse/WFLY-11664?page=com.atlassian.jira.plugin... ]
Michal Jurc updated WFLY-11664:
-------------------------------
Summary: EJB client 4 is unable to discover EJB after WildFly crash during previous call and reboot (was: EJB client is unable to discover EJB after WildFly crash during previous call and reboot)
> EJB client 4 is unable to discover EJB after WildFly crash during previous call and reboot
> ------------------------------------------------------------------------------------------
>
> Key: WFLY-11664
> URL: https://issues.jboss.org/browse/WFLY-11664
> Project: WildFly
> Issue Type: Bug
> Components: EJB, Remoting
> Affects Versions: 14.0.0.Final, 15.0.0.Final
> Reporter: Ivan Straka
> Priority: Blocker
> Attachments: reproducer.zip
>
>
> Issue is not valid for 7.2.0.CD12 (upstream client: 12.0.0.Final) therefore we consider this as a blocker.
> Lets have two WildFly servers and same EJB on both. They have nothing to do with each other. And the client app that call beans on them.
> *Scenario*
> # Client invokes _hello_ method on the first server which crash during the call. Exception is consumed.
> # Client calls successfully _hello_ method on the second one.
> # Now, the first server is started again and then the client (same thread) try to call _hello_ on the first one. The call should be successful but the client is unable to discover bean.
> {code:java}Exception in thread "main" java.lang.RuntimeException: javax.ejb.NoSuchEJBException: EJBCLIENT000079: Unable to discover destination for request for EJB StatelessEJBLocator for "/server-1/HelloBean", view is interface ejb.HelloBeanRemote, affinity is None
> at client.Client.call(Client.java:41)
> at client.Client.main(Client.java:21)
> Caused by: javax.ejb.NoSuchEJBException: EJBCLIENT000079: Unable to discover destination for request for EJB StatelessEJBLocator for "/server-1/HelloBean", view is interface ejb.HelloBeanRemote, affinity is None
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:592)
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528)
> at org.jboss.ejb.protocol.remote.RemotingEJBClientInterceptor.handleInvocationResult(RemotingEJBClientInterceptor.java:56)
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:594)
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528)
> at org.jboss.ejb.client.TransactionPostDiscoveryInterceptor.handleInvocationResult(TransactionPostDiscoveryInterceptor.java:133)
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:594)
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528)
> at org.jboss.ejb.client.DiscoveryEJBClientInterceptor.handleInvocationResult(DiscoveryEJBClientInterceptor.java:115)
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:594)
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528)
> at org.jboss.ejb.client.NamingEJBClientInterceptor.handleInvocationResult(NamingEJBClientInterceptor.java:79)
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:594)
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528)
> at org.jboss.ejb.client.TransactionInterceptor.handleInvocationResult(TransactionInterceptor.java:172)
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:594)
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528)
> at org.jboss.ejb.client.EJBClientInvocationContext.awaitResponse(EJBClientInvocationContext.java:938)
> at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:177)
> at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:112)
> at com.sun.proxy.$Proxy0.hello(Unknown Source)
> at client.Client.call(Client.java:35)
> ... 1 more
> {code}
> I hit this issue with 15.0.0.Final, 14.0.0.Final but not with 12.0.0.Final.
> If client try to invoke _hello_ on the first server before it reboots (exception is consumed), there is no problem after.
> *Client side*
> {code:java}
> public static void main(String[] args)
> throws Exception {
> call("server-2", true);
> call("server-1", true);
> for (int i = 30; i > 0; i--) {
> System.out.println(i);
> Thread.sleep(1000);
> }
> call("server-1", false);
> }
> public static Properties getCtxProperties() {
> Properties props = new Properties();
> props.put(Context.INITIAL_CONTEXT_FACTORY, "org.wildfly.naming.client.WildFlyInitialContextFactory");
> return props;
> }
> public static void call(String container, boolean exceptedFailure) {
> try {
> InitialContext ctx = new InitialContext(getCtxProperties());
> String lookupName = "ejb:/" + container + "/HelloBean!ejb.HelloBeanRemote";
> HelloBeanRemote bean = (HelloBeanRemote) ctx.lookup(lookupName);
> System.out.println(bean.hello());
> } catch (Exception e) {
> if (exceptedFailure) {
> System.out.println("EXPECTED FAILURE");
> e.printStackTrace();
> } else {
> throw new RuntimeException(e);
> }
> }
> }
> {code}
> *Server side*
> {code:java}
> @Stateless
> @Remote(HelloBeanRemote.class)
> public class HelloBean {
> private static Logger log = Logger.getLogger(HelloBean.class);
> public String hello() throws RemoteException {
> log.info("hello called with message");
> return "Hello there";
> }
> }
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 11 months
[JBoss JIRA] (WFLY-11664) EJB client is unable to discover EJB after WildFly crash during previous call and reboot
by Ivan Straka (Jira)
[ https://issues.jboss.org/browse/WFLY-11664?page=com.atlassian.jira.plugin... ]
Ivan Straka updated WFLY-11664:
-------------------------------
Description:
Issue is not valid for 7.2.0.CD12 (upstream client: 12.0.0.Final) therefore we consider this as a blocker.
Lets have two WildFly servers and same EJB on both. They have nothing to do with each other. And the client app that call beans on them.
*Scenario*
# Client invokes _hello_ method on the first server which crash during the call. Exception is consumed.
# Client calls successfully _hello_ method on the second one.
# Now, the first server is started again and then the client (same thread) try to call _hello_ on the first one. The call should be successful but the client is unable to discover bean.
{code:java}Exception in thread "main" java.lang.RuntimeException: javax.ejb.NoSuchEJBException: EJBCLIENT000079: Unable to discover destination for request for EJB StatelessEJBLocator for "/server-1/HelloBean", view is interface ejb.HelloBeanRemote, affinity is None
at client.Client.call(Client.java:41)
at client.Client.main(Client.java:21)
Caused by: javax.ejb.NoSuchEJBException: EJBCLIENT000079: Unable to discover destination for request for EJB StatelessEJBLocator for "/server-1/HelloBean", view is interface ejb.HelloBeanRemote, affinity is None
at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:592)
at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528)
at org.jboss.ejb.protocol.remote.RemotingEJBClientInterceptor.handleInvocationResult(RemotingEJBClientInterceptor.java:56)
at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:594)
at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528)
at org.jboss.ejb.client.TransactionPostDiscoveryInterceptor.handleInvocationResult(TransactionPostDiscoveryInterceptor.java:133)
at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:594)
at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528)
at org.jboss.ejb.client.DiscoveryEJBClientInterceptor.handleInvocationResult(DiscoveryEJBClientInterceptor.java:115)
at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:594)
at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528)
at org.jboss.ejb.client.NamingEJBClientInterceptor.handleInvocationResult(NamingEJBClientInterceptor.java:79)
at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:594)
at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528)
at org.jboss.ejb.client.TransactionInterceptor.handleInvocationResult(TransactionInterceptor.java:172)
at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:594)
at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528)
at org.jboss.ejb.client.EJBClientInvocationContext.awaitResponse(EJBClientInvocationContext.java:938)
at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:177)
at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:112)
at com.sun.proxy.$Proxy0.hello(Unknown Source)
at client.Client.call(Client.java:35)
... 1 more
{code}
I hit this issue with 15.0.0.Final, 14.0.0.Final but not with 12.0.0.Final.
If client try to invoke _hello_ on the first server before it reboots (exception is consumed), there is no problem after.
*Client side*
{code:java}
public static void main(String[] args)
throws Exception {
call("server-2", true);
call("server-1", true);
for (int i = 30; i > 0; i--) {
System.out.println(i);
Thread.sleep(1000);
}
call("server-1", false);
}
public static Properties getCtxProperties() {
Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY, "org.wildfly.naming.client.WildFlyInitialContextFactory");
return props;
}
public static void call(String container, boolean exceptedFailure) {
try {
InitialContext ctx = new InitialContext(getCtxProperties());
String lookupName = "ejb:/" + container + "/HelloBean!ejb.HelloBeanRemote";
HelloBeanRemote bean = (HelloBeanRemote) ctx.lookup(lookupName);
System.out.println(bean.hello());
} catch (Exception e) {
if (exceptedFailure) {
System.out.println("EXPECTED FAILURE");
e.printStackTrace();
} else {
throw new RuntimeException(e);
}
}
}
{code}
*Server side*
{code:java}
@Stateless
@Remote(HelloBeanRemote.class)
public class HelloBean {
private static Logger log = Logger.getLogger(HelloBean.class);
public String hello() throws RemoteException {
log.info("hello called with message");
return "Hello there";
}
}
{code}
was:
Lets have two WildFly servers and same EJB on both. They have nothing to do with each other.
*Scenario*
# client invoke method on both beans and the first called server crash during invocation
# after the server reboots, client is unable to discover EJB on the server
{code:java}Exception in thread "main" java.lang.RuntimeException: javax.ejb.NoSuchEJBException: EJBCLIENT000079: Unable to discover destination for request for EJB StatelessEJBLocator for "/server-1/HelloBean", view is interface ejb.HelloBeanRemote, affinity is None
at client.Client.call(Client.java:41)
at client.Client.main(Client.java:21)
Caused by: javax.ejb.NoSuchEJBException: EJBCLIENT000079: Unable to discover destination for request for EJB StatelessEJBLocator for "/server-1/HelloBean", view is interface ejb.HelloBeanRemote, affinity is None
at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:592)
at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528)
at org.jboss.ejb.protocol.remote.RemotingEJBClientInterceptor.handleInvocationResult(RemotingEJBClientInterceptor.java:56)
at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:594)
at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528)
at org.jboss.ejb.client.TransactionPostDiscoveryInterceptor.handleInvocationResult(TransactionPostDiscoveryInterceptor.java:133)
at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:594)
at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528)
at org.jboss.ejb.client.DiscoveryEJBClientInterceptor.handleInvocationResult(DiscoveryEJBClientInterceptor.java:115)
at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:594)
at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528)
at org.jboss.ejb.client.NamingEJBClientInterceptor.handleInvocationResult(NamingEJBClientInterceptor.java:79)
at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:594)
at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528)
at org.jboss.ejb.client.TransactionInterceptor.handleInvocationResult(TransactionInterceptor.java:172)
at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:594)
at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528)
at org.jboss.ejb.client.EJBClientInvocationContext.awaitResponse(EJBClientInvocationContext.java:938)
at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:177)
at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:112)
at com.sun.proxy.$Proxy0.hello(Unknown Source)
at client.Client.call(Client.java:35)
... 1 more
{code}
I hit this issue with 15.0.0.Final, 14.0.0.Final but not with 12.0.0.Final.
If client try to invoke bean on the first server before it reboots, there is no problem after.
*Client side*
{code:java}
public static void main(String[] args)
throws Exception {
call("server-2", true);
call("server-1", true);
for (int i = 30; i > 0; i--) {
System.out.println(i);
Thread.sleep(1000);
}
call("server-1", false);
}
public static Properties getCtxProperties() {
Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY, "org.wildfly.naming.client.WildFlyInitialContextFactory");
return props;
}
public static void call(String container, boolean exceptedFailure) {
try {
InitialContext ctx = new InitialContext(getCtxProperties());
String lookupName = "ejb:/" + container + "/HelloBean!ejb.HelloBeanRemote";
HelloBeanRemote bean = (HelloBeanRemote) ctx.lookup(lookupName);
System.out.println(bean.hello());
} catch (Exception e) {
if (exceptedFailure) {
System.out.println("EXPECTED FAILURE");
e.printStackTrace();
} else {
throw new RuntimeException(e);
}
}
}
{code}
*Server side*
{code:java}
@Stateless
@Remote(HelloBeanRemote.class)
public class HelloBean {
private static Logger log = Logger.getLogger(HelloBean.class);
public String hello() throws RemoteException {
log.info("hello called with message");
return "Hello there";
}
}
{code}
> EJB client is unable to discover EJB after WildFly crash during previous call and reboot
> ----------------------------------------------------------------------------------------
>
> Key: WFLY-11664
> URL: https://issues.jboss.org/browse/WFLY-11664
> Project: WildFly
> Issue Type: Bug
> Components: EJB, Remoting
> Affects Versions: 14.0.0.Final, 15.0.0.Final
> Reporter: Ivan Straka
> Priority: Blocker
> Attachments: reproducer.zip
>
>
> Issue is not valid for 7.2.0.CD12 (upstream client: 12.0.0.Final) therefore we consider this as a blocker.
> Lets have two WildFly servers and same EJB on both. They have nothing to do with each other. And the client app that call beans on them.
> *Scenario*
> # Client invokes _hello_ method on the first server which crash during the call. Exception is consumed.
> # Client calls successfully _hello_ method on the second one.
> # Now, the first server is started again and then the client (same thread) try to call _hello_ on the first one. The call should be successful but the client is unable to discover bean.
> {code:java}Exception in thread "main" java.lang.RuntimeException: javax.ejb.NoSuchEJBException: EJBCLIENT000079: Unable to discover destination for request for EJB StatelessEJBLocator for "/server-1/HelloBean", view is interface ejb.HelloBeanRemote, affinity is None
> at client.Client.call(Client.java:41)
> at client.Client.main(Client.java:21)
> Caused by: javax.ejb.NoSuchEJBException: EJBCLIENT000079: Unable to discover destination for request for EJB StatelessEJBLocator for "/server-1/HelloBean", view is interface ejb.HelloBeanRemote, affinity is None
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:592)
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528)
> at org.jboss.ejb.protocol.remote.RemotingEJBClientInterceptor.handleInvocationResult(RemotingEJBClientInterceptor.java:56)
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:594)
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528)
> at org.jboss.ejb.client.TransactionPostDiscoveryInterceptor.handleInvocationResult(TransactionPostDiscoveryInterceptor.java:133)
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:594)
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528)
> at org.jboss.ejb.client.DiscoveryEJBClientInterceptor.handleInvocationResult(DiscoveryEJBClientInterceptor.java:115)
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:594)
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528)
> at org.jboss.ejb.client.NamingEJBClientInterceptor.handleInvocationResult(NamingEJBClientInterceptor.java:79)
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:594)
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528)
> at org.jboss.ejb.client.TransactionInterceptor.handleInvocationResult(TransactionInterceptor.java:172)
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:594)
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528)
> at org.jboss.ejb.client.EJBClientInvocationContext.awaitResponse(EJBClientInvocationContext.java:938)
> at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:177)
> at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:112)
> at com.sun.proxy.$Proxy0.hello(Unknown Source)
> at client.Client.call(Client.java:35)
> ... 1 more
> {code}
> I hit this issue with 15.0.0.Final, 14.0.0.Final but not with 12.0.0.Final.
> If client try to invoke _hello_ on the first server before it reboots (exception is consumed), there is no problem after.
> *Client side*
> {code:java}
> public static void main(String[] args)
> throws Exception {
> call("server-2", true);
> call("server-1", true);
> for (int i = 30; i > 0; i--) {
> System.out.println(i);
> Thread.sleep(1000);
> }
> call("server-1", false);
> }
> public static Properties getCtxProperties() {
> Properties props = new Properties();
> props.put(Context.INITIAL_CONTEXT_FACTORY, "org.wildfly.naming.client.WildFlyInitialContextFactory");
> return props;
> }
> public static void call(String container, boolean exceptedFailure) {
> try {
> InitialContext ctx = new InitialContext(getCtxProperties());
> String lookupName = "ejb:/" + container + "/HelloBean!ejb.HelloBeanRemote";
> HelloBeanRemote bean = (HelloBeanRemote) ctx.lookup(lookupName);
> System.out.println(bean.hello());
> } catch (Exception e) {
> if (exceptedFailure) {
> System.out.println("EXPECTED FAILURE");
> e.printStackTrace();
> } else {
> throw new RuntimeException(e);
> }
> }
> }
> {code}
> *Server side*
> {code:java}
> @Stateless
> @Remote(HelloBeanRemote.class)
> public class HelloBean {
> private static Logger log = Logger.getLogger(HelloBean.class);
> public String hello() throws RemoteException {
> log.info("hello called with message");
> return "Hello there";
> }
> }
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 11 months
[JBoss JIRA] (WFLY-11664) EJB client is unable to discover EJB after WildFly crash during previous call and reboot
by Ivan Straka (Jira)
[ https://issues.jboss.org/browse/WFLY-11664?page=com.atlassian.jira.plugin... ]
Ivan Straka updated WFLY-11664:
-------------------------------
Steps to Reproduce:
# Download & unzip reproducer (there are client and server side app, byteman script is in the client folder)
# unzip 2x WildFly distribution
# build server
# deploy server-side app as server-1.jar to the first server and run:
{code:bash}
export JAVA_OPTS="-Djboss.modules.system.pkgs=path-to-byteman.jar=script:path-to-HelloBeanCrash.btm"
./bin/standalone.sh -c standalone-full.xml
{code}
# deploy server-side app as server-2.jar to the second server and run:
{code:bash}
./bin/standalone.sh -c standalone-full.xml -Djboss.socket.binding.port-offset=100
{code}
# run client-side app side
{code:bash}
mvn package exec:exec
{code}
# during countdown (you have 30 seconds) run on the first:
{code:bash}
unset JAVA_OPTS
./bin/standalone.sh -c standalone-full.xml
{code}
was:
# Download & unzip reproducer
# unzip 2x WildFly distribution
# build server
# deploy server-side app as server-1.jar to the first server and run:
{code:bash}
export JAVA_OPTS="-Djboss.modules.system.pkgs=path-to-byteman.jar=script:path-to-HelloBeanCrash.btm"
./bin/standalone.sh -c standalone-full.xml
{code}
# deploy server-side app as server-2.jar to the second server and run:
{code:bash}
./bin/standalone.sh -c standalone-full.xml -Djboss.socket.binding.port-offset=100
{code}
# run client-side app side
{code:bash}
mvn package exec:exec
{code}
# during countdown (you have 30 seconds) run on the first:
{code:bash}
unset JAVA_OPTS
./bin/standalone.sh -c standalone-full.xml
{code}
> EJB client is unable to discover EJB after WildFly crash during previous call and reboot
> ----------------------------------------------------------------------------------------
>
> Key: WFLY-11664
> URL: https://issues.jboss.org/browse/WFLY-11664
> Project: WildFly
> Issue Type: Bug
> Components: EJB, Remoting
> Affects Versions: 14.0.0.Final, 15.0.0.Final
> Reporter: Ivan Straka
> Priority: Blocker
> Attachments: reproducer.zip
>
>
> Lets have two WildFly servers and same EJB on both. They have nothing to do with each other.
> *Scenario*
> # client invoke method on both beans and the first called server crash during invocation
> # after the server reboots, client is unable to discover EJB on the server
> {code:java}Exception in thread "main" java.lang.RuntimeException: javax.ejb.NoSuchEJBException: EJBCLIENT000079: Unable to discover destination for request for EJB StatelessEJBLocator for "/server-1/HelloBean", view is interface ejb.HelloBeanRemote, affinity is None
> at client.Client.call(Client.java:41)
> at client.Client.main(Client.java:21)
> Caused by: javax.ejb.NoSuchEJBException: EJBCLIENT000079: Unable to discover destination for request for EJB StatelessEJBLocator for "/server-1/HelloBean", view is interface ejb.HelloBeanRemote, affinity is None
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:592)
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528)
> at org.jboss.ejb.protocol.remote.RemotingEJBClientInterceptor.handleInvocationResult(RemotingEJBClientInterceptor.java:56)
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:594)
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528)
> at org.jboss.ejb.client.TransactionPostDiscoveryInterceptor.handleInvocationResult(TransactionPostDiscoveryInterceptor.java:133)
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:594)
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528)
> at org.jboss.ejb.client.DiscoveryEJBClientInterceptor.handleInvocationResult(DiscoveryEJBClientInterceptor.java:115)
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:594)
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528)
> at org.jboss.ejb.client.NamingEJBClientInterceptor.handleInvocationResult(NamingEJBClientInterceptor.java:79)
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:594)
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528)
> at org.jboss.ejb.client.TransactionInterceptor.handleInvocationResult(TransactionInterceptor.java:172)
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:594)
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528)
> at org.jboss.ejb.client.EJBClientInvocationContext.awaitResponse(EJBClientInvocationContext.java:938)
> at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:177)
> at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:112)
> at com.sun.proxy.$Proxy0.hello(Unknown Source)
> at client.Client.call(Client.java:35)
> ... 1 more
> {code}
> I hit this issue with 15.0.0.Final, 14.0.0.Final but not with 12.0.0.Final.
> If client try to invoke bean on the first server before it reboots, there is no problem after.
> *Client side*
> {code:java}
> public static void main(String[] args)
> throws Exception {
> call("server-2", true);
> call("server-1", true);
> for (int i = 30; i > 0; i--) {
> System.out.println(i);
> Thread.sleep(1000);
> }
> call("server-1", false);
> }
> public static Properties getCtxProperties() {
> Properties props = new Properties();
> props.put(Context.INITIAL_CONTEXT_FACTORY, "org.wildfly.naming.client.WildFlyInitialContextFactory");
> return props;
> }
> public static void call(String container, boolean exceptedFailure) {
> try {
> InitialContext ctx = new InitialContext(getCtxProperties());
> String lookupName = "ejb:/" + container + "/HelloBean!ejb.HelloBeanRemote";
> HelloBeanRemote bean = (HelloBeanRemote) ctx.lookup(lookupName);
> System.out.println(bean.hello());
> } catch (Exception e) {
> if (exceptedFailure) {
> System.out.println("EXPECTED FAILURE");
> e.printStackTrace();
> } else {
> throw new RuntimeException(e);
> }
> }
> }
> {code}
> *Server side*
> {code:java}
> @Stateless
> @Remote(HelloBeanRemote.class)
> public class HelloBean {
> private static Logger log = Logger.getLogger(HelloBean.class);
> public String hello() throws RemoteException {
> log.info("hello called with message");
> return "Hello there";
> }
> }
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 11 months
[JBoss JIRA] (WFLY-5427) If used journal object store (AMQ Artemis journal) directory is named HornetqObjectStore
by Ondra Chaloupka (Jira)
[ https://issues.jboss.org/browse/WFLY-5427?page=com.atlassian.jira.plugin.... ]
Ondra Chaloupka closed WFLY-5427.
---------------------------------
Resolution: Rejected
Sounds to break backward compatibility. Nobody had troubles with naming so far. It should be possibly needed as it is.
> If used journal object store (AMQ Artemis journal) directory is named HornetqObjectStore
> ----------------------------------------------------------------------------------------
>
> Key: WFLY-5427
> URL: https://issues.jboss.org/browse/WFLY-5427
> Project: WildFly
> Issue Type: Bug
> Components: Transactions
> Affects Versions: 10.0.0.CR2
> Reporter: Ondra Chaloupka
> Assignee: Ondra Chaloupka
> Priority: Minor
>
> Directory of transaction object store is named {{standalone/data/tx-object-store/HornetqObjectStore}}. The WFLY 10 does not use HornetQ object store but it uses ActiveMQ Artemis object store. That's same for the Transaction subsystem.
> The journal dirctory should be renamed to {{JournalObjectStore}} or something similar.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 11 months
[JBoss JIRA] (WFCORE-4294) The xxx.conf.bat files do not set java.awt.headless=true
by Marek Kopecký (Jira)
[ https://issues.jboss.org/browse/WFCORE-4294?page=com.atlassian.jira.plugi... ]
Marek Kopecký commented on WFCORE-4294:
---------------------------------------
I'm not able to reproduce original issue from WFLY-4270. Anyway, sh + bat + ps1 scripts should be unified, but java.awt.headless is used just in sh:
{noformat}
[mkopecky@dhcp-10-40-5-71 bin]$ grep -Ri java.awt.headless
domain.conf: JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS -Djava.awt.headless=true"
appclient.conf: JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS -Djava.awt.headless=true"
standalone.conf: JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS -Djava.awt.headless=true"
[mkopecky@dhcp-10-40-5-71 bin]$
{noformat}
> The xxx.conf.bat files do not set java.awt.headless=true
> --------------------------------------------------------
>
> Key: WFCORE-4294
> URL: https://issues.jboss.org/browse/WFCORE-4294
> Project: WildFly Core
> Issue Type: Bug
> Components: Scripts
> Affects Versions: 8.0.0.Beta3
> Reporter: Brian Stansberry
> Priority: Major
>
> The standalone.conf and domain.comf files include -Djava.awt.headless=true in the default JAVA_OPTS but its not there in the Windows scripts.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 11 months