在Websphere 8.5.5.9上部署Web应用程序时,JAXRSServletContainerInitializer的java.lang.NullPointerException

时间:2017-07-04 08:24:26

标签: java jersey jax-rs websphere-8

尝试在websphere 3.5.5上部署Web应用程序,但它会在JAXRSServletContainerInitializer中导致空指针异常。

以下是错误日志: -

[7/4/17 12:06:46:151 IST] 00000088 SystemErr     R Caused by: java.lang.NullPointerException
[7/4/17 12:06:46:151 IST] 00000088 SystemErr     R      at com.ibm.ws.jaxrs.webcontainer.JAXRSServletContainerInitializer.registerApplication(JAXRSServletContainerInitializer.java:455)
[7/4/17 12:06:46:151 IST] 00000088 SystemErr     R      at com.ibm.ws.jaxrs.webcontainer.JAXRSServletContainerInitializer.onStartup(JAXRSServletContainerInitializer.java:669)
[7/4/17 12:06:46:151 IST] 00000088 SystemErr     R      at com.ibm.ws.webcontainer.webapp.WebAppImpl.initializeServletContainerInitializers(WebAppImpl.java:619)
[7/4/17 12:06:46:151 IST] 00000088 SystemErr     R      at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:409)
[7/4/17 12:06:46:152 IST] 00000088 SystemErr     R      at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
[7/4/17 12:06:46:152 IST] 00000088 SystemErr     R      at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:170)

我在服务器级别也提供了以下配置: -

a)在应用程序服务器上设置com.ibm.websphere.jaxrs.server.DisableIBMJAXRSEngine自定义JVM属性,其值为true。

b)WebContainer自定义属性com.ibm.ws.webcontainer.emptyServletMappings为true

c)同时将类加载器顺序下拉列表设置为:Classes loaded with local class loader first (parent last)为应用程序。

0 个答案:

没有答案