<?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>blog.watashii &#187; Programming</title>
	<atom:link href="http://blog.watashii.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.watashii.com</link>
	<description></description>
	<lastBuildDate>Wed, 02 Nov 2011 02:23:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Linux Installing and Uninstalling RPM Packages</title>
		<link>http://blog.watashii.com/2011/11/linux-installing-and-uninstalling-rpm-packages/</link>
		<comments>http://blog.watashii.com/2011/11/linux-installing-and-uninstalling-rpm-packages/#comments</comments>
		<pubDate>Wed, 02 Nov 2011 02:22:04 +0000</pubDate>
		<dc:creator>watashii</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[rpm]]></category>

		<guid isPermaLink="false">http://blog.watashii.com/?p=557</guid>
		<description><![CDATA[Installing a package on Linux:  (Eg, MQSeriesRuntime-7.0.1-3.x86_64.rpm) $ rpm -ivh MQSeriesRuntime-7.0.1-3.x86_64.rpm Verify the package installed:  (The architecture x86_64 name is not required) $ rpm -qa MQSeriesRuntime-7.0.1-3 Uninstall the package: $ rpm -e MQSeriesRuntime-7.0.1-3 Note: Sudo maybe required for install, in this case, run sudo rpm &#8230;]]></description>
			<content:encoded><![CDATA[<p><img class="size-full wp-image-559 alignnone aligncenter" title="rpm-package" src="http://blog.watashii.com/wp-content/uploads/2011/11/rpm-package.png" alt="" width="180" height="179" /></p>
<p>Installing a package on Linux:  (Eg, MQSeriesRuntime-7.0.1-3.x86_64.rpm)</p>
<p><code>$ rpm -ivh MQSeriesRuntime-7.0.1-3.x86_64.rpm</code></p>
<p>Verify the package installed:  (The architecture x86_64 name is not required)</p>
<p><code>$ rpm -qa MQSeriesRuntime-7.0.1-3</code></p>
<p>Uninstall the package:</p>
<p><code>$ rpm -e MQSeriesRuntime-7.0.1-3</code></p>
<p>Note: Sudo maybe required for install, in this case, run <em>sudo rpm &#8230;</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.watashii.com/2011/11/linux-installing-and-uninstalling-rpm-packages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle SQLPlus Query Output to a File</title>
		<link>http://blog.watashii.com/2011/02/oracle-sqlplus-query-output-to-a-file/</link>
		<comments>http://blog.watashii.com/2011/02/oracle-sqlplus-query-output-to-a-file/#comments</comments>
		<pubDate>Fri, 25 Feb 2011 03:48:04 +0000</pubDate>
		<dc:creator>watashii</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[log]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[sqlplus]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://blog.watashii.com/?p=548</guid>
		<description><![CDATA[Here is a simple way to output SQL query output into a file, via command line based SQLPlus. Step 1: Nominate the output file location. In this case this is a Unix location. SQL&#62; spool /tmp/output.txt Step 2: Perform your SQL query. SQL&#62; select * from tab; Step 3: Close the file. SQL&#62; spool off [...]


Related Posts:<ol><li><a href='http://blog.watashii.com/2010/11/starting-shutdown-oracle-database-in-unix/' rel='bookmark' title='Permanent Link: Starting / Shutdown Oracle Database in Unix'>Starting / Shutdown Oracle Database in Unix</a></li>
<li><a href='http://blog.watashii.com/2008/08/oracle-sql-loader-importing-csv-files-into-a-table/' rel='bookmark' title='Permanent Link: Oracle SQL Loader &#8211; Importing CSV files to a table'>Oracle SQL Loader &#8211; Importing CSV files to a table</a></li>
<li><a href='http://blog.watashii.com/2008/08/unix-file-size-listing-du-command/' rel='bookmark' title='Permanent Link: UNIX file size listing &#8211; du command'>UNIX file size listing &#8211; du command</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.watashii.com/wp-content/uploads/2010/11/oraclelogo.jpg"><img class="alignnone size-full wp-image-496" title="oraclelogo" src="http://blog.watashii.com/wp-content/uploads/2010/11/oraclelogo.jpg" alt="" width="220" height="100" /></a></p>
<p>Here is a simple way to output SQL query output into a file, via command line based SQLPlus.</p>
<h5><strong>Step 1:</strong> Nominate the output file location. In this case this is a Unix location.</h5>
<p><code>SQL&gt; spool /tmp/output.txt</code></p>
<h5><strong>Step 2:</strong> Perform your SQL query.</h5>
<p><code>SQL&gt; select * from tab;</code></p>
<h5><strong>Step 3:</strong> Close the file.</h5>
<p><code>SQL&gt; spool off</code></p>
<h5><strong>Tip:</strong> Use <strong><em>set lines</em></strong> statement to adjust output display</h5>
<p><span id="more-548"></span></p>
<p>The other method is doing this outside of SQLPlus in a single command.  Within the Unix shell, you can write your SQL query statements within an input sql file; eg <em>input.sql</em>, and redirect the output to <em>output.txt</em>.</p>
<p><code># sqlplus USER/PASS@DBSID &lt; /tmp/input.sql &gt; /tmp/output.txt</code></p>


<p>Related Posts:<ol><li><a href='http://blog.watashii.com/2010/11/starting-shutdown-oracle-database-in-unix/' rel='bookmark' title='Permanent Link: Starting / Shutdown Oracle Database in Unix'>Starting / Shutdown Oracle Database in Unix</a></li>
<li><a href='http://blog.watashii.com/2008/08/oracle-sql-loader-importing-csv-files-into-a-table/' rel='bookmark' title='Permanent Link: Oracle SQL Loader &#8211; Importing CSV files to a table'>Oracle SQL Loader &#8211; Importing CSV files to a table</a></li>
<li><a href='http://blog.watashii.com/2008/08/unix-file-size-listing-du-command/' rel='bookmark' title='Permanent Link: UNIX file size listing &#8211; du command'>UNIX file size listing &#8211; du command</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.watashii.com/2011/02/oracle-sqlplus-query-output-to-a-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install &amp; Uninstall Probes/Gateways on Netcool Omnibus</title>
		<link>http://blog.watashii.com/2011/01/install-uninstall-probesgateways-on-netcool-omnibus/</link>
		<comments>http://blog.watashii.com/2011/01/install-uninstall-probesgateways-on-netcool-omnibus/#comments</comments>
		<pubDate>Fri, 14 Jan 2011 05:56:06 +0000</pubDate>
		<dc:creator>watashii</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[netcool]]></category>
		<category><![CDATA[omnibus]]></category>
		<category><![CDATA[probes]]></category>
		<category><![CDATA[tivoli]]></category>

		<guid isPermaLink="false">http://blog.watashii.com/?p=516</guid>
		<description><![CDATA[Installing probes &#38; gateway for Netcool/Omnibus 7.2 and below (ie prior to 7.3) is done by using the nco_patch patch tool over an existing Netcool Omnibus installation, with the un-tarred path of the patch (Unix): $ $NCHOME/omnibus/install/nco_patch -install /tmp/probe-nco-p-mttrapd-9_0/patch/probe-nco-p-mttrapd-9_0/ To list all the patch (ids) that has been already applied to the installation, run the [...]


Related Posts:<ol><li><a href='http://blog.watashii.com/2008/07/netcoolomnibus-replay-raw-capture-alarms/' rel='bookmark' title='Permanent Link: Netcool/OMNIbus &#8211; Replay raw capture alarms'>Netcool/OMNIbus &#8211; Replay raw capture alarms</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://blog.watashii.com/wp-content/uploads/2011/01/IBM_Tivoli.gif"><img class="size-full wp-image-517 aligncenter" title="IBM_Tivoli" src="http://blog.watashii.com/wp-content/uploads/2011/01/IBM_Tivoli.gif" alt="" width="163" height="84" /></a></p>
<p>Installing probes &amp; gateway for Netcool/Omnibus 7.2 and below (ie prior to 7.3) is done by using the <em>nco_patch</em> patch tool over an existing Netcool Omnibus installation, with the un-tarred path of the patch (Unix):</p>
<p><code>$ $NCHOME/omnibus/install/nco_patch -install /tmp/probe-nco-p-mttrapd-9_0/patch/probe-nco-p-mttrapd-9_0/</code></p>
<p>To list all the patch (ids) that has been already applied to the installation, run the following command:</p>
<p><code>$ $NCHOME/omnibus/install/nco_patch -print=id<br />
gateway-nco-g-oracle-4_0<br />
gateway-nco-g-remedy-8_0<br />
probe-nco-p-mttrapd-9_0</code></p>
<p>To remove/uninstall the probe, we use the same <em>nco_patch</em> tool with the patch id :</p>
<p><code>$ $NCHOME/omnibus/install/nco_patch -remove probe-nco-p-mttrapd-9_0</code></p>


<p>Related Posts:<ol><li><a href='http://blog.watashii.com/2008/07/netcoolomnibus-replay-raw-capture-alarms/' rel='bookmark' title='Permanent Link: Netcool/OMNIbus &#8211; Replay raw capture alarms'>Netcool/OMNIbus &#8211; Replay raw capture alarms</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.watashii.com/2011/01/install-uninstall-probesgateways-on-netcool-omnibus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XHTML 1.0 Validation Error for JSF ViewState</title>
		<link>http://blog.watashii.com/2011/01/xhtml-1-0-validation-error-for-jsf-viewstate/</link>
		<comments>http://blog.watashii.com/2011/01/xhtml-1-0-validation-error-for-jsf-viewstate/#comments</comments>
		<pubDate>Fri, 14 Jan 2011 00:31:52 +0000</pubDate>
		<dc:creator>watashii</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jsf]]></category>
		<category><![CDATA[validation]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://blog.watashii.com/?p=505</guid>
		<description><![CDATA[When the &#60;h:form&#62; tag is used in JSF, the ViewState hidden input tag is generated in the XHTML page.  However this generates an autocomplete attribute which is an invalid XHTML 1.0 (Strict/Transitional) markup. For example, &#60;/h:form&#62; generates HTML: &#60;input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="- 6404534196831258579:5309910132795514750" autocomplete="off" /&#62; &#60;/form&#62; Gives the following validation error (http://validator.w3.org/check): there is [...]


Related Posts:<ol><li><a href='http://blog.watashii.com/2010/06/getting-the-httpservletrequest-from-portletrequest-object/' rel='bookmark' title='Permanent Link: Getting the HttpServletRequest from PortletRequest Object'>Getting the HttpServletRequest from PortletRequest Object</a></li>
<li><a href='http://blog.watashii.com/2010/06/java-send-email-in-a-jar/' rel='bookmark' title='Permanent Link: Java Send Email (In a Jar)'>Java Send Email (In a Jar)</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.watashii.com/wp-content/uploads/2011/01/jsfxhtmlvalidation.png"><img class="alignnone size-full wp-image-506" title="jsfxhtmlvalidation" src="http://blog.watashii.com/wp-content/uploads/2011/01/jsfxhtmlvalidation.png" alt="" width="500" height="238" /></a></p>
<p>When the <em>&lt;h:form&gt;</em> tag is used in JSF, the ViewState hidden input tag is generated in the XHTML page.  However this generates an <em>autocomplete </em>attribute which is an invalid XHTML 1.0 (Strict/Transitional) markup.</p>
<p><span id="more-505"></span>For example, <em>&lt;/h:form&gt;</em> generates HTML:</p>
<pre><code> &lt;input type="hidden" name="javax.faces.ViewState"
 id="javax.faces.ViewState" value="-
 6404534196831258579:5309910132795514750"
 autocomplete="off" /&gt;
&lt;/form&gt;</code></pre>
<p>Gives the following validation error (<a href="http://validator.w3.org/check" target="_blank">http://validator.w3.org/check</a>):</p>
<pre><code>there is no attribute "autocomplete"
…="javax.faces.ViewState" autocomplete="off" value="-6404534196831258579:53099…
You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element.</code></pre>
<p>To remove the autocomplete attribute, we add the following configuration in <em>web.xml</em> file:</p>
<pre><code>&lt;context-param&gt;
&lt;param-name&gt;com.sun.faces.autoCompleteOffOnViewState&lt;/param-name&gt;
&lt;param-value&gt;false&lt;/param-value&gt;
&lt;/context-param&gt;</code></pre>


<p>Related Posts:<ol><li><a href='http://blog.watashii.com/2010/06/getting-the-httpservletrequest-from-portletrequest-object/' rel='bookmark' title='Permanent Link: Getting the HttpServletRequest from PortletRequest Object'>Getting the HttpServletRequest from PortletRequest Object</a></li>
<li><a href='http://blog.watashii.com/2010/06/java-send-email-in-a-jar/' rel='bookmark' title='Permanent Link: Java Send Email (In a Jar)'>Java Send Email (In a Jar)</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.watashii.com/2011/01/xhtml-1-0-validation-error-for-jsf-viewstate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Starting / Shutdown Oracle Database in Unix</title>
		<link>http://blog.watashii.com/2010/11/starting-shutdown-oracle-database-in-unix/</link>
		<comments>http://blog.watashii.com/2010/11/starting-shutdown-oracle-database-in-unix/#comments</comments>
		<pubDate>Tue, 30 Nov 2010 02:40:42 +0000</pubDate>
		<dc:creator>watashii</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[shutdown]]></category>
		<category><![CDATA[startup]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://blog.watashii.com/?p=497</guid>
		<description><![CDATA[This simple guide to shows how to start /stop your Oracle database from Unix.  You must have logon access to do this. Step 1 Unix login as oracle (usually the user that installed the database) Step 2 Make sure your environment variables are set, eg: ORACLE_SID=MYDBSID ORACLE_BASE=/opt/oracle ORACLE_HOME=/opt/oracle/product/11.2.0/dbhome_1 LD_LIBRARY_PATH=/opt/oracle/product/11.2.0/dbhome_1/lib PATH=/usr/bin:/usr/sbin:/usr/ucb:/usr/local:/usr/local/bin:/usr/local/sbin:/opt/oracle/product/11.2.0/dbhome_1/bin Step 3 &#8211; Start DB [...]


Related Posts:<ol><li><a href='http://blog.watashii.com/2009/11/oracle-timezone-conversions-gmt-to-localtime/' rel='bookmark' title='Permanent Link: Oracle Timezone Conversions &#8211; GMT to localtime (and back)'>Oracle Timezone Conversions &#8211; GMT to localtime (and back)</a></li>
<li><a href='http://blog.watashii.com/2008/08/oracle-sql-loader-importing-csv-files-into-a-table/' rel='bookmark' title='Permanent Link: Oracle SQL Loader &#8211; Importing CSV files to a table'>Oracle SQL Loader &#8211; Importing CSV files to a table</a></li>
<li><a href='http://blog.watashii.com/2011/02/oracle-sqlplus-query-output-to-a-file/' rel='bookmark' title='Permanent Link: Oracle SQLPlus Query Output to a File'>Oracle SQLPlus Query Output to a File</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.watashii.com/wp-content/uploads/2010/11/oraclelogo.jpg"><img class="alignnone size-full wp-image-496" title="oraclelogo" src="http://blog.watashii.com/wp-content/uploads/2010/11/oraclelogo.jpg" alt="" width="220" height="100" /></a></p>
<p>This simple guide to shows how to start /stop your Oracle database from Unix.  You must have logon access to do this.</p>
<h3>Step 1</h3>
<p>Unix login as <strong><em>oracle </em></strong>(usually the user that installed the database)</p>
<h3>Step 2</h3>
<p>Make sure your environment variables are set, eg:</p>
<pre><code>ORACLE_SID=<em>MYDBSID</em>
ORACLE_BASE=/opt/oracle
ORACLE_HOME=/opt/oracle/product/11.2.0/dbhome_1
LD_LIBRARY_PATH=/opt/oracle/product/11.2.0/dbhome_1/lib
PATH=/usr/bin:/usr/sbin:/usr/ucb:/usr/local:/usr/local/bin:/usr/local/sbin:/opt/oracle/product/11.2.0/dbhome_1/bin</code></pre>
<h3>Step 3 &#8211; Start DB Instance</h3>
<p>On the Unix command line, run <strong><em>sqlplus </em></strong>with <strong><em>sysdba</em></strong>, and simply type <strong><em>startup </em></strong>in the prompt to start it up.</p>
<pre><code>oracle@db-srv-01 % sqlplus '/ as sysdba'

SQL*Plus: Release 11.2.0.1.0 Production on Tue Nov 30 12:06:47 2010

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to an idle instance.

SQL&gt; startup
ORACLE instance started.

Total System Global Area 3207790592 bytes
Fixed Size                  2152368 bytes
Variable Size            2449475664 bytes
Database Buffers          738197504 bytes
Redo Buffers               17965056 bytes
Database mounted.
Database opened.</code></pre>
<h3>Step 4 &#8211; Start Listener</h3>
<p>To start the oracle listener (assuming listener.ora is setup), run <strong><em>lsnrctl start</em></strong></p>
<pre><code>oracle@db-srv-01 % lsnrctl start

LSNRCTL for Solaris: Version 11.2.0.1.0 - Production on 30-NOV-2010 12:00:34

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Starting /opt/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Solaris: Version 11.2.0.1.0 - Production
System parameter file is /opt/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /opt/oracle/diag/tnslsnr/db-srv-01/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=db-srv-01)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=db-srv-01)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Solaris: Version 11.2.0.1.0 - Production
Start Date                30-NOV-2010 12:00:35
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /opt/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /opt/oracle/diag/tnslsnr/db-srv-01/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=db-srv-01)(PORT=1521)))
The listener supports no services
The command completed successfully</code></pre>
<h3>Step 4 &#8211; Shutdown</h3>
<p>Similarly, to shutdown the instance, type <strong><em>shudown normal</em></strong> within <strong><em>sqlplus</em></strong>.</p>
<p>Stop the listener, by running <strong><em>lsnrctl stop</em></strong></p>


<p>Related Posts:<ol><li><a href='http://blog.watashii.com/2009/11/oracle-timezone-conversions-gmt-to-localtime/' rel='bookmark' title='Permanent Link: Oracle Timezone Conversions &#8211; GMT to localtime (and back)'>Oracle Timezone Conversions &#8211; GMT to localtime (and back)</a></li>
<li><a href='http://blog.watashii.com/2008/08/oracle-sql-loader-importing-csv-files-into-a-table/' rel='bookmark' title='Permanent Link: Oracle SQL Loader &#8211; Importing CSV files to a table'>Oracle SQL Loader &#8211; Importing CSV files to a table</a></li>
<li><a href='http://blog.watashii.com/2011/02/oracle-sqlplus-query-output-to-a-file/' rel='bookmark' title='Permanent Link: Oracle SQLPlus Query Output to a File'>Oracle SQLPlus Query Output to a File</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.watashii.com/2010/11/starting-shutdown-oracle-database-in-unix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setup Hibernate Log4j on Eclipse (Basic Tutorial)</title>
		<link>http://blog.watashii.com/2010/10/setup-hibernate-log4j-on-eclipse-basic-tutorial/</link>
		<comments>http://blog.watashii.com/2010/10/setup-hibernate-log4j-on-eclipse-basic-tutorial/#comments</comments>
		<pubDate>Mon, 18 Oct 2010 06:31:52 +0000</pubDate>
		<dc:creator>watashii</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[hibernate]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[log4j]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[slf4j]]></category>

		<guid isPermaLink="false">http://blog.watashii.com/?p=450</guid>
		<description><![CDATA[Download the Libraries Hibernate Download the Hibernate release bundle.  I&#8217;m using 3.5.6 Final.  Manually extract the following files from the downloaded zip/tar.gz archive: - hibernate-distribution-3.5.6-Final\lib\required\antlr-2.7.6.jar - hibernate-distribution-3.5.6-Final\lib\required\commons-collections-3.1.jar - hibernate-distribution-3.5.6-Final\lib\required\dom4j-1.6.1.jar - hibernate-distribution-3.5.6-Final\lib\required\javassist-3.9.0.GA.jar - hibernate-distribution-3.5.6-Final\lib\required\jta-1.1.jar - hibernate-distribution-3.5.6-Final\lib\required\slf4j-api-1.5.8.jar Grabbed the JPA library so I can use annotations with my Hibernate: - hibernate-distribution-3.5.6-Final\lib\jpa\hibernate-jpa-2.0-api-1.0.0.Final.jar I also grabbed a sample log4j.properties [...]


Related Posts:<ol><li><a href='http://blog.watashii.com/2010/06/java-send-email-in-a-jar/' rel='bookmark' title='Permanent Link: Java Send Email (In a Jar)'>Java Send Email (In a Jar)</a></li>
<li><a href='http://blog.watashii.com/2010/07/subversion-allow-author-name-logging/' rel='bookmark' title='Permanent Link: Subversion &#8211; Allow Author Name Logging'>Subversion &#8211; Allow Author Name Logging</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<h2><a href="http://blog.watashii.com/wp-content/uploads/2010/10/hibernatelog4j-00.png"><img class="alignnone size-full wp-image-456" title="hibernatelog4j-00" src="http://blog.watashii.com/wp-content/uploads/2010/10/hibernatelog4j-00.png" alt="" width="312" height="92" /></a></h2>
<h3>Download the Libraries</h3>
<p><span style="text-decoration: underline;"><strong>Hibernate</strong></span></p>
<p>Download the <a href="http://www.hibernate.org/downloads.html" target="_blank">Hibernate</a> release bundle.  I&#8217;m using <a href="http://sourceforge.net/projects/hibernate/files/hibernate3/">3.5.6 Final</a>.  Manually extract the following files from the downloaded zip/tar.gz archive:</p>
<ul>
<li>- hibernate-distribution-3.5.6-Final\lib\required\antlr-2.7.6.jar</li>
<li>- hibernate-distribution-3.5.6-Final\lib\required\commons-collections-3.1.jar</li>
<li>- hibernate-distribution-3.5.6-Final\lib\required\dom4j-1.6.1.jar</li>
<li>- hibernate-distribution-3.5.6-Final\lib\required\javassist-3.9.0.GA.jar</li>
<li>- hibernate-distribution-3.5.6-Final\lib\required\jta-1.1.jar</li>
<li>- hibernate-distribution-3.5.6-Final\lib\required\slf4j-api-1.5.8.jar</li>
</ul>
<p>Grabbed the JPA library so I can use annotations with my Hibernate:</p>
<ul>
<li>- hibernate-distribution-3.5.6-Final\lib\jpa\hibernate-jpa-2.0-api-1.0.0.Final.jar</li>
</ul>
<p>I also grabbed a sample log4j.properties file from the tutorials section:</p>
<ul>
<li>- hibernate-distribution-3.5.6-Final\project\tutorials\web\src\main\resources\log4j.properties</li>
</ul>
<p><span style="text-decoration: underline;"><strong>SLF4J</strong></span></p>
<p>Download <a href="http://www.slf4j.org/download.html" target="_blank">SLF4J</a>.  I downloaded slf4j 1.5.8 because Hibernate uses this version for its logging.  In order to use your chosen logging framework, i.e. Log4j,  manually extract the following files from the downloaded zip/tar.gz archive:</p>
<ul>
<li>- slf4j-1.5.8\slf4j-log4j12-1.5.8.jar</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Log4J</strong></span></p>
<p>Download <a href="http://logging.apache.org/log4j/1.2/download.html" target="_blank">Apache Log4J</a>.  I&#8217;m using the latest version, log4j 1.2.16.  Manually extract the following files from the downloaded zip/tar.gz archive:</p>
<ul>
<li>- apache-log4j-1.2.16\log4j-1.2.16.jar</li>
</ul>
<p><span id="more-450"></span></p>
<h3>Setting Up Eclipse</h3>
<p>Step 1) Go to workbench and create a new Java project, i.e. &#8216;<em>MyHibernateProject</em>&#8216;. A <em>src </em>directory will be used as  the source directory for our own Java classes.</p>
<p><a href="http://blog.watashii.com/wp-content/uploads/2010/10/hibernatelog4j-01.png"><img class="alignnone size-full wp-image-451" title="hibernatelog4j-01" src="http://blog.watashii.com/wp-content/uploads/2010/10/hibernatelog4j-01.png" alt="" width="333" height="168" /></a></p>
<p>Step 2) Right click on the project and select: <em>Build Path</em> &gt;<em> Configure Build Path&#8230;</em></p>
<p><a href="http://blog.watashii.com/wp-content/uploads/2010/10/hibernatelog4j-02.png"><img class="alignnone size-full wp-image-452" title="hibernatelog4j-02" src="http://blog.watashii.com/wp-content/uploads/2010/10/hibernatelog4j-02.png" alt="" width="535" height="369" /></a></p>
<p>Step 3) Under <em>Libraries </em>tab, click <em>Add Library</em> &gt; <em>User Library</em> &gt; <em>User Libraries&#8230;</em> &gt; <em>New&#8230; </em>&gt; and name it &#8216;<em>Hibernate</em>&#8216;.  Click on <em>Add JARs&#8230;</em> to add all the JAR files we manually extracted previously.  You can also separate the logging jar files into another user library if you wish &#8211; up to you.</p>
<p><a href="http://blog.watashii.com/wp-content/uploads/2010/10/hibernatelog4j-03.png"><img class="alignnone size-full wp-image-458" title="hibernatelog4j-03" src="http://blog.watashii.com/wp-content/uploads/2010/10/hibernatelog4j-03.png" alt="" width="535" height="383" /></a></p>
<p>Step 4) Right click on the Java project to create a New Folder named &#8216;<em>resources</em>&#8216;.  Right click on the new folder and select <em>Build Path</em> &gt;<em> Use as Source Folder</em>.</p>
<p><a href="http://blog.watashii.com/wp-content/uploads/2010/10/hibernatelog4j-04.png"><img class="alignnone size-full wp-image-459" title="hibernatelog4j-04" src="http://blog.watashii.com/wp-content/uploads/2010/10/hibernatelog4j-04.png" alt="" width="354" height="376" /></a></p>
<p>Step 5) You can now place all your Hibernate configuration files, hbm/xml files, and <em>log4j.properties</em> file under the resources folder.</p>


<p>Related Posts:<ol><li><a href='http://blog.watashii.com/2010/06/java-send-email-in-a-jar/' rel='bookmark' title='Permanent Link: Java Send Email (In a Jar)'>Java Send Email (In a Jar)</a></li>
<li><a href='http://blog.watashii.com/2010/07/subversion-allow-author-name-logging/' rel='bookmark' title='Permanent Link: Subversion &#8211; Allow Author Name Logging'>Subversion &#8211; Allow Author Name Logging</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.watashii.com/2010/10/setup-hibernate-log4j-on-eclipse-basic-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unix Bash Coloured Prompts</title>
		<link>http://blog.watashii.com/2010/09/unix-bash-coloured-prompts/</link>
		<comments>http://blog.watashii.com/2010/09/unix-bash-coloured-prompts/#comments</comments>
		<pubDate>Fri, 03 Sep 2010 07:15:28 +0000</pubDate>
		<dc:creator>watashii</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[bashrc]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[profile]]></category>
		<category><![CDATA[prompt]]></category>

		<guid isPermaLink="false">http://blog.watashii.com/?p=440</guid>
		<description><![CDATA[To display coloured prompts upon user login (on Unix Bash shell, PuTTY client), perform the following modifications: Unix login and open the user&#8217;s profile in the home directory, eg /home/username/.profile In the .profile, add the following entry in a new line to execute the bash shell upon login, eg /usr/bin/bash The bash shell will refer [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.watashii.com/wp-content/uploads/2010/09/bash_coloured_prompt.png"><img class="alignnone size-full wp-image-441" title="bash_coloured_prompt" src="http://blog.watashii.com/wp-content/uploads/2010/09/bash_coloured_prompt.png" alt="" /></a></p>
<p>To display coloured prompts upon user login (on Unix Bash shell, PuTTY client), perform the following modifications:</p>
<ol>
<li>Unix login and open the user&#8217;s profile in the home directory, eg <em>/home/username/.profile</em></li>
<li>In the <em>.profile</em>, add the following entry in a new line to execute the bash shell upon login, eg <em>/usr/bin/bash</em></li>
<li>The bash shell will refer to a <em>.bashrc</em> file.  If its not there, create it,  eg <em>/home/username/.bashrc</em></li>
<li>Add following entries in the <em>.bashrc</em> to enable the coloured prompt; showing the username, hostname and working directory:<br />
<code># Colored Prompts<br />
STARTGREEN='\[\e[0;32m\]';<br />
STARTBLUE='\[\e[1;34m\]';<br />
ENDCOLOR="\[\e[0m\]";<br />
PS1="$STARTGREEN\u@\h$ENDCOLOR:$STARTBLUE\w$ENDCOLOR $ ";</code></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.watashii.com/2010/09/unix-bash-coloured-prompts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Weblogic Portal &#8211; Create Streaming Desktop Page Definition Error</title>
		<link>http://blog.watashii.com/2010/08/weblogic-portal-create-streaming-desktop-page-definition-error/</link>
		<comments>http://blog.watashii.com/2010/08/weblogic-portal-create-streaming-desktop-page-definition-error/#comments</comments>
		<pubDate>Thu, 26 Aug 2010 02:18:05 +0000</pubDate>
		<dc:creator>watashii</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[portal]]></category>
		<category><![CDATA[streaming desktop]]></category>
		<category><![CDATA[weblogic]]></category>

		<guid isPermaLink="false">http://blog.watashii.com/?p=433</guid>
		<description><![CDATA[Got the following error when (re)creating a streaming desktop from an updated .portal file, using the Create Desktop Wizard on Portal Admin Console. javax.ejb.EJBException: SQL Error while trying to createPageDefinition: SQL [insert into PF_PAGE_DEFINITION ( PAGE_DEFINITION_ID, MARKUP_DEFINITION_ID, IS_PUBLIC, IS_HIDDEN, INTERSECTION_ID, PAGE_LABEL, WEBAPP_NAME) values (?,?,?,?,?,?,?)] database error code [25,222] SQL state [22028] .; nested exception is: [...]


Related Posts:<ol><li><a href='http://blog.watashii.com/2010/06/reading-portlet-preferences-in-weblogic-portal/' rel='bookmark' title='Permanent Link: Reading Portlet Preferences in Weblogic Portal'>Reading Portlet Preferences in Weblogic Portal</a></li>
<li><a href='http://blog.watashii.com/2010/03/using-jsf-1-2-on-oracle-workshop-for-weblogic-portal-10-3/' rel='bookmark' title='Permanent Link: Using JSF 1.2 on Oracle Workshop for Weblogic (Portal 10.3)'>Using JSF 1.2 on Oracle Workshop for Weblogic (Portal 10.3)</a></li>
<li><a href='http://blog.watashii.com/2010/06/weblogic-portal-authorization-get-and-check-users-roles/' rel='bookmark' title='Permanent Link: Weblogic Portal Authorization &#8211; Get and Check User&#8217;s Roles'>Weblogic Portal Authorization &#8211; Get and Check User&#8217;s Roles</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.watashii.com/wp-content/uploads/2010/08/portaldesktop.png"><img class="alignnone size-full wp-image-434" title="portaldesktop" src="http://blog.watashii.com/wp-content/uploads/2010/08/portaldesktop.png" alt="" width="450" height="333" /></a></p>
<p>Got the following error when (re)creating a streaming desktop from an updated .portal file, using the <em>Create Desktop Wizard</em> on <em>Portal Admin Console</em>.<br />
<code>javax.ejb.EJBException: SQL Error while trying to createPageDefinition: SQL [insert into PF_PAGE_DEFINITION ( PAGE_DEFINITION_ID, MARKUP_DEFINITION_ID, IS_PUBLIC, IS_HIDDEN, INTERSECTION_ID, PAGE_LABEL, WEBAPP_NAME) values (?,?,?,?,?,?,?)] database error code [25,222] SQL state [22028] .; nested exception is: java.sql.SQLException: Data exception -- row already exist in index AX1_PAGE_DEF on table PF_PAGE_DEFINITION.</code><br />
To temporarily bypass this error this so the streaming desktop can be created with the wizard, remove all the Pages manually from the <em>Library</em>.</p>
<p>The problem is one of the Page definition(s) in the .portal file is corrupted which prevents the library page resource from being refreshed.  You will need to work out which page is causing the problem, then the redo the page in the .portal file via Weblogic Portal Workshop.</p>


<p>Related Posts:<ol><li><a href='http://blog.watashii.com/2010/06/reading-portlet-preferences-in-weblogic-portal/' rel='bookmark' title='Permanent Link: Reading Portlet Preferences in Weblogic Portal'>Reading Portlet Preferences in Weblogic Portal</a></li>
<li><a href='http://blog.watashii.com/2010/03/using-jsf-1-2-on-oracle-workshop-for-weblogic-portal-10-3/' rel='bookmark' title='Permanent Link: Using JSF 1.2 on Oracle Workshop for Weblogic (Portal 10.3)'>Using JSF 1.2 on Oracle Workshop for Weblogic (Portal 10.3)</a></li>
<li><a href='http://blog.watashii.com/2010/06/weblogic-portal-authorization-get-and-check-users-roles/' rel='bookmark' title='Permanent Link: Weblogic Portal Authorization &#8211; Get and Check User&#8217;s Roles'>Weblogic Portal Authorization &#8211; Get and Check User&#8217;s Roles</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.watashii.com/2010/08/weblogic-portal-create-streaming-desktop-page-definition-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Subversion &#8211; Allow Author Name Logging</title>
		<link>http://blog.watashii.com/2010/07/subversion-allow-author-name-logging/</link>
		<comments>http://blog.watashii.com/2010/07/subversion-allow-author-name-logging/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 08:44:40 +0000</pubDate>
		<dc:creator>watashii</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[hook]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[subversive]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://blog.watashii.com/?p=423</guid>
		<description><![CDATA[To log the author name when trying to check-in files using Subversive/Eclipse over SVN, switch to SVN Repository Exploring perspective &#62; right-click on your repository &#62; edit the Location Properties &#62; Advanced tab &#62; and enable Override author name: However, the following error may occur on the SVN repository server: svn: 'Set revision author' operation [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.watashii.com/wp-content/uploads/2010/07/subversion_logo.png"><img class="alignnone size-full wp-image-424" title="subversion_logo" src="http://blog.watashii.com/wp-content/uploads/2010/07/subversion_logo.png" alt="" width="468" height="64" /></a></p>
<p>To log the author name when trying to check-in files using Subversive/Eclipse over SVN, switch to <em>SVN Repository Exploring</em> perspective &gt; right-click on your repository &gt; edit the<em> Location Properties </em>&gt; <em>Advanced </em>tab &gt; and enable <em>Override author name:</em></p>
<p><em><a href="http://blog.watashii.com/wp-content/uploads/2010/07/subversive_location.png"><img class="alignnone size-full wp-image-428" title="subversive_location" src="http://blog.watashii.com/wp-content/uploads/2010/07/subversive_location.png" alt="" width="448" height="517" /></a><br />
</em></p>
<p><span id="more-423"></span>However, the following error may occur on the SVN repository server:</p>
<pre><code>svn: 'Set revision author' operation finished with error: Disabled repository feature
svn: Repository has not been enabled to accept revision propchanges;
ask the administrator to create a pre-revprop-change hook</code></pre>
<p>The solution is to create a <a href="http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-repository-hooks.html" target="_blank">hook</a>, ie an executable script, on the SVN repository server under the hooks directory.  Create a file, named <em>pre-revprop-change.bat</em> (for Windows, but similar fashion on *nix) with the following commands:</p>
<pre><code>@echo off
REM pre-revprop-change.bat hook script
if "%4" == "svn:author" exit /b 0
echo "Changing revision properties %4% is prohibited" &gt;&amp;2
exit /b 1</code></pre>
<p>This will allow the author name log property (svn:author) updates to be accepted (which is rejected by default).</p>
<p><em></em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.watashii.com/2010/07/subversion-allow-author-name-logging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unix Shell &#8211; Check If Directory Is Empty</title>
		<link>http://blog.watashii.com/2010/06/unix-shell-check-if-directory-is-empty/</link>
		<comments>http://blog.watashii.com/2010/06/unix-shell-check-if-directory-is-empty/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 09:22:27 +0000</pubDate>
		<dc:creator>watashii</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[directory]]></category>
		<category><![CDATA[empty]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://blog.watashii.com/?p=411</guid>
		<description><![CDATA[Here is a simple unix shell command to check if a directory, $dir, is empty. export $dir=/tmp/myfiles/ if [ "$(ls -A $dir)" ]; then echo "$dir NOT Empty"; else echo "$dir IS Empty"; fi Related Posts:UNIX file size listing &#8211; du command Unix LS Command With Colors&#8230; Without the &#8212;color Option Unix &#8211; Creating Cron [...]


Related Posts:<ol><li><a href='http://blog.watashii.com/2008/08/unix-file-size-listing-du-command/' rel='bookmark' title='Permanent Link: UNIX file size listing &#8211; du command'>UNIX file size listing &#8211; du command</a></li>
<li><a href='http://blog.watashii.com/2009/10/unix-ls-command-with-colors-without-the-color-option/' rel='bookmark' title='Permanent Link: Unix LS Command With Colors&#8230; Without the &#8212;color Option'>Unix LS Command With Colors&#8230; Without the &#8212;color Option</a></li>
<li><a href='http://blog.watashii.com/2008/07/unix-creating-chron-jobs-with-chrontab/' rel='bookmark' title='Permanent Link: Unix &#8211; Creating Cron Jobs with Crontab'>Unix &#8211; Creating Cron Jobs with Crontab</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://blog.watashii.com/wp-content/uploads/2010/06/code-icon.png"><img class="size-full wp-image-373 aligncenter" title="code-icon" src="http://blog.watashii.com/wp-content/uploads/2010/06/code-icon.png" alt="" width="150" height="150" /></a></p>
<p>Here is a simple unix shell command to check if a directory, <em>$dir</em>, is empty.</p>
<pre name="code" class="java">
export $dir=/tmp/myfiles/
if [ "$(ls -A $dir)" ];
then
    echo "$dir NOT Empty";
else
    echo "$dir IS Empty";
fi</pre>


<p>Related Posts:<ol><li><a href='http://blog.watashii.com/2008/08/unix-file-size-listing-du-command/' rel='bookmark' title='Permanent Link: UNIX file size listing &#8211; du command'>UNIX file size listing &#8211; du command</a></li>
<li><a href='http://blog.watashii.com/2009/10/unix-ls-command-with-colors-without-the-color-option/' rel='bookmark' title='Permanent Link: Unix LS Command With Colors&#8230; Without the &#8212;color Option'>Unix LS Command With Colors&#8230; Without the &#8212;color Option</a></li>
<li><a href='http://blog.watashii.com/2008/07/unix-creating-chron-jobs-with-chrontab/' rel='bookmark' title='Permanent Link: Unix &#8211; Creating Cron Jobs with Crontab'>Unix &#8211; Creating Cron Jobs with Crontab</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.watashii.com/2010/06/unix-shell-check-if-directory-is-empty/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

