Question : NullPointerException while deserializing SOAP request in WebSphere

Hi,

I have a J2EE (1.3) application having stateless session beans (EJB 2.0) exposed as bottom-up web service (SOAP 1.1, doc/literal wrapped) using RAD 7.5. Application server is WebSphere 7.0. Webservice client is a .NET based client.

One of the webservice is working fine, while in other, I am facing an issue that as soon as SOAP request hits the server, there is NullPointerException while deserializing its contents. I monitored the request through tcp/ip monitor and it seems to be fine. I tried sending the request through SOAP UI tool also, but I am getting the same exception. Also, tried custom package to namespace mappings.

Any help on this is appreciated.

Attachments:
1. SOAP request
2. Stack trace - occurs when request is sent first time
3. Stack trace - occurs during same successive requests

I am not able to attach the WSDL as of now, because I need to mask too much of the info in it, but if required I can put efforts and post it.

Thanks,
Vaibhav
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
////////////////////////////////////////////////////////////////
//1
////////////////////////////////////////////////////////////////


	
		
			
				
					
					
					
					
					TESTUSER
					
					
					
					
				
				
				false
				
					
					
					A
					
					
					
				
				
			
		
	

 
 
////////////////////////////////////////////////////////////////
//2
////////////////////////////////////////////////////////////////
[6/22/09 14:44:06:203 IST] 00000067 FfdcProvider  I com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on C:\Program Files\IBM\SDP\runtimes\base_v7\profiles\was70profile1\logs\ffdc\server1_747a747a_09.06.22_14.44.06.0503532.txt com.ibm.ws.webservices.engine.encoding.DeserializationContextImpl.parse 269
[6/22/09 14:44:06:244 IST] 00000067 FfdcProvider  I com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on C:\Program Files\IBM\SDP\runtimes\base_v7\profiles\was70profile1\logs\ffdc\server1_747a747a_09.06.22_14.44.06.2083533.txt com.ibm.ws.webservices.engine.SOAPPart.getSOAPEnvelope 964
[6/22/09 14:44:06:288 IST] 00000067 FfdcProvider  I com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on C:\Program Files\IBM\SDP\runtimes\base_v7\profiles\was70profile1\logs\ffdc\server1_747a747a_09.06.22_14.44.06.2573534.txt com.ibm.ws.webservices.engine.SOAPPart.getEnvelope 1122
[6/22/09 14:44:06:314 IST] 00000067 FfdcProvider  I com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on C:\Program Files\IBM\SDP\runtimes\base_v7\profiles\was70profile1\logs\ffdc\server1_747a747a_09.06.22_14.44.06.3003535.txt com.ibm.ws.webservices.engine.handlers.soap.SOAPHandlerChain.handleRequest 140
[6/22/09 14:44:06:320 IST] 00000067 WebServicesSe E com.ibm.ws.webservices.engine.transport.http.WebServicesServlet doPost WSWS3227E:  Error: Exception:
                                 WebServicesFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
 faultString: java.lang.NullPointerException Message being parsed: 
 faultActor: null
 faultDetail: 
 
java.lang.NullPointerException Message being parsed: 
	at com.ibm.ws.webservices.engine.WebServicesFault.makeFault(WebServicesFault.java:298)
	at com.ibm.ws.webservices.engine.SOAPPart._getSOAPEnvelope(SOAPPart.java:1090)
	at com.ibm.ws.webservices.engine.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:628)
	at com.ibm.ws.webservices.engine.SOAPPart.getEnvelope(SOAPPart.java:656)
	at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXRPCHandlerChain.handleRequest(JAXRPCHandlerChain.java:301)
	at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXRPCHandler.invokeServerRequestHandler(JAXRPCHandler.java:506)
	at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXRPCHandler$1.invoke(JAXRPCHandler.java:380)
	at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:209)
	at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngine.java:336)
	at com.ibm.ws.webservices.engine.transport.http.WebServicesServlet.doPost(WebServicesServlet.java:908)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
	at com.ibm.ws.webservices.engine.transport.http.WebServicesServletBase.service(WebServicesServletBase.java:344)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1449)
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:790)
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:443)
	at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:175)
	at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3610)
	at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:274)
	at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:926)
	at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1557)
	at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:173)
	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:288)
	at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
	at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
	at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
	at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
	at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
	at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
	at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:202)
	at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:766)
	at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:896)
	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1527)
Caused by: java.lang.NullPointerException
	at com.ibm.ws.webservices.engine.encoding.utils.BeanDesc.setJavaType(BeanDesc.java:277)
	at com.ibm.ws.webservices.engine.encoding.utils.BeanDesc.getPropertyDescriptorMap(BeanDesc.java:260)
	at com.ibm.ws.webservices.engine.encoding.utils.BeanDesc.getPropertyDescriptors(BeanDesc.java:219)
	at com.ibm.ws.webservices.engine.encoding.utils.BeanDesc.getPropertyDescriptorMap(BeanDesc.java:248)
	at com.ibm.ws.webservices.engine.encoding.utils.BeanDesc._prime(BeanDesc.java:407)
	at com.ibm.ws.webservices.engine.encoding.utils.BeanDesc.getBeanDescForClass(BeanDesc.java:169)
	at com.ibm.ws.webservices.engine.encoding.ser.BeanDeserializerFactory.lazyInitialization(BeanDeserializerFactory.java:133)
	at com.ibm.ws.webservices.engine.encoding.ser.BaseDeserializerFactory.getDeserializerAs(BaseDeserializerFactory.java:168)
	at com.ibm.ws.webservices.engine.encoding.DeserializationContextImpl.getDeserializer(DeserializationContextImpl.java:438)
	at com.ibm.ws.webservices.engine.xmlsoap.builders.RequestResponseProcessor.onStartChild(RequestResponseProcessor.java:356)
	at com.ibm.ws.webservices.engine.events.P2DConverter.startElement(P2DConverter.java:432)
	at com.ibm.ws.webservices.engine.events.P2DConverter.startElement(P2DConverter.java:373)
	at com.ibm.xml.xlxp2.api.sax.impl.SAX2ParserBase.startElementAction(SAX2ParserBase.java:220)
	at com.ibm.xml.xlxp2.api.was.WSXMLReader.startElementAction(WSXMLReader.java:124)
	at com.ibm.xml.xlxp2.api.sax.impl.SAX2ParserBase.startElementEvent(SAX2ParserBase.java:206)
	at com.ibm.xml.xlxp2.api.sax.impl.SAX2DocumentScanner.produceStartElementEvent(SAX2DocumentScanner.java:45)
	at com.ibm.xml.xlxp2.scan.DocumentScanner.scanStartElement(DocumentScanner.java:2260)
	at com.ibm.xml.xlxp2.scan.DocumentScanner.nextEvent(DocumentScanner.java:1294)
	at com.ibm.xml.xlxp2.scan.DocumentScanner.parseDocumentEntity(DocumentScanner.java:1168)
	at com.ibm.xml.xlxp2.api.was.WSXMLReader.parseEvents(WSXMLReader.java:112)
	at com.ibm.xml.xlxp2.api.sax.impl.SAX2ParserBase.parseEntity(SAX2ParserBase.java:1308)
	at com.ibm.xml.xlxp2.api.sax.impl.SAX2ParserBase.parse(SAX2ParserBase.java:1359)
	at javax.xml.parsers.SAXParser.parse(Unknown Source)
	at com.ibm.ws.webservices.engine.utils.WebServicesParser.parse(WebServicesParser.java:374)
	at com.ibm.ws.webservices.engine.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:295)
	at com.ibm.ws.webservices.engine.SOAPPart._getSOAPEnvelope(SOAPPart.java:1064)
	... 33 more
 
////////////////////////////////////////////////////////////////
//3
////////////////////////////////////////////////////////////////
[6/23/09 11:24:49:687 IST] 00000069 WebServicesSe E com.ibm.ws.webservices.engine.transport.http.WebServicesServlet doPost WSWS3227E:  Error: Exception:
                                 WebServicesFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
 faultString: java.lang.NullPointerException Message being parsed: 
 faultActor: null
 faultDetail: 
 
java.lang.NullPointerException Message being parsed: 
	at com.ibm.ws.webservices.engine.WebServicesFault.makeFault(WebServicesFault.java:298)
	at com.ibm.ws.webservices.engine.SOAPPart._getSOAPEnvelope(SOAPPart.java:1090)
	at com.ibm.ws.webservices.engine.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:628)
	at com.ibm.ws.webservices.engine.SOAPPart.getEnvelope(SOAPPart.java:656)
	at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXRPCHandlerChain.handleRequest(JAXRPCHandlerChain.java:301)
	at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXRPCHandler.invokeServerRequestHandler(JAXRPCHandler.java:506)
	at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXRPCHandler$1.invoke(JAXRPCHandler.java:380)
	at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:209)
	at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngine.java:336)
	at com.ibm.ws.webservices.engine.transport.http.WebServicesServlet.doPost(WebServicesServlet.java:908)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
	at com.ibm.ws.webservices.engine.transport.http.WebServicesServletBase.service(WebServicesServletBase.java:344)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1449)
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:790)
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:443)
	at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:175)
	at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91)
	at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:859)
	at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1557)
	at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:173)
	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
	at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
	at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
	at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
	at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
	at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
	at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:202)
	at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:766)
	at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:896)
	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1527)
Caused by: java.lang.NullPointerException
	at com.ibm.ws.webservices.engine.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:347)
	at com.ibm.ws.webservices.engine.events.P2DConverter.flush(P2DConverter.java:914)
	at com.ibm.ws.webservices.engine.events.P2DConverter.startPrefixMapping(P2DConverter.java:253)
	at com.ibm.xml.xlxp2.api.sax.impl.SAX2ParserBase.startPrefixMappings(SAX2ParserBase.java:175)
	at com.ibm.xml.xlxp2.api.sax.impl.SAX2ParserBase.startElementAction(SAX2ParserBase.java:216)
	at com.ibm.xml.xlxp2.api.was.WSXMLReader.startElementAction(WSXMLReader.java:124)
	at com.ibm.xml.xlxp2.api.sax.impl.SAX2ParserBase.startElementEvent(SAX2ParserBase.java:206)
	at com.ibm.xml.xlxp2.api.sax.impl.SAX2DocumentScanner.produceLeafElementEvent(SAX2DocumentScanner.java:52)
	at com.ibm.xml.xlxp2.scan.DocumentScanner.scanStartElement(DocumentScanner.java:2268)
	at com.ibm.xml.xlxp2.scan.DocumentScanner.nextEvent(DocumentScanner.java:1294)
	at com.ibm.xml.xlxp2.scan.DocumentScanner.parseDocumentEntity(DocumentScanner.java:1168)
	at com.ibm.xml.xlxp2.api.was.WSXMLReader.parseEvents(WSXMLReader.java:112)
	at com.ibm.xml.xlxp2.api.sax.impl.SAX2ParserBase.parseEntity(SAX2ParserBase.java:1308)
	at com.ibm.xml.xlxp2.api.sax.impl.SAX2ParserBase.parse(SAX2ParserBase.java:1359)
	at javax.xml.parsers.SAXParser.parse(Unknown Source)
	at com.ibm.ws.webservices.engine.utils.WebServicesParser.parse(WebServicesParser.java:374)
	at com.ibm.ws.webservices.engine.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:295)
	at com.ibm.ws.webservices.engine.SOAPPart._getSOAPEnvelope(SOAPPart.java:1064)
	... 30 more
 
[6/23/09 11:24:49:560 IST] 00000069 SystemErr     R java.lang.NullPointerException
[6/23/09 11:24:49:618 IST] 00000069 SystemErr     R 	at com.ibm.ws.webservices.engine.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:347)
[6/23/09 11:24:49:618 IST] 00000069 SystemErr     R 	at com.ibm.ws.webservices.engine.events.P2DConverter.flush(P2DConverter.java:914)
[6/23/09 11:24:49:618 IST] 00000069 SystemErr     R 	at com.ibm.ws.webservices.engine.events.P2DConverter.startPrefixMapping(P2DConverter.java:253)
[6/23/09 11:24:49:618 IST] 00000069 SystemErr     R 	at com.ibm.xml.xlxp2.api.sax.impl.SAX2ParserBase.startPrefixMappings(SAX2ParserBase.java:175)
[6/23/09 11:24:49:619 IST] 00000069 SystemErr     R 	at com.ibm.xml.xlxp2.api.sax.impl.SAX2ParserBase.startElementAction(SAX2ParserBase.java:216)
[6/23/09 11:24:49:619 IST] 00000069 SystemErr     R 	at com.ibm.xml.xlxp2.api.was.WSXMLReader.startElementAction(WSXMLReader.java:124)
[6/23/09 11:24:49:619 IST] 00000069 SystemErr     R 	at com.ibm.xml.xlxp2.api.sax.impl.SAX2ParserBase.startElementEvent(SAX2ParserBase.java:206)
[6/23/09 11:24:49:619 IST] 00000069 SystemErr     R 	at com.ibm.xml.xlxp2.api.sax.impl.SAX2DocumentScanner.produceLeafElementEvent(SAX2DocumentScanner.java:52)
[6/23/09 11:24:49:619 IST] 00000069 SystemErr     R 	at com.ibm.xml.xlxp2.scan.DocumentScanner.scanStartElement(DocumentScanner.java:2268)
[6/23/09 11:24:49:620 IST] 00000069 SystemErr     R 	at com.ibm.xml.xlxp2.scan.DocumentScanner.nextEvent(DocumentScanner.java:1294)
[6/23/09 11:24:49:620 IST] 00000069 SystemErr     R 	at com.ibm.xml.xlxp2.scan.DocumentScanner.parseDocumentEntity(DocumentScanner.java:1168)
[6/23/09 11:24:49:620 IST] 00000069 SystemErr     R 	at com.ibm.xml.xlxp2.api.was.WSXMLReader.parseEvents(WSXMLReader.java:112)
[6/23/09 11:24:49:620 IST] 00000069 SystemErr     R 	at com.ibm.xml.xlxp2.api.sax.impl.SAX2ParserBase.parseEntity(SAX2ParserBase.java:1308)
[6/23/09 11:24:49:620 IST] 00000069 SystemErr     R 	at com.ibm.xml.xlxp2.api.sax.impl.SAX2ParserBase.parse(SAX2ParserBase.java:1359)
[6/23/09 11:24:49:621 IST] 00000069 SystemErr     R 	at javax.xml.parsers.SAXParser.parse(Unknown Source)
[6/23/09 11:24:49:621 IST] 00000069 SystemErr     R 	at com.ibm.ws.webservices.engine.utils.WebServicesParser.parse(WebServicesParser.java:374)
[6/23/09 11:24:49:621 IST] 00000069 SystemErr     R 	at com.ibm.ws.webservices.engine.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:295)
[6/23/09 11:24:49:621 IST] 00000069 SystemErr     R 	at com.ibm.ws.webservices.engine.SOAPPart._getSOAPEnvelope(SOAPPart.java:1064)
[6/23/09 11:24:49:631 IST] 00000069 SystemErr     R 	at com.ibm.ws.webservices.engine.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:628)
[6/23/09 11:24:49:633 IST] 00000069 SystemErr     R 	at com.ibm.ws.webservices.engine.SOAPPart.getEnvelope(SOAPPart.java:656)
[6/23/09 11:24:49:633 IST] 00000069 SystemErr     R 	at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXRPCHandlerChain.handleRequest(JAXRPCHandlerChain.java:301)
[6/23/09 11:24:49:633 IST] 00000069 SystemErr     R 	at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXRPCHandler.invokeServerRequestHandler(JAXRPCHandler.java:506)
[6/23/09 11:24:49:633 IST] 00000069 SystemErr     R 	at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXRPCHandler$1.invoke(JAXRPCHandler.java:380)
[6/23/09 11:24:49:633 IST] 00000069 SystemErr     R 	at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:209)
[6/23/09 11:24:49:635 IST] 00000069 SystemErr     R 	at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngine.java:336)
[6/23/09 11:24:49:635 IST] 00000069 SystemErr     R 	at com.ibm.ws.webservices.engine.transport.http.WebServicesServlet.doPost(WebServicesServlet.java:908)
[6/23/09 11:24:49:635 IST] 00000069 SystemErr     R 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
[6/23/09 11:24:49:635 IST] 00000069 SystemErr     R 	at com.ibm.ws.webservices.engine.transport.http.WebServicesServletBase.service(WebServicesServletBase.java:344)
[6/23/09 11:24:49:643 IST] 00000069 SystemErr     R 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
[6/23/09 11:24:49:657 IST] 00000069 SystemErr     R 	at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1449)
[6/23/09 11:24:49:658 IST] 00000069 SystemErr     R 	at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:790)
[6/23/09 11:24:49:670 IST] 00000069 SystemErr     R 	at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:443)
[6/23/09 11:24:49:670 IST] 00000069 SystemErr     R 	at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:175)
[6/23/09 11:24:49:670 IST] 00000069 SystemErr     R 	at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91)
[6/23/09 11:24:49:671 IST] 00000069 SystemErr     R 	at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:859)
[6/23/09 11:24:49:671 IST] 00000069 SystemErr     R 	at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1557)
[6/23/09 11:24:49:671 IST] 00000069 SystemErr     R 	at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:173)
[6/23/09 11:24:49:671 IST] 00000069 SystemErr     R 	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
[6/23/09 11:24:49:671 IST] 00000069 SystemErr     R 	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
[6/23/09 11:24:49:672 IST] 00000069 SystemErr     R 	at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
[6/23/09 11:24:49:672 IST] 00000069 SystemErr     R 	at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
[6/23/09 11:24:49:672 IST] 00000069 SystemErr     R 	at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
[6/23/09 11:24:49:672 IST] 00000069 SystemErr     R 	at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
[6/23/09 11:24:49:672 IST] 00000069 SystemErr     R 	at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
[6/23/09 11:24:49:677 IST] 00000069 SystemErr     R 	at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:202)
[6/23/09 11:24:49:677 IST] 00000069 SystemErr     R 	at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:766)
[6/23/09 11:24:49:677 IST] 00000069 SystemErr     R 	at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:896)
[6/23/09 11:24:49:677 IST] 00000069 SystemErr     R 	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1527)

Answer : NullPointerException while deserializing SOAP request in WebSphere

The problem is resolved in a strange manner. It was not an issue with soap request or wsdl.

Consider the 2 code snippets attached (earlier and now). Earlier, there was Vector which is now  replaced by String[]. Reason being interoperability issues with webservice's .NET client. Earlier, the J2EE app was deployed in weblogic 8.1, and now it has to be in websphere 7.0.

Now, the problem occured due to the method getXyz(int i). Somehow the websphere runtime got confused because method name "getXyz" indicates that it is getter for property "xyz". But, since "xyz" is not of array type, the parameter (int i) caused confusion. There was no compile time issue, but there was NullPointerException at runtime during SOAP request deserialization. After commenting this method, the exception stopped occuring.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
//earlier
public class MyBean implements Serializable {
    private Vector xyzCollection;
    private String xyz;
    public String getXyz() {...}
    public void setXyz(String xyz) {...}
    public Vector getXyzCollection() {...}
    public void setXyzCollection(Vector xyzCollection) {...}
    public String getXyz(int i) { return xyzCollection.get(i); }
}
 
//now
public class MyBean implements Serializable {
    private String[] xyzCollection;
    private String xyz;
    public String getXyz() {...}
    public void setXyz(String xyz) {...}
    public String[] getXyzCollection() {...}
    public void setXyzCollection(String[] xyzCollection) {...}
    public String getXyz(int i) { return xyzCollection[i]; }
}
Random Solutions  
 
programming4us programming4us