[JBoss JIRA] (WFLY-8209) JAX-RS Executes resource method even when input validation fails
by Ron Sigal (Jira)
[ https://issues.jboss.org/browse/WFLY-8209?page=com.atlassian.jira.plugin.... ]
Ron Sigal resolved WFLY-8209.
-----------------------------
Resolution: Cannot Reproduce
Hi [~jhovell],
If you are still seeing this behavior, please re-open this issue with a reproducer.
Thanks,
Ron
> JAX-RS Executes resource method even when input validation fails
> ----------------------------------------------------------------
>
> Key: WFLY-8209
> URL: https://issues.jboss.org/browse/WFLY-8209
> Project: WildFly
> Issue Type: Bug
> Components: REST
> Affects Versions: 10.1.0.Final
> Reporter: John Hovell
> Assignee: Alessio Soldano
> Priority: Major
>
> I have created an example which is actually a fork of the Wildfly Swarm repo. I could re-create the example:
> https://github.com/jhovell/wildfly-swarm-examples/tree/jaxrs-validation (project in subfolder jaxrs/jaxrs-cdi). The tip of this branch shows it is working in WF 10.0. The commit earlier shows it broken in WF 10.1.
> If a JAX-RS resource is defined as an interface with an implementation that doesn't have a single arg constructor, in WF 10.0 you had to work around the issue in a roundabout way by extending the Application class, using the BeanManager to get the actual bean (not the proxy) and register it with JAX-RS. This seemed to be the only solution as even if you made a bean with a @Produces method on a managed bean, Resteasy still wouldn't know how to construct the bean. You get a fairly generic error that Resteasy can't find a constructor for the implementation (not the interface). See error below.
> Despite being roundabout, this worked. In WF 10.1 the behavior is very surprising in that it executes the resource method even though input validation failed, and then it returns a 400 with a validation message (as expected) but with the nasty side effect that the resource method was executed (and it may have crashed due to null pointers, in which case the user gets 500 instead of 400).
> [pre]
> 2017-02-22 19:26:08,213 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 5) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./: java.lang.RuntimeException: RESTEASY003190: Could not find constructor for class: org.wildfly.swarm.examples.jaxrs.cdi.api.EmployeeController
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:85)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> at org.jboss.threads.JBossThread.run(JBossThread.java:320)
> Caused by: java.lang.RuntimeException: RESTEASY003190: Could not find constructor for class: org.wildfly.swarm.examples.jaxrs.cdi.api.EmployeeController
> at org.jboss.resteasy.spi.metadata.ResourceBuilder.constructor(ResourceBuilder.java:692)
> at org.jboss.resteasy.plugins.server.resourcefactory.POJOResourceFactory.registered(POJOResourceFactory.java:42)
> at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:208)
> at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:194)
> at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:180)
> [pre]
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 2 months
[JBoss JIRA] (WFLY-7371) JAXRS endpoint - CDI injection to constructor doesn't work
by Ron Sigal (Jira)
[ https://issues.jboss.org/browse/WFLY-7371?page=com.atlassian.jira.plugin.... ]
Ron Sigal resolved WFLY-7371.
-----------------------------
Resolution: Rejected
As per the analysis in upstream RESTEASY-1538, this issue is properly considered an enhancement rather than a bug. If it a desirable enhancement, it can be re-opened as such.
> JAXRS endpoint - CDI injection to constructor doesn't work
> ----------------------------------------------------------
>
> Key: WFLY-7371
> URL: https://issues.jboss.org/browse/WFLY-7371
> Project: WildFly
> Issue Type: Bug
> Components: CDI / Weld, REST
> Affects Versions: 10.1.0.Final
> Reporter: Tomas Remes
> Assignee: Ron Sigal
> Priority: Major
>
> Deploying app with following JAXRS endpoint
> {code}
> @Path("/test")
> public class MyTimeResource {
> private final LocalDateTime dateTime;
> @Inject
> public MyTimeResource(LocalDateTime dateTime){
> this.dateTime = dateTime;
> };
> }
> {code}
> is failing with following stack trace:
> {noformat}
> Caused by: java.lang.RuntimeException: RESTEASY003190: Could not find constructor for class: org.example.microprofile.MyTimeResource
> at org.jboss.resteasy.spi.metadata.ResourceBuilder.constructor(ResourceBuilder.java:692)
> at org.jboss.resteasy.plugins.server.resourcefactory.POJOResourceFactory.registered(POJOResourceFactory.java:42)
> at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:208)
> at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:194)
> at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:180)
> at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:157)
> at org.jboss.resteasy.core.ResourceMethodRegistry.addPerRequestResource(ResourceMethodRegistry.java:76)
> at org.jboss.resteasy.spi.ResteasyDeployment.registration(ResteasyDeployment.java:409)
> at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:250)
> at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:113)
> at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpServletDispatcher.java:36)
> at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:117)
> at org.wildfly.extension.undertow.security.RunAsLifecycleInterceptor.init(RunAsLifecycleInterceptor.java:78)
> at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:103)
> at io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:250)
> at io.undertow.servlet.core.ManagedServlet.createServlet(ManagedServlet.java:133)
> at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:546)
> at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:517)
> at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
> at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
> at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
> at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
> at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
> at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
> at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
> at io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:559)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:101)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)
> ... 6 more
> {noformat}
> Note that app contains beans.xml so the JAXRS resource should be really managed by CDI.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 2 months
[JBoss JIRA] (WFLY-8064) Dependecy Injection not working
by Ron Sigal (Jira)
[ https://issues.jboss.org/browse/WFLY-8064?page=com.atlassian.jira.plugin.... ]
Ron Sigal resolved WFLY-8064.
-----------------------------
Resolution: Out of Date
Hi Pradeep,
I'm going to close this issue. If you still have this problem, you can re-open it.
-Ron
> Dependecy Injection not working
> -------------------------------
>
> Key: WFLY-8064
> URL: https://issues.jboss.org/browse/WFLY-8064
> Project: WildFly
> Issue Type: Release
> Components: CDI / Weld, REST
> Affects Versions: 10.0.0.Final
> Environment: Windows 2012 R2
> Reporter: Pradeep Ganapathy
> Assignee: Alessio Soldano
> Priority: Major
>
> All injected parameters after post construct are null. Jboss cant able to detect inject paramaters. Both dao and testDescription parameters are null. As a result null pointer exception
> RestEasy versions(All) ----> 3.0.14.Final.
> ApplicationScoped
> public class TestImpl implements ITest
> {
>
> @Inject
> private ITestDAO dao;
> public TestImpl setTestDAO(ITestDAO dao)
> {
> this.dao = dao;
> return this;
> }
> @Inject
> private TestDescription testDescription;
> public TestImpl setTestDescription(TestDescription testDescription)
> {
> this.testDescription = testDescription;
> return this;
> }
> }
> Error Logs:
> 2017-02-09 13:11:22,256 ERROR [io.undertow.request] (default task-128) UT005023: Exception handling request to( My EndPoint): org.jboss.resteasy.spi.UnhandledException: java.lang.NullPointerException
> Caused by: java.lang.NullPointerException
> at ServiceRegistryImpl.lookup(ServiceRegistryImpl.java:142)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:139)
> at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:295)
> at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:249)
> at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:236)
> at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:395)
> ... 35 more
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 2 months
[JBoss JIRA] (WFLY-11766) Review module dependencies for the extensions included in Galleon cloud-profile
by Yeray Borges (Jira)
Yeray Borges created WFLY-11766:
-----------------------------------
Summary: Review module dependencies for the extensions included in Galleon cloud-profile
Key: WFLY-11766
URL: https://issues.jboss.org/browse/WFLY-11766
Project: WildFly
Issue Type: Task
Affects Versions: 16.0.0.Beta1
Reporter: Yeray Borges
Assignee: Yeray Borges
The cloud-profile provisioned by Galleon includes the following extensions:
{noformat}
<extensions>
<extension module="org.jboss.as.clustering.infinispan"/>
<extension module="org.jboss.as.connector"/>
<extension module="org.jboss.as.deployment-scanner"/>
<extension module="org.jboss.as.ee"/>
<extension module="org.jboss.as.jaxrs"/>
<extension module="org.jboss.as.jpa"/>
<extension module="org.jboss.as.naming"/>
<extension module="org.jboss.as.transactions"/>
<extension module="org.jboss.as.weld"/>
<extension module="org.wildfly.extension.bean-validation"/>
<extension module="org.wildfly.extension.elytron"/>
<extension module="org.wildfly.extension.io"/>
<extension module="org.wildfly.extension.messaging-activemq"/>
<extension module="org.wildfly.extension.microprofile.config-smallrye"/>
<extension module="org.wildfly.extension.microprofile.health-smallrye"/>
<extension module="org.wildfly.extension.microprofile.metrics-smallrye"/>
<extension module="org.wildfly.extension.microprofile.opentracing-smallrye"/>
<extension module="org.wildfly.extension.undertow"/>
</extensions>
{noformat}
This issue is an umbrella for all the tasks related to the analysis, removal of unused module dependencies and identification of optional dependencies of these extensions.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 2 months
[JBoss JIRA] (DROOLS-2657) [DMN Designer] Select Box for Decision Table input columns
by Liz Clayton (Jira)
[ https://issues.jboss.org/browse/DROOLS-2657?page=com.atlassian.jira.plugi... ]
Liz Clayton commented on DROOLS-2657:
-------------------------------------
Yes, thanks [~manstis]!
> [DMN Designer] Select Box for Decision Table input columns
> ----------------------------------------------------------
>
> Key: DROOLS-2657
> URL: https://issues.jboss.org/browse/DROOLS-2657
> Project: Drools
> Issue Type: Enhancement
> Components: DMN Editor
> Affects Versions: 7.8.0.Final
> Reporter: Jozef Marko
> Assignee: Michael Anstis
> Priority: Minor
> Labels: drools-tools
>
> Currently the decision table input columns can be named with any name. However their names should correspond to InputData elements in the DRG, thus we should provide select box for each decision table input column, where user would select corresponding InputData element for the given decision table input column.
> h3. Acceptance test
> # Sorting in select box
> # Rename InputData, change reflected in select box
> # Same InputData connected to multiple nodes, appropriate select boxes contain the value
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 2 months