Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-953

WEB-INF/beans.xml is ignored on jetty 6 (and GWT hosted mode)

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Cannot Reproduce Bug
    • Affects Version/s: 1.1.2.Final
    • Fix Version/s: 1.1.3.Final
    • Component/s: None
    • Labels:
      None

      Description

      Using @Inject in a class in a war file does not do nothing if there is only a WEB-INF/beans.xml and everything is deployed to Jetty 6.
      Similar for GWT hosted mode (which uses jetty 6 under the covers).

      Workaround: move it to META-INF/beans.xml

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            ge0ffrey Geoffrey De Smet added a comment -

            Replicated again today with weld 1.1.2.Final and seam 3.1.0.Beta3 on GWT-hosted model (= Jetty 6 with some tomcat stuff).
            The weld:excludes where ignored.

            Note that moving it to WEB-INF/classes/META-INF/beans.xml workaround is NOT compatible with JBoss AS 7 which requires it to be in WEB-INF/beans.xml ...

            Show
            ge0ffrey Geoffrey De Smet added a comment - Replicated again today with weld 1.1.2.Final and seam 3.1.0.Beta3 on GWT-hosted model (= Jetty 6 with some tomcat stuff). The weld:excludes where ignored. Note that moving it to WEB-INF/classes/META-INF/beans.xml workaround is NOT compatible with JBoss AS 7 which requires it to be in WEB-INF/beans.xml ...
            Hide
            ge0ffrey Geoffrey De Smet added a comment - - edited

            Guvnor-webapp in GWT hosted mode fails with this exception because the weld:excludes are ignored:

            ERROR 24-10 19:21:27,157 (Logger.java:error:1095) Login failed
            java.lang.RuntimeException: org.jboss.solder.beanManager.BeanManagerUnavailableException: Failed to locate BeanManager using any of these providers: org.jboss.solder.servlet.beanManager.ServletContextAttributeProvider(20), org.jboss.solder.beanManager.DefaultJndiBeanManagerProvider(11), org.jboss.solder.beanManager.ServletContainerJndiBeanManagerProvider(10)
            at org.jboss.seam.security.IdentityImpl.authenticate(IdentityImpl.java:241)
            at org.jboss.seam.security.IdentityImpl.login(IdentityImpl.java:160)
            at org.jboss.seam.security.IdentityImpl$Proxy$_$$_WeldClientProxy.login(IdentityImpl$Proxy$_$$_WeldClientProxy.java)
            at org.drools.guvnor.server.security.SecurityServiceImpl.tryAutoLoginAsGuest(SecurityServiceImpl.java:105)
            at org.drools.guvnor.server.security.SecurityServiceImpl.getCurrentUser(SecurityServiceImpl.java:97)
            at org.drools.guvnor.server.security.SecurityServiceImpl$Proxy$_$$_WeldClientProxy.getCurrentUser(SecurityServiceImpl$Proxy$_$$_WeldClientProxy.java)
            at org.drools.guvnor.server.SecurityServiceServlet.getCurrentUser(SecurityServiceServlet.java:70)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569)
            at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
            at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
            at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
            at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
            at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
            at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
            at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
            at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
            at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
            at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
            at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
            at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
            at org.mortbay.jetty.Server.handle(Server.java:324)
            at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
            at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
            at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
            at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
            at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
            at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
            at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
            Caused by: org.jboss.solder.beanManager.BeanManagerUnavailableException: Failed to locate BeanManager using any of these providers: org.jboss.solder.servlet.beanManager.ServletContextAttributeProvider(20), org.jboss.solder.beanManager.DefaultJndiBeanManagerProvider(11), org.jboss.solder.beanManager.ServletContainerJndiBeanManagerProvider(10)
            at org.jboss.solder.beanManager.BeanManagerLocator.getBeanManager(BeanManagerLocator.java:88)
            at org.jboss.seam.security.IdentityImpl.lookupAuthenticator(IdentityImpl.java:350)
            at org.jboss.seam.security.IdentityImpl.authenticate(IdentityImpl.java:214)
            ... 33 more
            

            Show
            ge0ffrey Geoffrey De Smet added a comment - - edited Guvnor-webapp in GWT hosted mode fails with this exception because the weld:excludes are ignored: ERROR 24-10 19:21:27,157 (Logger.java:error:1095) Login failed java.lang.RuntimeException: org.jboss.solder.beanManager.BeanManagerUnavailableException: Failed to locate BeanManager using any of these providers: org.jboss.solder.servlet.beanManager.ServletContextAttributeProvider(20), org.jboss.solder.beanManager.DefaultJndiBeanManagerProvider(11), org.jboss.solder.beanManager.ServletContainerJndiBeanManagerProvider(10) at org.jboss.seam.security.IdentityImpl.authenticate(IdentityImpl.java:241) at org.jboss.seam.security.IdentityImpl.login(IdentityImpl.java:160) at org.jboss.seam.security.IdentityImpl$Proxy$_$$_WeldClientProxy.login(IdentityImpl$Proxy$_$$_WeldClientProxy.java) at org.drools.guvnor.server.security.SecurityServiceImpl.tryAutoLoginAsGuest(SecurityServiceImpl.java:105) at org.drools.guvnor.server.security.SecurityServiceImpl.getCurrentUser(SecurityServiceImpl.java:97) at org.drools.guvnor.server.security.SecurityServiceImpl$Proxy$_$$_WeldClientProxy.getCurrentUser(SecurityServiceImpl$Proxy$_$$_WeldClientProxy.java) at org.drools.guvnor.server.SecurityServiceServlet.getCurrentUser(SecurityServiceServlet.java:70) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248) at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488) Caused by: org.jboss.solder.beanManager.BeanManagerUnavailableException: Failed to locate BeanManager using any of these providers: org.jboss.solder.servlet.beanManager.ServletContextAttributeProvider(20), org.jboss.solder.beanManager.DefaultJndiBeanManagerProvider(11), org.jboss.solder.beanManager.ServletContainerJndiBeanManagerProvider(10) at org.jboss.solder.beanManager.BeanManagerLocator.getBeanManager(BeanManagerLocator.java:88) at org.jboss.seam.security.IdentityImpl.lookupAuthenticator(IdentityImpl.java:350) at org.jboss.seam.security.IdentityImpl.authenticate(IdentityImpl.java:214) ... 33 more
            Hide
            ge0ffrey Geoffrey De Smet added a comment -

            Looks like that exception is probably due to SOLDER-220 (which apparently affects jetty 6 too) and weld is actually working fine.
            Alesj's ConfigTest affirms this theory.

            Show
            ge0ffrey Geoffrey De Smet added a comment - Looks like that exception is probably due to SOLDER-220 (which apparently affects jetty 6 too) and weld is actually working fine. Alesj's ConfigTest affirms this theory.

              People

              • Assignee:
                Unassigned
                Reporter:
                ge0ffrey Geoffrey De Smet
              • Votes:
                1 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Development