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

EAR with two CDI web archives will not deploy

XMLWordPrintable

      I already filed this issue in the Jersey JIRA, however, after some research by Michal Gajdos, the issue is closed as "invalid", since the problem would by caused by Weld/Glassfish Weld.

      So here the details:
      We are experiencing the following issue with Jersey 1.12 in combination with Weld 1.1.4 and Glassfish 3.1.2:
      When using an EAR with two WAR's in it, the last WAR doesn't get deployed. Both WAR's are CDI enabled and contains a REST service. When deploying both WAR's without the EAR, they deploy just fine.
      I will attach a test case.

      Depending on the VM property
      com.sun.jersey.server.impl.cdi.lookupExtensionInBeanManager we will get another Exception:

      com.sun.jersey.server.impl.cdi.lookupExtensionInBeanManager=false:

       
      java.lang.RuntimeException: javax.naming.NamingException: Lookup failed for 'com/sun/jersey/config/CDIExtension' in SerialContext[myEnv=java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming}
      [Root exception is javax.naming.NameNotFoundException: CDIExtension not found]	
      	at com.sun.jersey.server.impl.cdi.CDIExtension.getInitializedExtension(CDIExtension.java:177)
      	at com.sun.jersey.server.impl.cdi.CDIComponentProviderFactory.<init>(CDIComponentProviderFactory.java:92)
      	at com.sun.jersey.server.impl.cdi.CDIComponentProviderFactoryInitializer.initialize(CDIComponentProviderFactoryInitializer.java:75)
      	at com.sun.jersey.spi.container.servlet.WebComponent.configure(WebComponent.java:574)
      	at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.configure(ServletContainer.java:311)
      	at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:606)
      	at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:208)
      	at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:373)
      	at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:556)
      	at javax.servlet.GenericServlet.init(GenericServlet.java:244)
      	...
      

      com.sun.jersey.server.impl.cdi.lookupExtensionInBeanManager=true

      java.lang.NullPointerException
      	at com.sun.jersey.server.impl.cdi.CDIComponentProviderFactory.<init>(CDIComponentProviderFactory.java:94)
      	at com.sun.jersey.server.impl.cdi.CDIComponentProviderFactoryInitializer.initialize(CDIComponentProviderFactoryInitializer.java:75)
      	at com.sun.jersey.spi.container.servlet.WebComponent.configure(WebComponent.java:574)
      	at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.configure(ServletContainer.java:311)
      	at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:606)
      	at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:208)
      	at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:373)
      	at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:556)
      	at javax.servlet.GenericServlet.init(GenericServlet.java:244)
      	...
      

              ajustin@redhat.com Ales Justin
              icarus1111 Ramon Rockx (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: