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

java.util.NoSuchElementException from deployment.getBeanDeploymentArchives().iterator().next()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Critical Critical
    • None
    • 2.2.5.Final
    • None

      I'm working on the Jetty side, with a goal of getting websocket (server and client) integrated properly for CDI/weld.

      When setting up Weld for all contexts as a server component on Jetty, there is a NoSuchElementException thrown from the
      WeldServletLifecycle.java (line 137)

      deployment.getBeanDeploymentArchives().iterator().next()

      Some other notes:
      Starting with Jetty 9.2.4, the Decorator will be exposed, by default, for all WebAppClassloaders, no need for that extra XML recommendation seen in other jiras.

      We're also working on a server side "cdi" module (that can be enabled easily) which will also expose a META-INF/services/org.jboss.weld.environment.Container with the org.jboss.weld.environment.jetty.JettyContainer value (available on server classloader when cdi module is enabled)

      Anyway, here's the default log level and stacktrace seen.
      What does this mean?

      2014-10-09 14:41:46.307:WARN:oeja.AnnotationConfiguration:main: ServletContainerInitializers: detected. Class hierarchy: empty
      Oct 09, 2014 2:41:46 PM org.jboss.weld.environment.servlet.EnhancedListener onStartup
      INFO: WELD-ENV-001008: Initialize Weld using ServletContainerInitializer
      Oct 09, 2014 2:41:46 PM org.jboss.weld.bootstrap.WeldStartup <clinit>
      INFO: WELD-000900: 2.2.5 (Final)
      Oct 09, 2014 2:41:46 PM org.jboss.weld.bootstrap.WeldStartup startContainer
      INFO: WELD-000101: Transactional services not available. Injection of @Inject UserTransaction not available. Transactional observers will be invoked synchronously.
      Oct 09, 2014 2:41:46 PM org.jboss.weld.interceptor.util.InterceptionTypeRegistry <clinit>
      WARN: WELD-001700: Interceptor annotation class javax.ejb.PostActivate not found, interception based on it is not enabled
      Oct 09, 2014 2:41:46 PM org.jboss.weld.interceptor.util.InterceptionTypeRegistry <clinit>
      WARN: WELD-001700: Interceptor annotation class javax.ejb.PrePassivate not found, interception based on it is not enabled
      2014-10-09 14:41:46.572:WARN:oeja.ServletContainerInitializersStarter:main:
      java.util.NoSuchElementException
      at java.util.HashMap$HashIterator.nextEntry(HashMap.java:929)
      at java.util.HashMap$KeyIterator.next(HashMap.java:960)
      at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1067)
      at org.jboss.weld.environment.servlet.WeldServletLifecycle.initialize(WeldServletLifecycle.java:137)
      at org.jboss.weld.environment.servlet.EnhancedListener.onStartup(EnhancedListener.java:60)
      at org.eclipse.jetty.plus.annotation.ContainerInitializer.callStartup(ContainerInitializer.java:140)
      at org.eclipse.jetty.annotations.ServletContainerInitializersStarter.doStart(ServletContainerInitializersStarter.java:65)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:274)
      at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1342)
      at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1335)
      at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)

              mkouba@redhat.com Martin Kouba
              joakim.erdfelt@gmail.com Joakim Erdfelt (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: