Hi, I sent the following mail to the users mailing list with no response, and since I suspect this might be a TomEE bug, I figured I might try asking in the dev mailing list in the hope someone could point me in the right direction.
I work for a company with a JakartaEE 10 product. I'm responsible for investigating running on other application servers including TomEE. We have a multi-module ear which bundles quite a few WAR and EJB modules, which I'm trying to deploy on a tomEE 10.1.2 server. I'm currently running into a strange issue where it seems EJBs are being created too early, before they can be properly intialized. There are multiple Singletons from multiple modules that can trigger this failure, I think it just depends on what EJB module is processed first. The do not have much in common, except that they're part of an EJB module and they're @Singleton. One declares a no-interface view with @LocalBean, and two implement a business interface which is annotation with @Local. > at org.apache.openejb.cdi.CdiEjbBean.createEjb(CdiEjbBean.java:253) > at org.apache.openejb.cdi.CdiPlugin.getSessionBeanProxy(CdiPlugin.java:242) > at > org.apache.webbeans.container.BeanManagerImpl.getEjbOrJmsProxyReference(BeanManagerImpl.java:984) > at > org.apache.webbeans.container.BeanManagerImpl.getReference(BeanManagerImpl.java:815) > at > org.apache.webbeans.container.BeanManagerImpl.getInjectableReference(BeanManagerImpl.java:683) > at > org.apache.webbeans.inject.AbstractInjectable.inject(AbstractInjectable.java:100) > at > org.apache.webbeans.inject.InjectableField.doInjection(InjectableField.java:65) > at > org.apache.webbeans.portable.InjectionTargetImpl.injectFields(InjectionTargetImpl.java:234) > at > org.apache.webbeans.portable.InjectionTargetImpl.inject(InjectionTargetImpl.java:220) > at > org.apache.webbeans.portable.InjectionTargetImpl.inject(InjectionTargetImpl.java:210) > at > org.apache.webbeans.component.AbstractOwbBean.create(AbstractOwbBean.java:128) > at org.apache.webbeans.component.ManagedBean.create(ManagedBean.java:66) > at > org.apache.webbeans.context.creational.BeanInstanceBag.create(BeanInstanceBag.java:76) > at > org.apache.webbeans.context.AbstractContext.getInstance(AbstractContext.java:159) > at org.apache.webbeans.context.AbstractContext.get(AbstractContext.java:125) > at > org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:340) > at > org.apache.webbeans.event.NotificationManager.invokeObserverMethod(NotificationManager.java:1146) > at > org.apache.webbeans.event.NotificationManager.doFireSync(NotificationManager.java:1009) > at > org.apache.webbeans.event.NotificationManager.doFireEvent(NotificationManager.java:952) > at > org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.java:928) > at > org.apache.webbeans.container.BeanManagerImpl.fireEvent(BeanManagerImpl.java:505) > at > org.apache.openejb.cdi.CdiAppContextsService.applicationStarted(CdiAppContextsService.java:97) > at > org.apache.openejb.cdi.CdiAppContextsService.init(CdiAppContextsService.java:90) > at > org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:197) It looks like the required EJB initialization is being done at OpenEJBLifecycle.java:219, a point this code has yet to reach. I'm not familiar enough with the TomEE initialisation code to be able to investigate much more than this, can anyone give me some pointers of what to try to resolve these issues? Thanks a lot Robin
