Merge branch 'master' of github.com:apache/tomee
diff --git a/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRsHttpListener.java b/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRsHttpListener.java
index 23f3f93..6abf1e9 100644
--- a/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRsHttpListener.java
+++ b/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRsHttpListener.java
@@ -822,6 +822,11 @@
      * com/sun/ts/tests/jaxrs/spec/context/server/JAXRSClient#applicationInjectionTest_from_standalone
      */
     public static void injectApplication(final Application application, final JAXRSServerFactoryBean factory) {
+
+        if (application == null) {
+            return;
+        }
+
         /*
          * We may have wrapped the Application instance in an InternalApplication.  If so, unwrap
          * it and do the injection on that instance.