JNDI ObjectFactory Broken for Tomcat

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Gone away
    • Priority: Major - P3
    • None
    • Affects Version/s: 3.9.1
    • Component/s: API
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When entering into `getObjectInstance()` method for `ObjectFactory` implementations, Tomcat / TomEE is not using `environment`, so it gets passed in as `null`. A quick fix to this bug would be to check if `environment` is null before trying to access the hashtable.

      Example Stack Trace:

      29-Jan-2019 11:39:54.452 SEVERE [localhost-startStop-1] org.apache.tomee.catalina.TomcatResourceFactory.create Can't create resource null
       java.lang.NullPointerException
      	at com.mongodb.client.jndi.MongoClientFactory.getObjectInstance(MongoClientFactory.java:72)
      ...
      

            Assignee:
            Jeffrey Yemin
            Reporter:
            James Smith
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: