Mantis Bugtracker

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0005915 [Resin] minor always 06-04-15 09:56 07-17-17 14:30
Reporter alex View Status public  
Assigned To ferg
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 4.0.54 Product Version 4.0.38
  Product Build
Summary 0005915: CDI: Can't find a bean. Sporadic exception
Description Error from the Resin infrastructure. Notice that the bean it is complaining about is there as this code works and it actually may succeed for one request and fail for another within the same session.

ERROR [gateway.api.GatewayServlet] : API GatewayResponseError
com.cellectivity.gateway.api.GatewayResponseError: GatewayError: 500 com.cellectivity.gateway.api.betting.BettingServiceImpl.m_vaultService: Can't find a be
an for 'interface com.cellectivity.gateway.api.vault.VaultService' because no beans match the type and qualifiers [@Default()].
    ManagedBeanImpl[VaultServiceDao, {@Default(), @Any()}, @ApplicationScoped]
        at com.cellectivity.gateway.api.GatewayServlet.processException(
        at com.cellectivity.gateway.api.GatewayServlet.doPost(
        at javax.servlet.http.HttpServlet.service(
        at javax.servlet.http.HttpServlet.service(
        at com.caucho.server.dispatch.ServletFilterChain.doFilter(
        at com.cellectivity.gateway.api.TokenAuthenticationFilter.doFilter(
        at com.caucho.server.dispatch.FilterFilterChain.doFilter(
        at com.cellectivity.gateway.api.log.LogActionFilter.doFilter(
        at com.caucho.server.dispatch.FilterFilterChain.doFilter(
        at com.caucho.server.httpcache.ProxyCacheFilterChain.doFilter(
        at com.caucho.server.webapp.WebAppFilterChain.doFilter(
        at com.caucho.server.webapp.AccessLogFilterChain.doFilter(
        at com.caucho.server.dispatch.ServletInvocation.service(
        at com.caucho.server.hmux.HmuxRequest.handleInvocation(
        at com.caucho.server.hmux.HmuxRequest.handleRequestImpl(
        at com.caucho.server.hmux.HmuxRequest.handleRequest(
        at com.caucho.env.thread2.ResinThread2.runTasks(
Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: com.cellectivity.gateway.api.betting.BettingServiceImpl.m_vaultService: Can't find a bean for 'interface com.cellectivity.gateway.api.vault.VaultService' because no beans match the type and qualifiers [@Default()].
    ManagedBeanImpl[VaultServiceDao, {@Default(), @Any()}, @ApplicationScoped]
        at com.caucho.config.inject.InjectionTargetBuilder$FieldInjectProgram.bind(
        at com.caucho.config.inject.CandiProducer.bind(
        at com.caucho.config.inject.InjectionTargetBuilder.bind(
        at com.caucho.config.inject.InjectionTargetBuilder.inject(
        at com.caucho.config.xml.XmlInjectionTarget.inject(
        at com.caucho.config.inject.ManagedBeanImpl.create(
        at com.caucho.config.scope.AbstractScopeContext.create(
        at com.caucho.config.scope.AbstractScopeContext.get(
        at com.caucho.config.inject.InjectManager$NormalInstanceReferenceFactory.create(
        at com.caucho.config.inject.InjectManager$ReferenceFactory.create(
        at com.cellectivity.gateway.api.betting.BettingServiceImpl__ResinScopeProxy.getBalance(Unknown Source)
        at com.cellectivity.gateway.api.betting.BettingModule.postGetBalance(
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
        at java.lang.reflect.Method.invoke(
        at com.cellectivity.gateway.api.GatewayServlet.doPost(
        ... 26 more
Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: Can't find a bean for 'interface com.cellectivity.gateway.api.vault.VaultService' because no beans match the type and qualifiers [@Default()].
    ManagedBeanImpl[VaultServiceDao, {@Default(), @Any()}, @ApplicationScoped]
        at com.caucho.config.inject.InjectManager.unsatisfiedException(
        at com.caucho.config.inject.InjectManager.resolveByInjectionPoint(
        at com.caucho.config.inject.InjectManager.getReferenceFactory(
        at com.caucho.config.inject.InjectManager.getReferenceFactory(
        at com.caucho.config.inject.InjectionTargetBuilder$FieldInjectProgram.bind(
        ... 42 more
Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
06-08-15 11:11
edited on: 06-08-15 11:30

Jose Fernandez:

Well I have seen cases on beans not found just after a new release. Which is annoying but bearable.

But in this case the web-app was deployed for days. And still having problems. This is a semi-rest
API implementation of our application, which means lots of small requests from the client. It seems that this issue occurs during high throughput. The other difference is that you had multiple injection points for the same bean:
 SA <-- A
 SB <-- B <-- A

So here servlets SA, and SB injected their corresponding services (A, B). But B also requires service A. Notice that all the exceptions seem to come from this injection of A on B, it seems to get confused.

SA, and SA are servlets declared on the web.xml in the normal fashion.

The injections are simple @Inject no qualifiers or annotations as A and B are marked as @ApplicationScope and declared on the resin-web.xml.

We only use qualifiers for data-sources which are injected into A but those I think they are fine.


- Issue History
Date Modified Username Field Change
06-04-15 09:56 alex New Issue
06-08-15 11:11 alex Note Added: 0006639
06-08-15 11:30 alex Note Edited: 0006639
07-17-17 14:30 ferg Assigned To  => ferg
07-17-17 14:30 ferg Status new => closed
07-17-17 14:30 ferg Resolution open => fixed
07-17-17 14:30 ferg Fixed in Version  => 4.0.54

Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
30 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker