IBM Support

PI90782: APPLICATION STARTUP FAILS DUE TO NULLPOINTEREXCEPTION DURING BEAN VALIDATION

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Application startup fails due to NullPointerException during
    bean validation
    
    In the logs we see:
    module failed initialization with exception:
    javax.ejb.NoSuchEJBException: An error occurred during
    initialization of singleton session bean
    
    The exception message was: java.lang.NullPointerException;
    nested exception is: java.lang.NullPointerException
     at
    com.ibm.ejs.container.util.ExceptionUtil.NoSuchEJBException(Exce
    ptionUti
    l.java:540)
     at
    com.ibm.ejs.container.EJSHome.createSingletonBeanO(EJSHome.java:
    3755)
     at
    com.ibm.ejs.csi.EJBApplicationMetaData.createStartupBeans(EJBApp
    lication
    MetaData.java:959)
     at
    com.ibm.ejs.csi.EJBApplicationMetaData.startedModule(EJBApplicat
    ionMetaD
    ata.java:680)
     at
    ...
    Caused by: java.lang.NullPointerException
     at
    org.apache.bval.cdi.BValInterceptor.isConstructorValidated(BValI
    ntercept
    or.java:163)
     at
    org.apache.bval.cdi.BValInterceptor.construct(BValInterceptor.ja
    va:83)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessor
    Impl.jav
    a:90)
     at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethod
    Accessor
    Impl.java:55)
     at java.lang.reflect.Method.invoke(Method.java:508)
     at
    org.jboss.weld.interceptor.reader.SimpleInterceptorInvocation$Si
    mpleMeth
    odInvocation.invoke(SimpleInterceptorInvocation.java:73)
     at
    org.jboss.weld.interceptor.proxy.WeldInvocationContext.invokeNex
    t(WeldIn
    vocationContext.java:83)
     at
    org.jboss.weld.interceptor.proxy.WeldInvocationContext.proceed(W
    eldInvoc
    ationContext.java:115)
     at
    org.jboss.weld.injection.producer.ConstructorInterceptionInstant
    iator$1.
    aroundConstruct(ConstructorInterceptionInstantiator.java:100)
     at
    org.jboss.weld.injection.ConstructorInjectionPoint.invokeAroundC
    onstruct
    Callback(ConstructorInjectionPoint.java:109)
     at
    org.jboss.weld.injection.ConstructorInjectionPoint.invokeAroundC
    onstruct
    Callbacks(ConstructorInjectionPoint.java:95)
     at
    org.jboss.weld.injection.ConstructorInjectionPoint.newInstance(C
    onstruct
    orInjectionPoint.java:78)
     at
    org.jboss.weld.injection.producer.AbstractInstantiator.newInstan
    ce(Abstr
    actInstantiator.java:28)
     at
    org.jboss.weld.injection.producer.InterceptorApplyingInstantiato
    r.newIns
    tance(InterceptorApplyingInstantiator.java:62)
     at
    org.jboss.weld.injection.producer.ConstructorInterceptionInstant
    iator.ne
    wInstance(ConstructorInterceptionInstantiator.java:66)
     at
    org.jboss.weld.injection.producer.BasicInjectionTarget.produce(B
    asicInje
    ctionTarget.java:112)
     at
    org.jboss.weld.injection.producer.BeanInjectionTarget.produce(Be
    anInject
    ionTarget.java:180)
     at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:158)
     at
    org.jboss.weld.context.AbstractContext.get(AbstractContext.java:
    96)
     at
    org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextual
    Instance
    Strategy.get(ContextualInstanceStrategy.java:100)
     at
    org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScoped
    Contextu
    alInstanceStrategy.get(ContextualInstanceStrategy.java:140)
     at
    org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.ja
    va:50)
     at
    org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerI
    mpl.java
    :744)
     at
    org.jboss.weld.injection.producer.AbstractMemberProducer.getRece
    iver(Abs
    tractMemberProducer.java:123)
     at
    org.jboss.weld.injection.producer.AbstractMemberProducer.produce
    (Abstrac
    tMemberProducer.java:158)
     at
    org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducer
    Bean.jav
    a:180)
     at
    org.jboss.weld.context.unbound.DependentContextImpl.get(Dependen
    tContext
    Impl.java:70)
     at
    org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextual
    Instance
    Strategy.get(ContextualInstanceStrategy.java:100)
     at
    org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.ja
    va:50)
    at
    org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerI
    mpl.java
    :744)
     at
    org.jboss.weld.manager.BeanManagerImpl.getInjectableReference(Be
    anManage
    rImpl.java:844)
     at
    org.jboss.weld.manager.BeanManagerImpl.getInjectableReference(Be
    anManage
    rImpl.java:857)
     at
    com.ibm.ws.cdi.impl.inject.InjectInjectionObjectFactory$2.run(In
    jectInje
    ctionObjectFactory.java:164)
     at
    java.security.AccessController.doPrivileged(AccessController.jav
    a:594)
     at
    com.ibm.ws.cdi.impl.inject.InjectInjectionObjectFactory.getObjec
    tInstanc
    e(InjectInjectionObjectFactory.java:157)
     at
    com.ibm.ws.cdi.impl.inject.InjectInjectionBinding.getInjectionOb
    jectInst
    ance(InjectInjectionBinding.java:102)
     at
    com.ibm.wsspi.injectionengine.InjectionBinding.getInjectionObjec
    t(Inject
    ionBinding.java:1433)
     at
    com.ibm.ws.cdi.impl.inject.InjectInjectionBinding.getInjectionOb
    ject(Inj
    ectInjectionBinding.java:135)
     at
    com.ibm.wsspi.injectionengine.InjectionBinding.getInjectableObje
    ct(Injec
    tionBinding.java:1373)
     at
    com.ibm.wsspi.injectionengine.InjectionTarget.inject(InjectionTa
    rget.jav
    a:108)
     at
    com.ibm.ws.injectionengine.AbstractInjectionEngine.inject(Abstra
    ctInject
    ionEngine.java:852)
     at
    com.ibm.ejs.container.ManagedBeanOBase.injectInstance(ManagedBea
    nOBase.j
    ava:148)
     ... 26 more
    

Local fix

  • N/A
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server using Bean Validation.               *
    ****************************************************************
    * PROBLEM DESCRIPTION: Applications fail to start due          *
    *                      to a NullPointerException coming out    *
    *                      of the Apache Bean Validation CDI       *
    *                      interceptor.                            *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    Applications using Bean Validation on beans that don't
    contain a public default constructor might fail with a
    NullPointerException similar to the following:
    java.lang.NullPointerException
    at
    org.apache.bval.cdi.BValInterceptor.isConstructorValidated(BValI
    nterceptor.java:163)
    at
    org.apache.bval.cdi.BValInterceptor.construct(BValInterceptor.ja
    va:83)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessor
    Impl.java:95)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethod
    AccessorImpl.java:55)
    at java.lang.reflect.Method.invoke(Method.java:508)
    at
    org.jboss.weld.interceptor.reader.SimpleInterceptorInvocation$Si
    mpleMethodInvocation.invoke(SimpleInterceptorInvocation.java:73)
    at
    org.jboss.weld.interceptor.proxy.WeldInvocationContext.invokeNex
    t(WeldInvocationContext.java:83)
    at
    org.jboss.weld.interceptor.proxy.WeldInvocationContext.proceed(W
    eldInvocationContext.java:115)
    at
    org.jboss.weld.injection.producer.ConstructorInterceptionInstant
    iator$1.aroundConstruct(ConstructorInterceptionInstantiator.java
    :100)
    

Problem conclusion

  • The BValInterceptor was updated in the 1.1.2 version of Apache
    Bean Validation. This update fixed BValInterceptor to
    correctly handle beans that don't have a public default
    constructor, and therefore prevents the NPE from occurring.
    The IBM WebSphere Application Server has been updated to use
    this new level of Apache Bean Validation.
    
    The fix for this APAR is currently targeted for inclusion in
    fix pack 9.0.0.7.  Please refer to the Recommended Updates
    page for delivery information:
    http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI90782

  • Reported component name

    WEBS APP SERV N

  • Reported component ID

    5724H8800

  • Reported release

    900

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2017-11-28

  • Closed date

    2018-01-09

  • Last modified date

    2018-01-09

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    WEBS APP SERV N

  • Fixed component ID

    5724H8800

Applicable component levels

  • R900 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.0","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
04 May 2022