<?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>Net 2.0 :: Nitesh Gautam &#187; Apache</title>
	<atom:link href="http://www.netgautam.com/wordpress/category/programmingcoding/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.netgautam.com/wordpress</link>
	<description>A Technophile blogger</description>
	<lastBuildDate>Sun, 18 Jul 2010 17:19:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='www.netgautam.com' port='80' path='/wordpress/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<item>
		<title>Web-Services and Me</title>
		<link>http://www.netgautam.com/wordpress/2009/11/02/web-services-and-me/</link>
		<comments>http://www.netgautam.com/wordpress/2009/11/02/web-services-and-me/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 14:09:03 +0000</pubDate>
		<dc:creator>Nitesh Gautam</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[J2EE]]></category>
		<category><![CDATA[Programming/Coding]]></category>

		<guid isPermaLink="false">http://www.netgautam.com/wordpress/2009/11/02/web-services-and-me/</guid>
		<description><![CDATA[Very personally speaking -
I love Web-services

if (you are a developer, don’t know what they are and interested)
{
&#160;&#160;&#160;&#160;&#160; start with Apache Axis2
} else if (you know what they are, know Spring basics and curious about me falling in love with them all-over again
{
&#160;&#160;&#160;&#160;&#160; try Apache CXF
}
&#160;&#160;]]></description>
			<content:encoded><![CDATA[<p>Very personally speaking -</p>
<p align="center">I love Web-services</p>
<p><strong></strong></p>
<p><strong>if</strong> (<strong>you are a developer, don’t know what they are and interested</strong>)</p>
<p>{</p>
<p>&#160;&#160;&#160;&#160;&#160; <strong>start with Apache Axis2</strong></p>
<p>} else <strong>if</strong> (<strong>you know what they are, know Spring basics and curious about me falling in love with them all-over again</strong></p>
<p>{</p>
<p><strong>&#160;&#160;&#160;&#160;&#160; try Apache CXF</strong></p>
<p>}</p>
&nbsp;&nbsp;<div class="meta"></div>]]></content:encoded>
			<wfw:commentRss>http://www.netgautam.com/wordpress/2009/11/02/web-services-and-me/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Asynchronous ServiceClient invocation exception in AXIS2</title>
		<link>http://www.netgautam.com/wordpress/2009/05/04/asynchronous-serviceclient-invocation-exception-in-axis2/</link>
		<comments>http://www.netgautam.com/wordpress/2009/05/04/asynchronous-serviceclient-invocation-exception-in-axis2/#comments</comments>
		<pubDate>Sun, 03 May 2009 18:46:12 +0000</pubDate>
		<dc:creator>Nitesh Gautam</dc:creator>
				<category><![CDATA[AXIS2]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[J2EE]]></category>
		<category><![CDATA[Problems]]></category>
		<category><![CDATA[Programming/Coding]]></category>

		<guid isPermaLink="false">http://www.netgautam.com/wordpress/2009/05/04/asynchronous-serviceclient-invocation-exception-in-axis2/</guid>
		<description><![CDATA[Following error may disguise the actual problem in AXIS2 implementation which starts as -
&#160;

   1:  java.lang.ClassCastException: org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver cannot be cast to org.apache.axis2.engine.MessageReceiver
   2:  at org.apache.axis2.deployment.DescriptionBuilder.loadMessageReceiver(DescriptionBuilder.java:190)


.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: [...]]]></description>
			<content:encoded><![CDATA[<p>Following error may disguise the actual problem in AXIS2 implementation which starts as -</p>
<p>&#160;</p>
<div class="csharpcode">
<pre class="alt"><span class="lnum">   1:  </span>java.lang.ClassCastException: org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver cannot be cast to org.apache.axis2.engine.MessageReceiver</pre>
<pre><span class="lnum">   2:  </span>at org.apache.axis2.deployment.DescriptionBuilder.loadMessageReceiver(DescriptionBuilder.java:190)</pre>
</div>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p>&#160;</p>
<p>In most of the situations, this error comes up when you think everything is fine and it should work. You should be able to transmit message from one end to other without any problem and it actually happens.</p>
<p>You send something from <strong>end 1 to end 2</strong>, <strong>end 2 receives it</strong>, processes it and then <strong>end 2 tries to send something back to end 1</strong>, but then, this error appears.</p>
<p>&#160;</p>
<p>The problem isn’t in the implementation but in the the usage. Generally we try to invoke asynchronous behavior out of synchronous web-service structure. Let us do the post-mortem of above example -</p>
<p>&#160;</p>
<p><strong><u>Scenario 1</u></strong></p>
<ul>
<li><strong>end 1</strong> sends <strong>abc</strong> and wait for return of message-flow </li>
<li><strong>end 2</strong> receives <strong>abc</strong> </li>
<li><strong>end 2</strong> processes <strong>abc</strong> </li>
<li><strong>end 2</strong> tries to send <strong>xyz</strong> to <strong>end 1</strong> (than returning the value for message-flow <strong>abc)</strong> </li>
<li><strong>end 1</strong> which is waiting for <strong>abc</strong> message-flow return value, receives <strong>xyz</strong> which isn’t expected and hence it throws <strong>ClassCastException</strong> </li>
</ul>
<p>&#160;</p>
<p>And the ideal flow should be -</p>
<p><strong><u>Scenario 2</u></strong></p>
<ul>
<li><strong>end 1</strong> sends <strong>abc</strong> and wait for return of message-flow </li>
<li><strong>end 2</strong> receives <strong>abc</strong> </li>
<li><strong>end 2</strong> processes <strong>abc</strong> </li>
<li><strong>end 2</strong> sends return value for <strong>abc</strong> message flow </li>
<li><strong>end 1 </strong>receives and process return value for <strong>abc</strong> message flow </li>
<li><strong>end 2</strong> tries to send <strong>xyz</strong> to <strong>end 1</strong> </li>
<li><strong>end 1</strong> receives <strong>xyz</strong>…(and the flow continues) </li>
</ul>
<p>&#160;</p>
<p>This is still an open issue over AXIS2 website (<a title="https://issues.apache.org/jira/browse/AXIS2-2972?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel" href="https://issues.apache.org/jira/browse/AXIS2-2972?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel">https://issues.apache.org/jira/browse/AXIS2-2972?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel</a>).</p>
<p>&#160;</p>
<p>If you don’t want want to proceed in this (synchronous) way, then you can implement asynchronous web-services using AXIS2 (which isn’t in scope of this topic – so wouldn’t be explaining here) but if you can’t change the existing synchronous web-service and have access to only the code which invokes the web-service plus flow can also not be changed as explained in scenario 1, then there is one temporary solution -</p>
<blockquote>
<p>Maintain the pool of Stub or ServiceClient instances from start of server and use another Stub instance when starting a new message flow</p>
</blockquote>
<p>Take it as a temporary work-around as it isn’t the practical solution or suggested solution for running a web-service in production environment and try to convert Scenario 1 into Scenario 2 for your application or synchronous web-service into asynchronous web-service as soon as it can be done.</p>
<p>&#160;</p>
<p>Here is the complete stacktrace of exception for which solution is explained above -</p>
<blockquote>
<pre class="csharpcode">java.lang.ClassCastException: org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver cannot be cast to org.apache.axis2.engine.MessageReceiver
at org.apache.axis2.deployment.DescriptionBuilder.loadMessageReceiver(DescriptionBuilder.java:190)
at org.apache.axis2.deployment.DescriptionBuilder$1.run(DescriptionBuilder.java:142)
at org.apache.axis2.java.security.AccessController.doPrivileged(AccessController.java:130)
at org.apache.axis2.deployment.DescriptionBuilder.processMessageReceivers(DescriptionBuilder.java:138)
at org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:92)
at org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:640)
at org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:105)
at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:60)
at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:174)
at org.apache.axis2.client.ServiceClient.initializeTransports(ServiceClient.java:211)
at org.apache.axis2.client.ServiceClient.configureServiceClient(ServiceClient.java:138)
at org.apache.axis2.client.ServiceClient.&lt;init&gt;(ServiceClient.java:133)
at org.apache.axis2.client.ServiceClient.&lt;init&gt;(ServiceClient.java:229)
at com.test.client.BasicClient.&lt;init&gt;(BasicClient.java:76)
at com.test.client.TestClient.&lt;init&gt;(TestClient.java:31)
at com.test.client.servlet.TestServer.&lt;init&gt;(TestServer.java:452)
at com.test.client.TestServer.getInstance(TestServer.java:65)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.test.client.ClientMessageHandler.init(ClientMessageHandler.java:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.axis2.engine.DependencyManager.initServiceClass(DependencyManager.java:56)
at org.apache.axis2.engine.DependencyManager.initService(DependencyManager.java:94)
at org.apache.axis2.context.ConfigurationContextFactory.initApplicationScopeServices(ConfigurationContextFactory.java:91)
at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:76)
at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:486)
at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:406)</pre>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
</blockquote>
<p>&#160;</p>
<p>Thanks to Anand Mandil for suggesting the last temporary work-out. It proves very handy when you are in do-or-die position.</p>
&nbsp;&nbsp;<div class="meta"></div>]]></content:encoded>
			<wfw:commentRss>http://www.netgautam.com/wordpress/2009/05/04/asynchronous-serviceclient-invocation-exception-in-axis2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>createConfigurationContextFromFileSystem in Axis2</title>
		<link>http://www.netgautam.com/wordpress/2009/02/27/createconfigurationcontextfromfilesystem-in-axis2/</link>
		<comments>http://www.netgautam.com/wordpress/2009/02/27/createconfigurationcontextfromfilesystem-in-axis2/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 19:23:53 +0000</pubDate>
		<dc:creator>Nitesh Gautam</dc:creator>
				<category><![CDATA[AXIS2]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[J2EE]]></category>
		<category><![CDATA[Problems]]></category>
		<category><![CDATA[Programming/Coding]]></category>

		<guid isPermaLink="false">http://www.netgautam.com/wordpress/2009/02/27/createconfigurationcontextfromfilesystem-in-axis2/</guid>
		<description><![CDATA[There is a problem when you try to start building web-service of auto-generated Axis2 java model from WSDL file. When you start working on stub, default constructor creates ConfigurationContext with null parameters which means it is empty and therefore you can’t engage any module with thw ServiceClient created from this ConfigurationContext. For example you may [...]]]></description>
			<content:encoded><![CDATA[<p>There is a problem when you try to start building web-service of auto-generated Axis2 java model from WSDL file. When you start working on stub, default constructor creates ConfigurationContext with null parameters which means it is empty and therefore you can’t engage any module with thw ServiceClient created from this ConfigurationContext. For example you may want to engage addressing module for dual mode asynchronous web-service implementation as -</p>
<blockquote><p>_serviceClient.engageModule(&quot;addressing&quot;);</p>
</blockquote>
<p>And you keep getting error that addressing module can’t be engaged as &#8211; </p>
<blockquote><p>org.apache.axis2.AxisFault: Unable to engage module : addressing      <br />at org.apache.axis2.client.ServiceClient.engageModule(ServiceClient.java:333)</p>
</blockquote>
<p>To overcome this problem, you need to specify the axis2 locations specifically while creating ConfigurationContext. Therefore&#160; instead using default constructor which goes like -</p>
<blockquote><pre>ConfigurationContext ctx = ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, null)</pre>
</blockquote>
<p>, you need to change it to -</p>
<blockquote>
<pre>ConfigurationContext ctx =
ConfigurationContextFactory.createConfigurationContextFromFileSystem(repository, path)</pre>
</blockquote>
<p>&#160;</p>
<p>Here repository is location of axis2 module/package folder and path is the respective location of axis2.xml (configuration file). Make sure that the respective modules are placed inside modules/repository folder of repository path given. Foe example, you can try following sample code for creating ConfigurationContext -&#160; </p>
<blockquote>
<pre>ConfigurationContext ctx =
ConfigurationContextFactory.createConfigurationContextFromFileSystem(“c:\\axis2\\WEB-INF”, “conf/axis2.xml”)</pre>
</blockquote>
<p>This syntax will work if you have axis2 path set in your class path. Otherwise, you may need to use following syntax -&#160; </p>
<blockquote>
<pre>ConfigurationContext ctx =
ConfigurationContextFactory.createConfigurationContextFromFileSystem(“c:\\axis2\\WEB-INF”, “c:\\axis2\\conf\\axis2.xml”)</pre>
</blockquote>
<p>In this way, you get handle of axis2 modules and related dependencies. Now you can engage any addressing module after ceating the ServiceClient from this ConfigurationContext. The sample code goes as follows &#8211; </p>
<blockquote>
<p>… </p>
<p>ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(“c:\\axis2\\WEB-INF”, “c:\\axis2\\conf\\axis2.xml”);<br />
    <br />ServiceClient service = new ServiceClient( configContext, null ); </p>
<p>… </p>
<p>… </p>
<p>service.engageModule(&quot;addressing&quot;); </p>
<p>…</p>
</blockquote>
<p>Or you can try storing these static path variables in system resources/classpath and then referring them in your code as those variables like -</p>
<blockquote>
<p>… </p>
<p>ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(“axisPath”, “axisXMLPath”);<br />
    <br />ServiceClient service = new ServiceClient( configContext, null ); </p>
<p>… </p>
<p>… </p>
<p>service.engageModule(&quot;addressing&quot;); </p>
<p>…</p>
</blockquote>
<p>You may also like to visit Apache Axis2 FAQ page &#8211; <a href="http://ws.apache.org/axis2/faq.html#c2">http://ws.apache.org/axis2/faq.html</a></p>
&nbsp;&nbsp;<div class="meta"></div>]]></content:encoded>
			<wfw:commentRss>http://www.netgautam.com/wordpress/2009/02/27/createconfigurationcontextfromfilesystem-in-axis2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Axis 2 Web service error</title>
		<link>http://www.netgautam.com/wordpress/2008/12/24/axis-2-web-service-error/</link>
		<comments>http://www.netgautam.com/wordpress/2008/12/24/axis-2-web-service-error/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 19:16:08 +0000</pubDate>
		<dc:creator>Nitesh Gautam</dc:creator>
				<category><![CDATA[AXIS2]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[J2EE]]></category>
		<category><![CDATA[Problems]]></category>
		<category><![CDATA[Programming/Coding]]></category>

		<guid isPermaLink="false">http://www.netgautam.com/wordpress/2008/12/24/axis-2-web-service-error/</guid>
		<description><![CDATA[
An error in web-services -
&#160;
exception in stub ==java.lang.LinkageError: loader constraint violation: when resolving method &#34;com.TestClass.getOMElement(Ljavax/xml/namespace/QName;Lorg/apache/axiom/om/OMFactory;)Lorg/apache/axiom/om/OMElement;&#34; the class loader (instance of org/apache/axis2/deployment/DeploymentClassLoader) of the current class, com/TestServiceClass, and the class loader (instance of org/apache/catalina/loader/StandardClassLoader) for resolved class, com/ibm/ecris/service/components/TestClass, have different Class objects for the type org/apache/axiom/om/OMFactory used in the signature

&#160;
It comes up when another class with [...]]]></description>
			<content:encoded><![CDATA[</p>
<p>An error in web-services -</p>
<p>&#160;</p>
<blockquote><p>exception in stub ==java.lang.LinkageError: loader constraint violation: when resolving method &quot;com.TestClass.getOMElement(Ljavax/xml/namespace/QName;Lorg/apache/axiom/om/OMFactory;)Lorg/apache/axiom/om/OMElement;&quot; the class loader (instance of org/apache/axis2/deployment/DeploymentClassLoader) of the current class, com/TestServiceClass, and the class loader (instance of org/apache/catalina/loader/StandardClassLoader) for resolved class, com/ibm/ecris/service/components/TestClass, have different Class objects for the type org/apache/axiom/om/OMFactory used in the signature</p>
</blockquote>
<p>&#160;</p>
<p>It comes up when another class with same name is already loaded in ClassLoader (generally during start of web-server, perhaps in different project) and we don’t know about it. The already loaded class is different than the class being loaded at this time. In this case, class being initialized/loaded/used is TestClass which is already loaded with different signatures and therefore this error pops up. So make sure that you load only one instance of right class at right time.</p>
&nbsp;&nbsp;<div class="meta"></div>]]></content:encoded>
			<wfw:commentRss>http://www.netgautam.com/wordpress/2008/12/24/axis-2-web-service-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eclipse and Axis2</title>
		<link>http://www.netgautam.com/wordpress/2008/11/17/eclipse-and-axis2/</link>
		<comments>http://www.netgautam.com/wordpress/2008/11/17/eclipse-and-axis2/#comments</comments>
		<pubDate>Mon, 17 Nov 2008 16:19:51 +0000</pubDate>
		<dc:creator>Nitesh Gautam</dc:creator>
				<category><![CDATA[AXIS2]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Problems]]></category>
		<category><![CDATA[Programming/Coding]]></category>

		<guid isPermaLink="false">http://www.netgautam.com/wordpress/2008/11/17/eclipse-and-axis2/</guid>
		<description><![CDATA[Even after so many years of development there is something even Eclipse can’t help out with and that is – too many unknown errors which Eclipse team keeps trying to figure out. One such recent error that I came across is when you are integrating Apache Axis2 with Eclipse. It reads like &#8211; 
&#160;
&#34;Exception occurred [...]]]></description>
			<content:encoded><![CDATA[<p>Even after so many years of development there is something even Eclipse can’t help out with and that is – too many unknown errors which Eclipse team keeps trying to figure out. One such recent error that I came across is when you are integrating Apache Axis2 with Eclipse. It reads like &#8211; </p>
<p>&#160;</p>
<blockquote><p>&quot;Exception occurred while reading or writing file {0}The Axis2 facets cannot be installed since the Axis2 runtime location has not been set. </p>
<p>Please go to the Web Services preference page and set the Axis2 runtime location under Axis2 Preferences.&quot;</p>
</blockquote>
<p>&#160;</p>
<p>And comes up even when Axis2 is configured properly. So not a matter of worry for the developer but it is a thing Eclipse messes up internally and you can’t get it right after repeated tries. So what you are supposed to do to get out of this problem? Simplest solution &#8211; </p>
<blockquote><p>Clean install Eclipse, set Axis2 preferences once again to point to a clean fresh Axis2 directory inside Preferences &gt; Web-Services (the way you did with previous one) and there you go. No more problems which proves it was an error which had to do with Eclipse only.</p>
</blockquote>
<p>&#160;</p>
<p>Long way to go for Open Source. Oh yes, why long way because still it demands an out-of-world hardware configuration which can make a PC not just run but fly. Have you got a chance to run Eclipse on a system with 501 MB RAM, even if it was by a mistake? It was just a fantasy that I wanted to happen and when it happened, it turned out to be more like a tragedy than fantasy but then there is one thing common between both – they can never be forgotten!!</p>
&nbsp;&nbsp;<div class="meta"></div>]]></content:encoded>
			<wfw:commentRss>http://www.netgautam.com/wordpress/2008/11/17/eclipse-and-axis2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>max_allowed_packet and my.ini</title>
		<link>http://www.netgautam.com/wordpress/2008/02/01/max_allowed_packet-and-myini/</link>
		<comments>http://www.netgautam.com/wordpress/2008/02/01/max_allowed_packet-and-myini/#comments</comments>
		<pubDate>Fri, 01 Feb 2008 08:48:39 +0000</pubDate>
		<dc:creator>Nitesh Gautam</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming/Coding]]></category>

		<guid isPermaLink="false">http://www.netgautam.com/wordpress/2008/02/01/max_allowed_packet-and-myini/</guid>
		<description><![CDATA[There are two major issue with PHP, MySql and Apache combination when dealing with database dump or executing a SQL through phpMyAdmin &#8211; one that you are not allowed to upload a SQL file more than a specific limit and secondly, you keep getting following error again and again -


   1: MySQL Server [...]]]></description>
			<content:encoded><![CDATA[<p>There are two major issue with <a title="PHP" href="http://www.php.net/"><strong>PHP</strong></a><strong>, </strong><a title="MySql" href="http://www.mysql.com/"><strong>MySql</strong></a> and <a title="Apache" href="http://httpd.apache.org/"><strong>Apache</strong></a> combination when dealing with database dump or executing a SQL through <a title="phpMyAdmin" href="http://www.phpmyadmin.net/"><strong>phpMyAdmin</strong></a> &#8211; one that you are not allowed to upload a SQL file more than a specific limit and secondly, you keep getting following error again and again -</p>
<blockquote><div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> MySQL Server has gone Away - Error 2006</pre>
</p></div>
</p></div>
</blockquote>
<p>I am working on Windows Vista and using phpMyAdmin as interface to MySQL.</p>
<p>&#160;</p>
<p>To fix upload problem, you need to update <strong>upload_max_filesize</strong> variable inside <strong>php.ini</strong> file. By default, it is set to <strong>2M (2 MB)</strong>. I have changed it to <strong>170M</strong> in order to accompany the files I am dealing with.</p>
<p>&#160;</p>
<p>In order to keep MySQL functioning properly and not throwing errors like <strong>2006</strong> which comes up because of extremely large queries, set <strong>max_allowed_packet = 20M</strong> which is <strong>1M</strong> by default. You can check value of variable by executing following command on MySQL prompt -</p>
<blockquote>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> show variables like <span style="color: #006080">'max_allowed_packet'</span>;</pre>
</p></div>
</p></div>
</blockquote>
<p>&#160;</p>
<p>In addition, to save your session timing out quickly, you can also consider changing <strong>max_execution_time</strong> variable in <strong>php.ini</strong> and <strong>LoginCookieValidity</strong> inside <strong>config.inc.php</strong> of <strong>phpMyAdmin</strong>.</p>
<p>&#160;</p>
<p>There are more settings which can be referenced in order to keep all these things working properly. I am linking all the files with this post -</p>
<ul>
<li><a href="http://netgautam.com/wordpress/wp-content/uploads/2008/01/httpd.conf">httpd.conf</a></li>
<li><a href="http://netgautam.com/wordpress/wp-content/uploads/2008/01/my.ini">my.ini</a></li>
<li><a href="http://netgautam.com/wordpress/wp-content/uploads/2008/01/php.ini">php.ini</a></li>
<li><a href="http://netgautam.com/wordpress/wp-content/uploads/2008/01/config.inc.php">config.inc.php</a></li>
</ul>
&nbsp;&nbsp;<div class="meta"></div>]]></content:encoded>
			<wfw:commentRss>http://www.netgautam.com/wordpress/2008/02/01/max_allowed_packet-and-myini/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache Problem for Port 80</title>
		<link>http://www.netgautam.com/wordpress/2008/01/21/apache-problem-for-port-80/</link>
		<comments>http://www.netgautam.com/wordpress/2008/01/21/apache-problem-for-port-80/#comments</comments>
		<pubDate>Tue, 22 Jan 2008 02:53:34 +0000</pubDate>
		<dc:creator>Nitesh Gautam</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming/Coding]]></category>
		<category><![CDATA[Softwares]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://www.netgautam.com/wordpress/2008/01/21/apache-problem-for-port-80/</guid>
		<description><![CDATA[If you have installed or re-installed Apache server and you are facing error corresponding to port 80 specially when you think of yourself completely insane during installation, it is very possible that some other service is accessing Port 80. Following is the error message which appears while starting Apache as service or running httpd command [...]]]></description>
			<content:encoded><![CDATA[<p>If you have installed or re-installed <a title="Apache server" href="http://httpd.apache.org/">Apache server</a> and you are facing error corresponding to port 80 specially when you think of yourself completely insane during installation, it is very possible that some other service is accessing <a title="Port 80" href="http://en.wikipedia.org/wiki/Port_80">Port 80</a>. Following is the error message which appears while starting Apache as service or running httpd command from command prompt within Apache bin directory -</p>
<p>&#160;</p>
<blockquote><p>The Apache service named&#160; reported the following error:      <br />&gt;&gt;&gt; (OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted.&#160; : make_sock: could not bind to address 0.0.0.0:80</p>
</blockquote>
<p>In my case, I was running Skype which blocked port 80 and therefore, Apache wasn&#8217;t starting. Both Skype as well as Apache are justified in using same port as per its definition -</p>
<blockquote><p>Typically, an <strong>HTTP client</strong> initiates a request by establishing a <a href="http://en.wikipedia.org/wiki/Transmission_Control_Protocol">Transmission Control Protocol</a> (TCP) connection to a particular <a href="http://en.wikipedia.org/wiki/TCP_and_UDP_port">port</a> on a host (port 80 by default;</p>
</blockquote>
<p><a href="http://netgautam.com/wordpress/wp-content/uploads/2008/ApacheProblemforPort80_FFC4/ApacheHTTPD.jpg" onclick="return enlarge('http://www.netgautam.com/wordpress/wp-content/plugins/zap_imgpop/','http://netgautam.com/wordpress/wp-content/uploads/2008/ApacheProblemforPort80_FFC4/ApacheHTTPD.jpg','',event,300,75)"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="70" alt="Apache HTTPD" src="http://netgautam.com/wordpress/wp-content/uploads/2008/ApacheProblemforPort80_FFC4/ApacheHTTPD_thumb.jpg" width="640" border="0" /></a> </p>
<p><a title="Apache Lounge" href="http://www.apachelounge.com/">Apache Lounge</a> (The Apache Webmasters &amp; Programmers Community) is quite useful community to look out for resolution of most of your Apache related doubts, specially on Windows platform. The solution to above problem can be found at <a href="http://www.apachelounge.com/forum/viewtopic.php?p=4246">this thread</a>. There is another useful thread which details about problems faced while re-installing Apache guiding about un-installation procedure and then installation of apache and PHP along-with their consolidation. I faced this problem after the consolidation, so came across this thread too.</p>
&nbsp;&nbsp;<div class="meta"></div>]]></content:encoded>
			<wfw:commentRss>http://www.netgautam.com/wordpress/2008/01/21/apache-problem-for-port-80/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.692 seconds -->
