smallufo wrote:
> In Resin 4.0.4
>
> I follow this step :
> http://www.caucho.com/resin/doc/resin-ejb.xtp#Hello, World 
> <http://www.caucho.com/resin/doc/resin-ejb.xtp#Hello,%20World>

Do you have a META-INF/ejb-jar.xml? We're currently requiring that file 
as a marker for classpath scanning (although it appears that we should 
always scan for those classes.)

- Scott
>
> public interface PersonDao {
>  //... methods...
> }
>
> @Stateless
> public class PersonServiceImpl implements PersonService , Serializable {
>   @Inject
>   private PersonDao personDao;
> ...
> }
>
> The dao can be injected to Servlet WITHOUT a @Stateless annotation , 
> but when add @Stateless , it throws :
>
> com.caucho.config.ConfigException: foo.HelloServlet.personService: 
> javax.enterprise.inject.UnsatisfiedResolutionException: Can't find a 
> bean for 'interface foo.PersonService' because no beans implementing 
> that class have been registered with the injection manager 
> InjectManager[web-app:http://test.smallufo.com/testapp-1].
>       at 
> com.caucho.config.ConfigException.create(ConfigException.java:102)
>       at 
> com.caucho.config.ConfigException.create(ConfigException.java:125)
>       at 
> com.caucho.config.inject.InjectionTargetImpl$FieldInjectProgram.inject(InjectionTargetImpl.java:809)
>       at 
> com.caucho.config.inject.InjectionTargetImpl.inject(InjectionTargetImpl.java:266)
>       at 
> com.caucho.server.dispatch.ServletConfigImpl.createServletImpl(ServletConfigImpl.java:1260)
>       at 
> com.caucho.server.dispatch.ServletConfigImpl.createServlet(ServletConfigImpl.java:1142)
>       at 
> com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:98)
>       at 
> com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:183)
>       at 
> com.caucho.server.webapp.AccessLogFilterChain.doFilter(AccessLogFilterChain.java:103)
>       at 
> com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:286)
>       at 
> com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:780)
>       at 
> com.caucho.server.connection.TcpConnection.dispatchRequest(TcpConnection.java:600)
>       at 
> com.caucho.server.connection.TcpConnection.handleRequestsImpl(TcpConnection.java:566)
>       at 
> com.caucho.server.connection.TcpConnection.handleRequests(TcpConnection.java:519)
>       at 
> com.caucho.server.connection.TcpConnection$AcceptTask.doTask(TcpConnection.java:1100)
>       at 
> com.caucho.server.connection.TcpConnection$ConnectionReadTask.runThread(TcpConnection.java:1037)
>       at 
> com.caucho.server.connection.TcpConnection$AcceptTask.run(TcpConnection.java:1068)
>       at 
> com.caucho.util.ThreadPool$PoolThread.runTasks(ThreadPool.java:901)
>       at com.caucho.util.ThreadPool$PoolThread.run(ThreadPool.java:866)
> Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: 
> Can't find a bean for 'interface foo.PersonService' because no beans 
> implementing that class have been registered with the injection 
> manager InjectManager[web-app:http://test.smallufo.com/testapp-1].
>       at 
> com.caucho.config.inject.InjectManager.unsatisfiedException(InjectManager.java:1389)
>       at 
> com.caucho.config.inject.InjectManager.resolveByInjectionPoint(InjectManager.java:1545)
>       at 
> com.caucho.config.inject.InjectManager.resolveByInjectionPoint(InjectManager.java:1523)
>       at 
> com.caucho.config.inject.InjectManager.getInjectableReference(InjectManager.java:1476)
>       at 
> com.caucho.config.inject.InjectionTargetImpl$FieldInjectProgram.inject(InjectionTargetImpl.java:805)
>       ... 16 more
> Http[2] HTTP/1.1 500 Internal Server Error
> ------------------------------------------------------------------------
>
> _______________________________________________
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest
>   



_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to