WELD-000049 UNABLE TO INVOKE [METHOD] @POSTCONSTRUCT (Doc ID 1948072.1)

Last updated on JUNE 09, 2016

Applies to:

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

Symptoms

WebLogic Server 12.1.2.0.0
Used CDI implementation: Weld v12.1.2.0.0

JSF application deployment is failing due to EJB module throwing java.lang.IllegalArgumentException when calling timer method (com.swisslog.wm6.javaee.timer.TimerController.postConstruct()).

EJB INJECTION VIA BASE CLASS DOES NOT WORK. ILLEGALARGUMENTEXCEPTION IS THROWN.

org.jboss.weld.exceptions.WeldException: WELD-000049 Unable to invoke [method] @PostConstruct public
com.swisslog.wm6.javaee.timer.TimerController.postConstruct() on com.swisslog.wm6.javaee.timer.TimerController@8da4b9
at
org.jboss.weld.bean.AbstractClassBean.defaultPostConstruct(AbstractClassBean.java:404)
at
org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.postConstruct(ManagedBean.java:174)
at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:294)
Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

Caused by: javax.ejb.NoSuchEJBException: Singleton TimerEJB(Application: javaee-timer-1.0, EJBComponent: javaee-timer-1.0.war) failed to initialize.
at
weblogic.ejb.container.manager.SingletonSessionManager$SingletonLifecycleManager.doActualInit(SingletonSessionManager.java:815)
at
weblogic.ejb.container.manager.SingletonSessionManager$SingletonLifecycleManager.initInternal(SingletonSessionManager.java:758)

Caused by: java.lang.IllegalArgumentException: [EJB:011140]The argument com.swisslog.wm6.javaee.timer.AbstractTimer is not a valid local client view
for the EJB SimpleTimer(Application: javaee-timer-1.0, EJBComponent:
javaee-timer-1.0.war).
at
weblogic.ejb.container.internal.SessionBeanReferenceImpl.getBusinessObject(SessionBeanReferenceImpl.java:25)
at
com.oracle.injection.integration.EjbDescriptorAdapter$EjbInstanceManagerAdapter.getEjbInstance(EjbDescriptorAdapter.java:236)

 

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