[jboss-jira] [JBoss JIRA] (WFLY-8064) Dependecy Injection not working
Ron Sigal (Jira)
issues at jboss.org
Fri Feb 22 10:40:02 EST 2019
[ https://issues.jboss.org/browse/WFLY-8064?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
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)
More information about the jboss-jira
mailing list