Dependency Injection Fails when Deploying Application with Multiple EJB Modules on WLS 12.2.1 (Doc ID 2146096.1)

Last updated on JUNE 09, 2016

Applies to:

Oracle WebLogic Server - Version 12.2.1.0.0 and later
Information in this document applies to any platform.

Symptoms

An application including two EJB modules fails to deploy on WebLogic Server (WLS) 12.2.1 due to BeanCreationException. If the application includes only one module, the deployment works successfully.

The same issue does not occur on WLS 12.1.3.

Exception:

----------------------------------------------------------------------------------------

####<Jan 27, 2016 11:44:43 PM CET> <Info> <EJB> <ManagedServer> <[STANDBY] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <ac6daabe-96a5-4705-8360-24734f8d2d1c-0000001f> <1453934683812> <[severity-value: 64] [rid: 0] [partition-id: 0] [partition-name: DOMAIN] > <BEA-011061> <Stack trace associated with message Error starting the MessageDrivenBean ejb.MyMessageDrivenBean follows:

javax.enterprise.inject.InjectionException: Exception trying to inject java EE injection point into class: ejb.MyMessageDrivenBean.
at com.oracle.injection.integration.ModuleContainerIntegrationService.performJavaEEInjection(ModuleContainerIntegrationService.java:405)
at com.oracle.injection.provider.weld.WeldInjectionServicesAdapter.aroundInject(WeldInjectionServicesAdapter.java:49)
at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:46)
......
Caused By: com.bea.core.repackaged.springframework.beans.factory.BeanCreationException: Dependency injection failure: can't inject the value 'ejb.MySessionBean_s2rups_Impl@7ca691ba' into the field 'private ejb.MySessionLocal ejb.MyMessageDrivenBean.mySessionBean'; nested exception is java.lang.IllegalArgumentException: Can not set ejb.MySessionLocal field ejb.MyMessageDrivenBean.mySessionBean to com.sun.proxy.$Proxy136
at com.oracle.pitchfork.inject.FieldInjection.apply(FieldInjection.java:45)
......
Caused By: java.lang.IllegalArgumentException: Can not set ejb.MySessionLocal field ejb.MyMessageDrivenBean.mySessionBean to com.sun.proxy.$Proxy136
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167)
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171)
at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:81)
at java.lang.reflect.Field.set(Field.java:764)
at com.oracle.pitchfork.inject.FieldInjection.apply(FieldInjection.java:43)
at com.oracle.pitchfork.inject.Jsr250Metadata.performInjection(Jsr250Metadata.java:228)
at com.oracle.pitchfork.inject.Jsr250Metadata.applyInjections(Jsr250Metadata.java:215)
at com.oracle.pitchfork.inject.Jsr250Metadata.inject(Jsr250Metadata.java:197)
at com.oracle.injection.integration.ModuleContainerIntegrationService.performJavaEEInjection(ModuleContainerIntegrationService.java:398)
at com.oracle.injection.provider.weld.WeldInjectionServicesAdapter.aroundInject(WeldInjectionServicesAdapter.java:49)
at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:46)
at org.jboss.weld.injection.producer.ResourceInjector.inject(ResourceInjector.java:72)
at org.jboss.weld.injection.producer.BasicInjectionTarget.inject(BasicInjectionTarget.java:121)
at com.oracle.injection.provider.weld.WeldBeanManager.injectOnExternalInstance(WeldBeanManager.java:165)
at weblogic.ejb.container.injection.InjectionBasedEjbComponentCreator.getBean(InjectionBasedEjbComponentCreator.java:78)
at weblogic.ejb.container.manager.BaseEJBManager.createNewBeanInstance(BaseEJBManager.java:207)
at weblogic.ejb.container.manager.BaseEJBManager.allocateBean(BaseEJBManager.java:233)
at weblogic.ejb.container.manager.MessageDrivenManager.createBean(MessageDrivenManager.java:237)
at weblogic.ejb.container.pool.MessageDrivenPool.createBean(MessageDrivenPool.java:135)
at weblogic.ejb.container.pool.Pool.createInitialBeans(Pool.java:129)
......

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms