<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>atc &#187; nullpointer</title>
	<atom:link href="http://blog.beplacid.net/tag/nullpointer/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.beplacid.net</link>
	<description>Musings of technology, sport, life et al</description>
	<lastBuildDate>Thu, 10 Jun 2010 10:24:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Apache Axis Woes &#8211; Return Code (0)null</title>
		<link>http://blog.beplacid.net/2008/03/17/apache-axis-woes-return-code-0null/</link>
		<comments>http://blog.beplacid.net/2008/03/17/apache-axis-woes-return-code-0null/#comments</comments>
		<pubDate>Mon, 17 Mar 2008 12:40:41 +0000</pubDate>
		<dc:creator>atc</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[apache axis]]></category>
		<category><![CDATA[nullpointer]]></category>
		<category><![CDATA[web services]]></category>
		<category><![CDATA[weblogic]]></category>

		<guid isPermaLink="false">http://blog.beplacid.net/2008/03/17/apache-axis-woes-return-code-0null/</guid>
		<description><![CDATA[The latest project at work is using a service tier setup. We have the web front-end that&#8217;s using Struts 1.2 (yes, old!), Weblogic 9.2, Apache Axis 1.3, JSON &#38; jQuery. The back-end web services are written in .Net (and how difficult it seems to be for developers to work in .Net). Things at least work, [...]]]></description>
			<content:encoded><![CDATA[<p>The latest project at work is using a service tier setup. We have the web front-end that&#8217;s using Struts 1.2 (yes, old!), Weblogic 9.2, Apache Axis 1.3, JSON &amp; jQuery. The back-end web services are written in .Net (and how difficult it seems to be for developers to work in .Net). Things at least work, up until you receive very strange errors such as this:</p>
<p><code>java.lang.NullPointerException<br />
at weblogic.xml.jaxp.ChainingEntityResolver.popEntityResolver(ChainingEntityResolver.java:75)<br />
at weblogic.xml.jaxp.RegistryDocumentBuilder.setEntityResolver(RegistryDocumentBuilder.java:179)</code></p>
<p>and this:<br />
<code>AxisFault<br />
faultCode: {http://xml.apache.org/axis/}HTTP<br />
faultSubcode:<br />
faultString: (0)null<br />
faultActor:<br />
faultNode:<br />
faultDetail:<br />
{}:return code:  0</code></p>
<p>The worst thing about this error is that it&#8217;s completely non-descriptive. You can&#8217;t get a damn thing from your code (the WS call looks good; no connectivity errors). I spent in total 1 and a half days debugging this issue, and got nowhere. Google was returning red-herrings and forum posts with no solution and desperate coders saying &#8216;plz help me&#8217;. Painful stuff.</p>
<p>The fix as I see it, is to ensure the services are in sync. with the client.</p>
<ol>
<li>Make sure your web service is deployed correctly &#8211; the issue we discovered is that the client was sending extra objects that the service wasn&#8217;t expecting</li>
<li>Regenerate your client &#8211;  the client must be talking to the right methods and sending the correct object types. It looks like because the web service didn&#8217;t like our objects, it wasn&#8217;t returning a result (errors such as &#8216;There was an error while trying to serialize parameter X with data contract name Y&#8217;). The response therefore cannot be parsed, and you&#8217;ll get XML parsing errors caused by null pointers</li>
<li>Check your logs; both server &amp; client &#8211; we only found the true cause of our particular error because the service developer opened up the log directory in IIS. From that, I tail&#8217;d the log file when making a call and noticed the serialization errors.</li>
<li>Don&#8217;t panic &#8211; yes it&#8217;s true, HHGTTG is right: panicking doesn&#8217;t help.</li>
</ol>
<p>I first encountered this error well over a year ago when developing some web services myself. I&#8217;m no expert and I didn&#8217;t have the time to add logging (and indeed rebuild Axis) to Axis itself, but I&#8217;m sure the response returned from the service is totally unusable by the XML parser in your Application server and thus Axis itself.</p>
<p>I hope this helps someone. I spent so much time searching Google and pulling my hear out with no real solution&#8230;</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fblog.beplacid.net%2F2008%2F03%2F17%2Fapache-axis-woes-return-code-0null%2F';
  addthis_title  = 'Apache+Axis+Woes+%26%238211%3B+Return+Code+%280%29null';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://blog.beplacid.net/2008/03/17/apache-axis-woes-return-code-0null/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
