<?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>Ghattu&#039;s Technology Blog &#187; java</title>
	<atom:link href="http://ghattus.com/category/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://ghattus.com</link>
	<description>A blog about technology that I work on in my day to day job</description>
	<lastBuildDate>Thu, 03 Dec 2009 00:56:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Interview with Jython Lead</title>
		<link>http://ghattus.com/2009/10/21/interview-with-jython-lead/</link>
		<comments>http://ghattus.com/2009/10/21/interview-with-jython-lead/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 00:45:13 +0000</pubDate>
		<dc:creator>sghattu</dc:creator>
				<category><![CDATA[WebLogic]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jython]]></category>

		<guid isPermaLink="false">http://ghattus.com/?p=151</guid>
		<description><![CDATA[Just came across this excellent interview with Frank Wierzbicki, who now leads the Jython Development. Interview can be found here]]></description>
			<content:encoded><![CDATA[<p>Just came across this excellent interview with Frank Wierzbicki, who now leads the Jython Development.</p>
<p>Interview can be found <a href="http://www.thebitsource.com/2009/09/26/jython-programming-language-frank-wierzbicki/">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ghattus.com/2009/10/21/interview-with-jython-lead/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Find a class in plethora of jars in a directory with JarScan</title>
		<link>http://ghattus.com/2009/09/17/find-a-class-in-plethora-of-jars-in-a-directory-with-jarscan/</link>
		<comments>http://ghattus.com/2009/09/17/find-a-class-in-plethora-of-jars-in-a-directory-with-jarscan/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 15:31:48 +0000</pubDate>
		<dc:creator>sghattu</dc:creator>
				<category><![CDATA[WebLogic]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[JarScan]]></category>
		<category><![CDATA[Java Class]]></category>

		<guid isPermaLink="false">http://ghattus.com/?p=148</guid>
		<description><![CDATA[Recently I had to find a jar which contains a java class I was looking for. Previously I was using other utilities like Jarfinder, FindClass etc, but wasn&#8217;t very happy.  I found JarScan, which actually works very well and the best part is it is free!. As an example, Under WebLogic 10.0 installation I wanted to [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I had to find a jar which contains a java class I was looking for. Previously I was using other utilities like Jarfinder, FindClass etc, but wasn&#8217;t very happy. <span id="more-148"></span></p>
<p>I found <a href="http://www.inetfeedback.com/jarscan/">JarScan</a>, which actually works very well and the best part is it is free!. As an example, Under WebLogic 10.0 installation I wanted to find which jar contains the class javax.annotation.PostConstruct. With JarScan you will use,</p>
<blockquote><p>java -jar /tmp/jarscan.jar -dir /opt/WLPlatform/10.2 -class javax.annotation.PostConstruct</p></blockquote>
<p>This will return something like,</p>
<blockquote><p>===============================================<br />
Found: javax.annotation.PostConstruct<br />
Class: javax.annotation.PostConstruct<br />
Package: javax.annotation<br />
Library Name: javax.annotation_1.0.jar<br />
Library Path: /opt/WLPlatform/10.2/modules/javax.annotation_1.0.jar<br />
===============================================</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://ghattus.com/2009/09/17/find-a-class-in-plethora-of-jars-in-a-directory-with-jarscan/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jython 2.2 in WebLogic 11g</title>
		<link>http://ghattus.com/2009/08/21/jython-2-2-in-weblogic-11g/</link>
		<comments>http://ghattus.com/2009/08/21/jython-2-2-in-weblogic-11g/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 12:27:24 +0000</pubDate>
		<dc:creator>sghattu</dc:creator>
				<category><![CDATA[11g]]></category>
		<category><![CDATA[WebLogic]]></category>
		<category><![CDATA[fusion middleware]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jython]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[wlst]]></category>

		<guid isPermaLink="false">http://ghattus.com/?p=127</guid>
		<description><![CDATA[I just started playing around with WebLogic Server 11g and realised that Oracle has upgraded Jython from 2.1 to 2.2, very nice! For a brief description on what&#8217;s new with Jython 2.2 see my old post here. E:\WebLogic11g\Oracle\Middleware\wlserver_10.3\common\bin&#62;java org.python.util.jython Jython 2.2.1 on java1.6.0_05 &#62;&#62;&#62;]]></description>
			<content:encoded><![CDATA[<p>I just started playing around with WebLogic Server 11g and realised that Oracle has upgraded Jython from 2.1 to 2.2, very nice!</p>
<p><span id="more-127"></span></p>
<p>For a brief description on what&#8217;s new with Jython 2.2 see my old post <a href="http://ghattus.com/2007/08/jython-2-2-is-finally-here.html">here</a>.</p>
<blockquote><p>E:\WebLogic11g\Oracle\Middleware\wlserver_10.3\common\bin&gt;java org.python.util.jython<br />
<strong>Jython 2.2.1 on java1.6.0_05<br />
</strong>&gt;&gt;&gt;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://ghattus.com/2009/08/21/jython-2-2-in-weblogic-11g/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>WebLogic EmbeddedLDAP&#039;s MasterFirst Attribute saved my day!</title>
		<link>http://ghattus.com/2009/08/10/weblogic-embeddedldaps-masterfirst-attribute-saved-my-day/</link>
		<comments>http://ghattus.com/2009/08/10/weblogic-embeddedldaps-masterfirst-attribute-saved-my-day/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 16:43:47 +0000</pubDate>
		<dc:creator>sghattu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[WebLogic]]></category>
		<category><![CDATA[embeddedLdap]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[boot.properties]]></category>
		<category><![CDATA[MasterFirst]]></category>

		<guid isPermaLink="false">http://ghattus.com/?p=110</guid>
		<description><![CDATA[While provisioning WebLogic environments to a new infrastructure, recently we started experiencing a problem where the Managed Server had problems starting up. It consistently failed with the error shown below.  &#60;Aug 3, 2009 12:38:48 PM EDT&#62; &#60;Notice&#62; &#60;Security&#62; &#60;BEA-090082&#62; &#60;Security initializing using security realm myrealm.&#62; &#60;Aug 3, 2009 12:38:48 PM EDT&#62; &#60;Critical&#62; &#60;Security&#62; &#60;BEA-090402&#62; &#60;Authentication [...]]]></description>
			<content:encoded><![CDATA[<p>While provisioning WebLogic environments to a new infrastructure, recently we started experiencing a problem where the Managed Server had problems starting up. It consistently failed with the error shown below.<span id="more-110"></span></p>
<blockquote><p><em> &lt;Aug 3, 2009 12:38:48 PM EDT&gt; &lt;Notice&gt; &lt;Security&gt; &lt;BEA-090082&gt; &lt;Security initializing using security realm myrealm.&gt;<br />
&lt;Aug 3, 2009 12:38:48 PM EDT&gt; &lt;Critical&gt; &lt;Security&gt; &lt;BEA-090402&gt; &lt;Authentication denied: Boot identity not valid; The user name and/or password from the boot identity file (boot.properties) is not valid. The boot identity may have been changed since the boot identity file was created. Please edit and update the boot identity file with the proper values of username and password. The first time the updated boot identity file is used to start the server, these new values are encrypted.&gt;<br />
&lt;Aug 3, 2009 12:38:48 PM EDT&gt; &lt;Critical&gt; &lt;WebLogicServer&gt; &lt;BEA-000386&gt; &lt;Server subsystem failed. Reason: weblogic.security.SecurityInitializationException: Authentication denied: Boot identity not valid; The user name and/or password from the boot identity file (boot.properties) is not valid. The boot identity may have been changed since the boot identity file was created. Please edit and update the boot identity file with the proper values of username and password. The first time the updated boot identity file is used to start the server, these new values are encrypted.<br />
weblogic.security.SecurityInitializationException: Authentication denied: Boot identity not valid; The user name and/or password from the boot identity file (boot.properties) is not valid. The boot identity may have been changed since the boot identity file was created. Please edit and update the boot identity file with the proper values of username and password. The first time the updated boot identity file is used to start the server, these new values are encrypted.<br />
        at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.doBootAuthorization(CommonSecurityServiceManagerDelegateImpl.java:941)<br />
        at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.initialize(CommonSecurityServiceManagerDelegateImpl.java:1029)<br />
        at weblogic.security.service.SecurityServiceManager.initialize(SecurityServiceManager.java:854)<br />
        at weblogic.security.SecurityService.start(SecurityService.java:141)<br />
        at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)<br />
        Truncated. see log file for complete stacktrace<br />
&gt;<br />
&lt;Aug 3, 2009 12:38:48 PM EDT&gt; &lt;Notice&gt; &lt;WebLogicServer&gt; &lt;BEA-000365&gt; &lt;Server state changed to FAILED&gt;<br />
&lt;Aug 3, 2009 12:38:48 PM EDT&gt; &lt;Error&gt; &lt;WebLogicServer&gt; &lt;BEA-000383&gt; &lt;A critical service failed. The server will shut itself down&gt;<br />
&lt;Aug 3, 2009 12:38:48 PM EDT&gt; &lt;Notice&gt; &lt;WebLogicServer&gt; &lt;BEA-000365&gt; &lt;Server state changed to FORCE_SHUTTING_DOWN&gt;</em></p></blockquote>
<p>From the error message it looked like the boot.properties on the Managed Server does not have the right username and password, we made sure it was updated. Tried to re-start the server, same issue. We tried to delete the entire LDAP directory on the Managed Server side so that it syncs the latest from Admin Server which should not have any issues, but that didn&#8217;t work either.</p>
<p>Well, now we ran out of options and contacted Oracle Support, they looked at it and asked us to do a couple of other things which did not work either. Finally, before we escalated further Oracle Support Engineer asked us to try one more last thing that is to enable MasterFirst on EmbeddedLDAP. Honestly I never knew such attribute existed and the help for that attribute looks something like this.</p>
<blockquote><p><em>MasterFirst-Specifies whether a Managed Server should always connect to the embedded LDAP server on the Administration Server, instead of connecting to the local replicated LDAP server.</em></p></blockquote>
<p>Miraculously enabling this attribute did seem to work and the Managed Server started up happily without any issues. Now the question is, Why do we need to specifically enable this attribute when we do not have issues in other environments? The answer is we don&#8217;t know &#8220;yet&#8221;. We suspect its Network, but not entirely sure and we will find out very soon. But whatever it is &#8220;MasterFirst&#8221; did save my day and probably days!</p>
]]></content:encoded>
			<wfw:commentRss>http://ghattus.com/2009/08/10/weblogic-embeddedldaps-masterfirst-attribute-saved-my-day/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How are python.cachedir and the error &quot;*sys-package-mgr*: can&#039;t create package cache dir&quot; are related</title>
		<link>http://ghattus.com/2009/08/04/how-are-python-cachedir-and-the-error-sys-package-mgr-cant-create-package-cache-dir-are-related/</link>
		<comments>http://ghattus.com/2009/08/04/how-are-python-cachedir-and-the-error-sys-package-mgr-cant-create-package-cache-dir-are-related/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 10:50:02 +0000</pubDate>
		<dc:creator>sghattu</dc:creator>
				<category><![CDATA[WebLogic]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jython]]></category>
		<category><![CDATA[jython syntax]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[wlst]]></category>
		<category><![CDATA[/var/tmp]]></category>
		<category><![CDATA[cachedir]]></category>
		<category><![CDATA[ImportError]]></category>
		<category><![CDATA[sys-package-mgr]]></category>

		<guid isPermaLink="false">http://ghattus.com/?p=57</guid>
		<description><![CDATA[Resolving "*sys-package-mgr*: can't create package cache dir" errors with WLST]]></description>
			<content:encoded><![CDATA[<p>While starting <a href="http://edocs.bea.com/wls/docs91/config_scripting/index.html">WLST </a>or for that matter <a href="http://www.jython.org">Jython</a>, you might have seen this annoying error message,</p>
<blockquote><p>*sys-package-mgr*: can&#8217;t create package cache dir, &#8216;/tmp/cachedir/packages&#8217;<br />
Traceback (innermost last):<br />
File &#8220;&lt;iostream&gt;&#8221;, line 12, in ?<br />
ImportError: no module named java</p></blockquote>
<p><span id="more-57"></span></p>
<p>When Jython initializes it scans all the jar files it can find at startup to build the package and class structure available to the JVM. This information is written to files in a directory named &#8216;cachedir&#8217;, WLST chooses your &#8216;java.io.tmpdir&#8217; to store these files. There is a problem with this approach especially on Unix machines.</p>
<p><strong>Problem:</strong></p>
<p>Most Unix machines are shared across a number of users. Say &#8220;user1&#8243; first logs into the machine and fired up &#8216;java weblogic.WLST&#8217;, Jython will create the &#8216;cachedir&#8217; under <strong>&#8216;/var/tmp/&#8217;</strong> and this directory will be owned by &#8216;user1&#8242;. This user will have no problems using WLST. Now &#8216;user2&#8242; logs in and fires up WLST, this process will try to write to the same directory, <strong>&#8216;/var/tmp/cachedir&#8217;</strong> which is now owned by &#8216;user1&#8242; and hence fails with the above error message.</p>
<p><strong>Solution:</strong></p>
<p>There is a pretty simple and straight forward solution to this problem. Jython supports a System property (<strong>python.cachedir</strong>) that you can set which will determine the directory where this &#8216;cachedir&#8217; is created. So in our case to start WLST you will use,</p>
<blockquote><p>java -Dpython.cachedir=/home/user1 weblogic.WLST</p></blockquote>
<p>This will create the cachedir under /home/user1, and this way all users can have their own cachedir&#8217;s without running into each other. For a more elegant solution you can create a simple unix script that wraps the call to WLST and adding the right cachedir location per user. Sample is shown below,</p>
<blockquote><p>#!/bin/sh</p>
<p># Setup classpath, probably execute setDomainEnv.sh</p>
<p>java -Dpython.cachedir=~ weblogic.WLST</p></blockquote>
<p>As long as the<strong> &#8216;~&#8217;</strong> resolves properly to the home directory for the user executing WLST you will never have to worry about this &#8216;cachedir&#8217; related error messages.. <img src='http://ghattus.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://ghattus.com/2009/08/04/how-are-python-cachedir-and-the-error-sys-package-mgr-cant-create-package-cache-dir-are-related/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>My takeaways from Oracle Fusion Middleware 11g Forum</title>
		<link>http://ghattus.com/2009/07/29/my-takeaways-from-oracle-fusion-middleware-11g-forum/</link>
		<comments>http://ghattus.com/2009/07/29/my-takeaways-from-oracle-fusion-middleware-11g-forum/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 02:25:03 +0000</pubDate>
		<dc:creator>sghattu</dc:creator>
				<category><![CDATA[11g]]></category>
		<category><![CDATA[WebLogic]]></category>
		<category><![CDATA[WebLogic 10.3]]></category>
		<category><![CDATA[fusion middleware]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[weblogic server]]></category>
		<category><![CDATA[entrise manager]]></category>
		<category><![CDATA[fusion]]></category>
		<category><![CDATA[jdeveloper]]></category>
		<category><![CDATA[jrockit]]></category>
		<category><![CDATA[middleware]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://ghattus.com/?p=85</guid>
		<description><![CDATA[I attended the Oracle Fusion Middleware 11g Forum in Bridgewater, NJ. It was a pretty informational session and I got to talk directly to Oracle management about some questions I had regarding Oracle&#8217;s Portal and JVM Strategies.Here are my takeaway&#8217;s. WebLogic Server 10.3 MP1 is part of Fusion Middleware 11g. WebLogic Portal is NOT part [...]]]></description>
			<content:encoded><![CDATA[<p>I attended the <a href="http://ghattus.com/2009/07/oracle-fusion-middlware-11g-forum.html">Oracle Fusion Middleware 11g Forum</a> in Bridgewater, NJ. It was a pretty informational session and I got to talk directly to <a href="http://www.oracle.com">Oracle</a> management about some questions I had regarding Oracle&#8217;s Portal and JVM Strategies.<span id="more-85"></span>Here are my takeaway&#8217;s.</p>
<ul>
<li><a href="http://www.oracle.com/technology/products/weblogic/index.html">WebLogic Server 10.3 MP1</a> is part of Fusion Middleware 11g.</li>
<li><a href="http://www.oracle.com/technology/products/weblogic/portal/index.html">WebLogic Portal</a> is <strong>NOT</strong> part of the Oracle Fusion Middleware 11g. The portal product that is part of Fusion Middleware is Oracle WebCentre.</li>
<li>Oracle will continue to develop and innovate on WebLogic Portal and planning to release 11g version by the end of the year.</li>
<li><a href="http://www.oracle.com/technology/products/jrockit/index.html">JRockit </a>is the recommended JVM for Oracle Fusion Middleware 11g.</li>
<li>Oracle does not have any plans to merge Sun&#8217;s JVM and JRockit into one, both these JVM&#8217;s will be independent of each other.</li>
<li><a href="http://www.oracle.com/technology/products/jdev/index.html">JDeveloper </a>is the recommeded IDE for all products in the Fusion Middleware suite.</li>
<li>Oh lastly, <a href="http://www.oracle.com/technology/products/oem/index.html">Enterprise Manager</a> is the mother of all Managers and will be able to control the Universe.. <img src='http://ghattus.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://ghattus.com/2009/07/29/my-takeaways-from-oracle-fusion-middleware-11g-forum/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Default protocol in WebLogic and why is it important</title>
		<link>http://ghattus.com/2009/07/26/default-protocol-in-weblogic-and-why-is-it-important/</link>
		<comments>http://ghattus.com/2009/07/26/default-protocol-in-weblogic-and-why-is-it-important/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 21:17:12 +0000</pubDate>
		<dc:creator>sghattu</dc:creator>
				<category><![CDATA[WebLogic]]></category>
		<category><![CDATA[channel]]></category>
		<category><![CDATA[cluster]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jython]]></category>
		<category><![CDATA[weblogic server]]></category>
		<category><![CDATA[wlst]]></category>
		<category><![CDATA[protocol]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[t3]]></category>
		<category><![CDATA[t3s]]></category>

		<guid isPermaLink="false">http://ghattus.com/?p=55</guid>
		<description><![CDATA[It is a good practice to set the Default Protocol in WebLogic]]></description>
			<content:encoded><![CDATA[<p>If your WebLogic Server makes outbound connections to other systems it is wise to know what a DefaultProtocol is. Generally, when you create a WebLogic domain and haven&#8217;t configured SSL you will not have to do anything.<span id="more-55"></span></p>
<p>But once SSL is configured and you have dis-abled the non-ssl port, you should make sure that the DefaultProtocol your WebLogic Server uses is SSL (either t3s, https or iiops). If you haven&#8217;t done this, your WebLogic Server will try to use &#8220;t3&#8243; (default) for any outbound connections and since the ListenPort is disabled it will fail.</p>
<p>Here&#8217;s a simple wlst script to change the default protocol to t3s for all the servers in the domain.</p>
<blockquote><p># After connecting to the Admin Server</p>
<p>edit()</p>
<p>startEdit()</p>
<p>servers = cmo.getServers()</p>
<p>for i in servers:</p>
<p>i.setDefaultProtocol(&#8220;t3s&#8221;)</p>
<p>save()</p>
<p>activate()</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://ghattus.com/2009/07/26/default-protocol-in-weblogic-and-why-is-it-important/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>In case you run into this issue &#8230;</title>
		<link>http://ghattus.com/2006/02/18/in-case-you-run-into-this-issue/</link>
		<comments>http://ghattus.com/2006/02/18/in-case-you-run-into-this-issue/#comments</comments>
		<pubDate>Sun, 19 Feb 2006 03:10:00 +0000</pubDate>
		<dc:creator>sghattu</dc:creator>
				<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://ghattus.com/2006/02/in-case-you-run-into-this-issue/</guid>
		<description><![CDATA[While upgrading our WLS console to use the latest libraries i.e. to use the latest Struts, Beehive, WebLogic Portal versions. I ran into this problem that caught me completely off gaurd and took me a while to figure whats going on. Struts 1.2.7 distribution comes with commons logging 1.0.4 and log4j 1.2.8. Once I upgraded [...]]]></description>
			<content:encoded><![CDATA[<p>While upgrading our WLS console to use the latest libraries i.e. to use the latest Struts, Beehive, WebLogic Portal versions. I ran into this problem that caught me completely off gaurd and took me a while to figure whats going on. Struts 1.2.7 distribution comes with commons logging 1.0.4 and log4j 1.2.8. Once I upgraded our console to struts 1.2.7 and tried to deploy it to the server the deployment failed with the error below. </p>
<p><font color="#0000FF"><i>java.lang.NoSuchMethodError: isEnabledFor<br />······at org.apache.commons.logging.impl.Log4JCategoryLog.isErrorEnabled(Log4JCategoryLog.java:189)<br />······at org.apache.beehive.netui.util.logging.Logger.isErrorEnabled(Logger.java:97)<br />······at org.apache.beehive.netui.pageflow.internal.AdapterManager.getServletContainerAdapter(AdapterManager.java:47)<br />······at org.apache.beehive.netui.pageflow.PageFlowUtils.createURLTemplatesFactory(PageFlowUtils.java:1716)</i></font></p>
<p>Well,  initially I thought this is caused due to another version of commons-logging.jar lurking around somewhere in the system classpath and is being picked up by the  application. But after carefully reviewing the classpath and other libraries in the application I did not find any foul play, this just drove me crazy. Thought I would instrument the Log4JCategoryLog class to see what methods it is seeing in &#8220;org.apache.log4j.Category&#8221; that is making it to fail with NSME. After compiling and re-packaging it in commons-logging.jar to my surprise everything worked as normal. I could see my debug output that I put in while instrumenting Log4jCategoryLog. At this point it made me think if the class file packaged in commons-logging.jar is erroneous. To prove that I had to isolate the problem to just commons-logging and log4j. Thanks to another colleague, this simple reproducer revealed the issue. </p>
<p><font color="#0000FF"><i>public class Foo {<br />···// Ensure that your classpath has commons-logging-1.0.4.jar and log4j-1.2.8.jar<br />···public static void main(String[] args) {<br />······org.apache.commons.logging.impl.Log4JCategoryLog x = new org.apache.commons.logging.impl.Log4JCategoryLog();<br />······x.isErrorEnabled();<br />···}<br />}</i></font></p>
<p>This simple client failed with the exact same error I was seeing while deploying the console. I believe the problem is the classes in commons-logging-1.0.4 that come from apache have been compiled with the wrong log4j Category class.<br />If you do javap -c org.apache.commons.logging.impl.Log4JCategoryLog with commons-logging-1.0.4.jar in classpath you will see that for isErrorEnabled method,</p>
<p><i>public boolean isErrorEnabled();<br />  Code:<br />   0: aload_0<br />   1: getfield #7; //Field category:Lorg/apache/log4j/Category;<br />   4: getstatic #14; //Field org/apache/log4j/Level.ERROR:Lorg/apache/log4j/Level;<br />   <font color="#800080">7: invokevirtual #17; //Method org/apache/log4j/Category.isEnabledFor:(Lorg/apache/log4j/Level;)Z<br /></font>   10: ireturn</i></p>
<p>Here the log4j&#8217;s Category&#8217;s isEnabledFor takes Level as an argument, but Log4JCategoryLog is expecting an object of type Priority. If I re-compile Log4JCategoryLog and re-package it and do a javap -c on the class I get, </p>
<p><i>public boolean isErrorEnabled();<br />  Code:<br />   0: aload_0<br />   1: getfield #2; //Field category:Lorg/apache/log4j/Category;<br />   4: getstatic #9; //Field org/apache/log4j/Priority.ERROR:Lorg/apache/log4j/Priority;<br />   <font color="#800080">7: invokevirtual #12; //Method org/apache/log4j/Category.isEnabledFor:(Lorg/apache/log4j/Priority;)Z<br /></font>  10: ireturn</i></p>
<p>As you see the log4j&#8217;s Category&#8217;s isEnabledFor method takes an object of type Priority as an argument which is right. After googling a little bit I found that this has been corrected with the new commons-logging jar available at http://www.ibiblio.org/maven/commons-logging/jars/commons-logging-1.1-dev.jar.</p>
<p>_uacct = &#8220;UA-2684269-2&#8243;;<br />urchinTracker();</p>
]]></content:encoded>
			<wfw:commentRss>http://ghattus.com/2006/02/18/in-case-you-run-into-this-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
