Uploaded image for project: 'TomEE'
  1. TomEE
  2. TOMEE-2064

NPE in CdiEjbBean.java:532

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 7.0.4
    • None
    • None

    Description

      TomEE 7.0.4 "master" started throwing NPE in CdiEjbBean.java:532

      java.lang.NullPointerException: while trying to get the length of a null array loaded from a local variable at slot 6
      at org.apache.openejb.cdi.CdiEjbBean$EjbInjectionTargetImpl.createNewPojo(CdiEjbBean.java:532)
       	at org.apache.openejb.BeanContext.newInstance(BeanContext.java:1608)
       	at org.apache.openejb.core.stateless.StatelessInstanceManager.createInstance(StatelessInstanceManager.java:242)
       	at org.apache.openejb.core.stateless.StatelessInstanceManager.getInstance(StatelessInstanceManager.java:234)
       	at org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:204)
       	at org.apache.openejb.core.ivm.EjbObjectProxyHandler.synchronizedBusinessMethod(EjbObjectProxyHandler.java:265)
       	at org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:260)
       	at org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:89)
       	at org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:347)
      

      I've fixed it by simple check for null and it fixed my tests. What do you think ?

      https://github.com/apache/tomee/compare/master...SvetlinZarev:fixNpe?expand=1

      Attachments

        1. npe-1.zip
          18 kB
          Svetlin Zarev

        Issue Links

          Activity

            People

              romain.manni-bucau Romain Manni-Bucau
              SvetlinZarev Svetlin Zarev
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: