Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CDI will not create an EJBDescriptor for archive containing bean-discovery-mode=none. #26609

Closed
benjamin-confino opened this issue Oct 16, 2023 · 0 comments · Fixed by #26611
Closed
Assignees
Labels
release bug This bug is present in a released version of Open Liberty release:230011

Comments

@benjamin-confino
Copy link
Contributor

Describe the bug
CDI will not create an EJBDescriptor for archive containing bean-discovery-mode=none. However MDBs are not CDI beans, this means that CDI will fail to create a managed object for MDBs in an archive with bean-discovery-mode=none even though it should.

Stack trace:

java.lang.NullPointerException: Cannot invoke "org.jboss.weld.ejb.spi.EjbDescriptor.isMessageDriven()" because "ejbDescriptor" is null at com.ibm.ejs.container.util.ExceptionUtil.EJBException(ExceptionUtil.java:401) at com.ibm.ejs.container.util.ExceptionUtil.EJBException(ExceptionUtil.java:287) at com.ibm.ejs.container.BusinessExceptionMappingStrategy.mapException(BusinessExceptionMappingStrategy.java:349) at com.ibm.ejs.container.BusinessExceptionMappingStrategy.setUncheckedException(BusinessExceptionMappingStrategy.java:521) at com.ibm.ejs.container.EJSDeployedSupport.setUncheckedException(EJSDeployedSupport.java:421) at com.ibm.ejs.container.EJSContainer.preinvokeHandleException(EJSContainer.java:2654) at com.ibm.ejs.container.EJSContainer.EjbPreInvoke(EJSContainer.java:2435) at com.ibm.ws.cdi.ejb.apps.ejbdiscovery.none.EJSLocal0SLUndiscoveredStatelessBean_8678189b.test(EJSLocal0SLUndiscoveredStatelessBean_8678189b.java) at com.ibm.ws.cdi.ejb.apps.ejbdiscovery.servlet.DiscoveryServlet.testCallNotDiscoveredBean(DiscoveryServlet.java:111) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at componenttest.app.FATServlet.doGet(FATServlet.java:73) at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:527) at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:614) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1260) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:748) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:445) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1361) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1077) at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:77) at com.ibm.ws.webcontainer40.servlet.CacheServletWrapper40.handleRequest(CacheServletWrapper40.java:87) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:969) at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.run(DynamicVirtualHost.java:293) at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink$TaskWrapper.run(HttpDispatcherLink.java:1246) at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.wrapHandlerAndExecute(HttpDispatcherLink.java:468) at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.ready(HttpDispatcherLink.java:427) at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:569) at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleNewRequest(HttpInboundLink.java:503) at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.processRequest(HttpInboundLink.java:363) at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.ready(HttpInboundLink.java:330) at com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:169) at com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:77) at com.ibm.ws.tcpchannel.internal.WorkQueueManager.requestComplete(WorkQueueManager.java:516) at com.ibm.ws.tcpchannel.internal.WorkQueueManager.attemptIO(WorkQueueManager.java:586) at com.ibm.ws.tcpchannel.internal.WorkQueueManager.workerRun(WorkQueueManager.java:970) at com.ibm.ws.tcpchannel.internal.WorkQueueManager$Worker.run(WorkQueueManager.java:1059) at com.ibm.ws.threading.internal.ExecutorServiceImpl$RunnableWrapper.run(ExecutorServiceImpl.java:247) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:858) Caused by: java.lang.NullPointerException: Cannot invoke "org.jboss.weld.ejb.spi.EjbDescriptor.isMessageDriven()" because "ejbDescriptor" is null at com.ibm.ws.cdi.impl.managedobject.CDIEJBManagedObjectFactoryImpl.createContext(CDIEJBManagedObjectFactoryImpl.java:84) at com.ibm.ejs.container.ManagedBeanOBase.createInterceptorsAndInstance(ManagedBeanOBase.java:200) at com.ibm.ejs.container.StatelessBeanO.initialize(StatelessBeanO.java:157) at com.ibm.ejs.container.BeanOFactory.create(BeanOFactory.java:105) at com.ibm.ejs.container.EJSHome.createBeanO(EJSHome.java:932) at com.ibm.ejs.container.EJSHome.createBeanO(EJSHome.java:1029) at com.ibm.ejs.container.activator.UncachedActivationStrategy.atActivate(UncachedActivationStrategy.java:64) at com.ibm.ejs.container.activator.Activator.preInvokeActivateBean(Activator.java:265) at com.ibm.ejs.container.EJSContainer.preInvokeActivate(EJSContainer.java:3003) at com.ibm.ejs.container.EJSContainer.EjbPreInvoke(EJSContainer.java:2392)

Steps to Reproduce
Create an MDB inside an archive with bean-discovery-mode=none

Expected behavior
The MDB should run despite bean-discovery-mode=none

Diagnostic information:

  • OpenLiberty Version: 18.0.0.2+
  • Affected feature(s) [e.g. cdi-1.2+]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release bug This bug is present in a released version of Open Liberty release:230011
Projects
None yet
3 participants