Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-2038

NPE while looking up java:comp/EJBContext in @PostConstruct method

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • EJB3_1 1.0.6
    • 1.1.22, Plugin 1.0.19, EJB3_1 1.0.5
    • core
    • None

      When java:comp/EJBContext is looked up in a method marked @PostConstruct of a bean, a NullPointerException is thrown from EJBContextFactory:

      Caused by: java.lang.NullPointerException
      at org.jboss.ejb3.EJBContextFactory.getObjectInstance(EJBContextFactory.java:57)
      at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
      at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1483)
      at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1500)
      ... 70 more

      Please see the referenced forum thread for complete details. I was able to reproduce this issue with a SFSB too, so it's not specific to MDBs.

              jaikiran Jaikiran Pai (Inactive)
              jaikiran Jaikiran Pai (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: