2

Trying to deploy a web app on websphere 3.5.5 but it results in null pointer exception at JAXRSServletContainerInitializer.

Below is the error log:-

[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)

I have provided below config also at server level:-

a) Set the com.ibm.websphere.jaxrs.server.DisableIBMJAXRSEngine custom JVM property on the application server with a value of true.

b) WebContainer custom property com.ibm.ws.webcontainer.emptyServletMappings to true

c) Also set the Class loader order dropdown to: Classes loaded with local class loader first (parent last) for the app.

Sagar
  • 197
  • 1
  • 9
  • 1
    My guess is that the "com...DisableIBMJAXRSEngine=true" property is not set correctly. Make sure that you have set the JVM custom property (i.e. Java System Property) using these instructions: https://www.ibm.com/support/knowledgecenter/en/SSAW57_8.5.5/com.ibm.websphere.nd.multiplatform.doc/ae/xrun_jvm.html Also remember to restart the server(s). The JAXRSServletContainerInitializer's onStartup method will return immediately if that system property is set to "true" (case sensitive), so it would only call the registerApplication method is if that property is not "true". HTH, Andy – Andy McCright Jul 05 '17 at 18:45
  • You are right Andy. Initially, I set this custom property at web container level but after I followed the instructions from the link shared by you, I could successfully deploy the app. Thanks a lot Andy for your help. – Sagar Jul 14 '17 at 06:24

0 Answers0