<?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>Days of ... &#187; howto</title>
	<atom:link href="http://www.yellowbluebus.com/blog/category/howto/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.yellowbluebus.com/blog</link>
	<description>Just another rants and opinions weblog</description>
	<lastBuildDate>Wed, 06 Jan 2010 10:30:35 +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>Recursive Linux &#8220;Find Files Containing&#8221;</title>
		<link>http://www.yellowbluebus.com/blog/2010/01/06/recursive-linux-find-files-containing/</link>
		<comments>http://www.yellowbluebus.com/blog/2010/01/06/recursive-linux-find-files-containing/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 10:30:35 +0000</pubDate>
		<dc:creator>drunken fly</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[solved]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.yellowbluebus.com/blog/?p=164</guid>
		<description><![CDATA[find . -name "*.ext" -exec grep -i -H -n "texttofind" {} \;]]></description>
			<content:encoded><![CDATA[<p><code>find . -name "*.ext" -exec grep -i -H -n "texttofind" {} \;</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.yellowbluebus.com/blog/2010/01/06/recursive-linux-find-files-containing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make Home/End/Delete keys work in Solaris bash</title>
		<link>http://www.yellowbluebus.com/blog/2009/06/22/make-homeend-key-work-in-solaris-bash/</link>
		<comments>http://www.yellowbluebus.com/blog/2009/06/22/make-homeend-key-work-in-solaris-bash/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 16:14:14 +0000</pubDate>
		<dc:creator>drunken fly</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[solved]]></category>

		<guid isPermaLink="false">http://www.yellowbluebus.com/blog/2009/06/22/make-homeend-key-work-in-solaris-bash/</guid>
		<description><![CDATA[This is most frustrating thing that I experience when I encounter Solaris bash prompt: the Home, End and Delete keyboard keys will not work because for some reason Solaris doesn’t understand them as useful keys. But there is the way to enable those keys! Add following lines to your ~/.bashrc file: # home key bind [...]]]></description>
			<content:encoded><![CDATA[<p>This is most frustrating thing that I experience when I encounter Solaris bash prompt: the Home, End and Delete keyboard keys will not work because for some reason Solaris doesn’t understand them as useful keys. But there is the way to enable those keys!</p>
<p>Add following lines to your ~/.bashrc file:</p>
<p># home key    <br />bind &#8216;&quot;\e[1~&quot;:beginning-of-line&#8217;     <br /># del key     <br />bind &#8216;&quot;\e[3~&quot;:delete-char&#8217;     <br /># end key     <br />bind &#8216;&quot;\e[4~&quot;:end-of-line&#8217;     <br /># pgup key     <br />bind &#8216;&quot;\e[5~&quot;:history-search-forward&#8217;     <br /># pgdn key     <br />bind &#8216;&quot;\e[6~&quot;:history-search-backward&#8217;</p>
<p>Save and source file. Now keys will work as they should.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yellowbluebus.com/blog/2009/06/22/make-homeend-key-work-in-solaris-bash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VMWare DHCP service wont’start &#8211; SOLVED</title>
		<link>http://www.yellowbluebus.com/blog/2009/05/08/vmware-dhcp-service-wontstart-solved/</link>
		<comments>http://www.yellowbluebus.com/blog/2009/05/08/vmware-dhcp-service-wontstart-solved/#comments</comments>
		<pubDate>Fri, 08 May 2009 12:43:22 +0000</pubDate>
		<dc:creator>drunken fly</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[problem]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[solved]]></category>
		<category><![CDATA[DHCP]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://www.yellowbluebus.com/blog/2009/05/08/vmware-dhcp-service-wontstart-solved/</guid>
		<description><![CDATA[I use VMWare to run a bunch of different Linux VMs on my home PC, which is running Vista SP1. Today I encountered strange thing: Linux VM won’t get an IP address from VMWare DHCP. I’ve opened VMWare Virtual Networks management console (as Administrator, of course, or it won’t let you make and save any [...]]]></description>
			<content:encoded><![CDATA[<p>I use VMWare to run a bunch of different Linux VMs on my home PC, which is running Vista SP1. Today I encountered strange thing: Linux VM won’t get an IP address from VMWare DHCP. I’ve opened VMWare Virtual Networks management console (as Administrator, of course, or it won’t let you make and save any changes) just to find out that DHCP service is not started. I tried to start it from there, but it failed to do so.</p>
<p>So I went to Vista Services console and tried to start “VMWare DHCP service from there”. Again, failed to start with no explanation, even cryptic one. So I went to Windows Events viewer and there, under Windows Logs-System, I found a lot of messages from VMNetDHCP:</p>
<p> <span lang="RU"><br />
<blockquote>
<p>The description for Event ID 2 from source VMnetDHCP cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.</p>
<p>If the event originated on another computer, the display information had to be saved with the event.</p>
<p>The following information was included with the event: </p>
<p>Can&#8217;t open C:\ProgramData\VMware\vmnetdhcp.conf: Access is denied.</p>
<p>/ The data is invalid</p>
<p>the message resource is present but the message is not found in the string/message table</p>
</blockquote>
<p>Though the message says that the message is not found, it has enough information to fix the problem. </p>
<p> So, I’ve taken a look at the security properties for C:\ProgramData\VMWare folder and found that SYSTEM account somehow is not in a list of permitted users. The only account, who was permitted to access that folder, was my Windows user account. So I added SYSTEM account with all permissions to this folder, waited when Windows propagated my change to all files and tried to start VMWare DHCP service again. It worked!</span>
<p>Then I simply restarted network within Linux VM (sudo /etc/init.d/networking restart) and got back to work.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yellowbluebus.com/blog/2009/05/08/vmware-dhcp-service-wontstart-solved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JBOSS Seam 2.1.1GA on JBOSS AS 5.0.1GA: Table is not mapped</title>
		<link>http://www.yellowbluebus.com/blog/2009/05/07/jboss-seam-211ga-on-jboss-as-501ga-table-is-not-mapped/</link>
		<comments>http://www.yellowbluebus.com/blog/2009/05/07/jboss-seam-211ga-on-jboss-as-501ga-table-is-not-mapped/#comments</comments>
		<pubDate>Thu, 07 May 2009 18:37:46 +0000</pubDate>
		<dc:creator>drunken fly</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[problem]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[solved]]></category>
		<category><![CDATA["not found"]]></category>
		<category><![CDATA["not mapped"]]></category>
		<category><![CDATA[hibernate]]></category>
		<category><![CDATA[jboss]]></category>
		<category><![CDATA[seam]]></category>
		<category><![CDATA[solution]]></category>

		<guid isPermaLink="false">http://www.yellowbluebus.com/blog/2009/05/07/jboss-seam-211ga-on-jboss-as-501ga-table-is-not-mapped/</guid>
		<description><![CDATA[I created sample JBOSS Seam project in Eclipse and decided to generate entity code from&#160; existing database. It worked fine, but when I try to run it, it shows me that Hibernade is not able to map entity beans to the corresponding tables. The error message is like this: org.hibernate.hql.ast.QuerySyntaxException: &#60;your table&#62; is not mapped [...]]]></description>
			<content:encoded><![CDATA[<p>I created sample JBOSS Seam project in Eclipse and decided to generate entity code from&#160; existing database. It worked fine, but when I try to run it, it shows me that Hibernade is not able to map entity beans to the corresponding tables. The error message is like this:</p>
<p><span style="widows: 2; text-transform: none; text-indent: 0px; border-collapse: separate; font: 13px arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class="Apple-style-span"><span style="border-collapse: collapse; font-family: arial; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px" class="Apple-style-span">org.hibernate.hql.ast.QuerySyntaxException: &lt;your table&gt; is not mapped</span></span></p>
<p>I spent around three hours trying to read all available information on it, but most of it just useless – it looks like people don’t know whats happening, so they recommend bizarre tricks. Like, for example, having empry seam.settings file in each folder, meh.</p>
<p>Finally, I found the solution in Seam Jira: <a href="https://jira.jboss.org/jira/browse/JBSEAM-3821"><u><font color="#0066cc">https://jira.jboss.org/jira/browse/JBSEAM-3821</font></u></a></p>
<p>They rocemmend to to force Hibernate to use Seam’s EntityManager by changing two files:</p>
<p>1. components.xml</p>
<blockquote><p>&#160;&#160;&#160; &lt;persistence:entity-manager-factory name=&quot;bookingDatabase&quot; installed=&quot;false&quot;/&gt;      <br />&#160;&#160;&#160; &lt;!&#8211; If Seam loads the persistence unit (JBoss 4.x), the EntityManagerFactory will be resolved from #{bookingDatabase}.      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; On JBoss AS 5, the EntityManagerFactory is retrieved from JNDI (the binding occurs during application deployment). &#8211;&gt;      <br />&#160;&#160;&#160; &lt;persistence:managed-persistence-context name=&quot;em&quot; auto-create=&quot;true&quot;      <br />&#160;&#160;&#160;&#160;&#160;&#160; entity-manager-factory=&quot;#{bookingDatabase}&quot; persistence-unit-jndi-name=&quot;java:/bookingEntityManagerFactory&quot;/&gt; </p></blockquote>
<p>2. persistence.xml</p>
<blockquote><p> &lt;!&#8211; Binds the EntityManagerFactory to JNDI where Seam can look it up.      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; This is only relevant when the container automatically loads the persistence unit, as is the case in JBoss AS 5. &#8211;&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;property name=&quot;jboss.entity.manager.factory.jndi.name&quot; value=&quot;java:/bookingEntityManagerFactory&quot;/&gt;</p>
</blockquote>
<p>Hope that Google will find that page and the proper solution would be much more easily found!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yellowbluebus.com/blog/2009/05/07/jboss-seam-211ga-on-jboss-as-501ga-table-is-not-mapped/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to reveal stored passwords and let browser remember them</title>
		<link>http://www.yellowbluebus.com/blog/2007/08/28/how-to-reveal-stored-passwords-and-let-browser-remember-them/</link>
		<comments>http://www.yellowbluebus.com/blog/2007/08/28/how-to-reveal-stored-passwords-and-let-browser-remember-them/#comments</comments>
		<pubDate>Tue, 28 Aug 2007 08:46:39 +0000</pubDate>
		<dc:creator>drunken fly</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.yellowbluebus.com/blog/2007/08/28/how-to-reveal-stored-passwords-and-let-browser-remember-them/</guid>
		<description><![CDATA[There is all so common situation when you have to go to once a week to a website, and you have to login to it and your browsers is not asking you about remembering that password. So you have to remember that password and its getting out of your head and you have to spend [...]]]></description>
			<content:encoded><![CDATA[<p>There is all so common situation when you have to go to once a week to a website, and you have to login to it and your browsers is not asking you about remembering that password. So you have to remember that password and its getting out of your head and you have to spend some time trying to get it into your head again.</p>
<p>If you are using Firefox you are lucky. There is a way to let your browser to remember the password and even reveal what you have typed correct password.</p>
<p>Here are the steps for a freedom:</p>
<ol>
<li>You will need to install Greasemonkey extension for Firefox <a href="https://addons.mozilla.org/en-US/firefox/addon/748" target="_blank">from here.</a> This extension allows you to use special JavaScript programs, which change the behaviour and/or look of the web sites. Don&#8217;t worry if you don&#8217;t know JavaScript, that knowledge is not required unless you want to write something completely new.<br />
<blockquote>
<p><font color="#333333">Perhaps you want to bookmark this page before the required Firefox restart, so you could easily return to this small guide. Press Ctrl-D to do that.</font> </p>
</blockquote>
<li>After Greasemonkey is installed and you restarted the Firefox you will need to install&nbsp;<a href="http://userscripts.org/scripts/show/1315" target="_blank">Force Autocomplete</a>&nbsp;script, which will enable password saving feature on all pages.<br />
<blockquote>
<p><font color="#333333">You don&#8217;t have to restart Firefox, to get Greasemonkey scripts working. If the script is not working &#8211; just refresh the page (Press F5).</font> </p>
</blockquote>
<li>Next step is to install password revealing script: <a href="http://userscripts.org/scripts/show/10343" target="_blank">Passwords on MouseOver</a></li>
</ol>
<p>Now you all set. Your&nbsp;form data&nbsp;will be remembered and you could verify that you are typing correct password.</p>
<p>You could get many more additional scripts here: <a href="http://userscripts.org/">http://userscripts.org/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.yellowbluebus.com/blog/2007/08/28/how-to-reveal-stored-passwords-and-let-browser-remember-them/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Subversion and branching</title>
		<link>http://www.yellowbluebus.com/blog/2006/12/03/subversion-and-branching/</link>
		<comments>http://www.yellowbluebus.com/blog/2006/12/03/subversion-and-branching/#comments</comments>
		<pubDate>Sun, 03 Dec 2006 10:11:31 +0000</pubDate>
		<dc:creator>drunken fly</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.yellowbluebus.com/blog/2006/12/03/subversion-and-branching/</guid>
		<description><![CDATA[Excellent article on branching in Subversion. One thing missing is the branch timeline chart. Something like this: Where horisontal line is the trunk timeline and angled lines are releases. Based on my experience, that chart often helps developers to understand when branches are created and how to deal with them.]]></description>
			<content:encoded><![CDATA[<p><a href="http://ariejan.net/2006/11/24/svn-how-to-structure-your-repository/" target="_blank">Excellent article on branching in Subversion</a>. One thing missing is the branch timeline chart. Something like this:</p>
<p><img height="141" src="http://www.yellowbluebus.com/blog/wp-content/uploads/2006/12/WindowsLiveWriter/Subversionandbranching_8D53/clip_image001.gif" width="524"></p>
<p>Where horisontal line is the trunk timeline and angled lines are releases. Based on my experience, that chart often helps developers to understand when branches are created and how to deal with them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yellowbluebus.com/blog/2006/12/03/subversion-and-branching/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Creating WebSphere 6 application MBeans</title>
		<link>http://www.yellowbluebus.com/blog/2006/01/20/creating-websphere-6-application-mbeans/</link>
		<comments>http://www.yellowbluebus.com/blog/2006/01/20/creating-websphere-6-application-mbeans/#comments</comments>
		<pubDate>Fri, 20 Jan 2006 00:01:00 +0000</pubDate>
		<dc:creator>drunken fly</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jmx]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[websphere]]></category>

		<guid isPermaLink="false">http://www.yellowbluebus.com/blog/?p=12</guid>
		<description><![CDATA[This is a little step by step guide on how to create and register custom service with JMX interface on WebSphere: 1. Create class, which implements two interfaces: [java] com.ibm.websphere.runtime.CustomService com.ibm.websphere.management.JMXManageable [/java] 2. Implement &#8220;initialize&#8221; method (inherited from CustomService) This method has a parameter, Properties, which will contain properties defined via WS Administration console. We [...]]]></description>
			<content:encoded><![CDATA[<p>This is a little step by step guide on how to create and register custom service with JMX interface on WebSphere:</p>
<p>1. Create class, which implements two interfaces:</p>
<p>[java]<br />
com.ibm.websphere.runtime.CustomService<br />
com.ibm.websphere.management.JMXManageable<br />
[/java]</p>
<p>2. Implement &#8220;initialize&#8221; method (inherited from CustomService)<br />
This method has a parameter, Properties, which will contain properties defined via WS Administration console. We are interested in one property: externalConfigURLKey. This property contains path to external configuration file (if any is needed).</p>
<p>This is how to get the path:</p>
<p>[java]<br />
public void initialize(Properties configProperties) throws Exception {<br />
 readConfig(configProperties.getProperty(externalConfigURLKey));<br />
}<br />
[/java]</p>
<p>3. shutdown() method may be left blank.</p>
<p>4. implement getType() method (inherited from JMXManageable):</p>
<p>[java]<br />
public String getType() {<br />
 return &#8220;MyMBean&#8221;;<br />
}<br />
[/java]</p>
<p>Remember the name you returned here!</p>
<p>5. implement getMBeanProperties:</p>
<p>[java]<br />
public Properties getMBeanProperties() {<br />
 Properties props = new Properties();<br />
 props.put(&#8220;SpecialProperty&#8221;, &#8220;value&#8221;);<br />
 return props;<br />
}<br />
[/java]</p>
<p>I think this will return a list of properties, not declared in MBean descriptor. Read only, of course, since there is no setMBeanProperties() method.</p>
<p>6. implement getters and setters for properties you want to expose:</p>
<p>[java]<br />
public String getUserName() {<br />
 return this.userName;<br />
}</p>
<p>public void setUserName(String param) {<br />
 this.userName = param;<br />
}<br />
[/java]</p>
<p>7. Create MBean descriptor file, for example myTest.xml.</p>
<p>[xml]<br />
<?xml version="1.0" encoding="UTF-8"?><br />
<!DOCTYPE MBean SYSTEM "MBeanDescriptor.dtd"><br />
<MBean type="MyMBean"><br />
    <attribute name="UserName" type="java.lang.String" getMethod="getUserName" setMethod="setUserName" /><br />
</MBean><br />
[/xml]</p>
<p>IMPORTANT: Make sure that type matches the value you remembered on the step 4!</p>
<p>8. Compile and package. Create .jar, having descriptor in the root. Place .jar somewhere accesible for WebSphere.</p>
<p>9. Start WebSphere and open Administration console.</p>
<p>10. Go to Servers &#8211; Application Servers &#8211; yourserver &#8211; Server Infrastructure &#8211; Administration &#8211; Administration Services</p>
<p>11. Click on &#8220;Extension MBean providers&#8221;</p>
<p>12. Click on &#8220;New&#8221;</p>
<p>13. In the &#8220;Classpath&#8221; entry type the full path and name of your jar (created on step 8)</p>
<p>14. Type something memorable in two other fields and click Apply.</p>
<p>15. Click on &#8220;Extension MBeans&#8221; (on the left)</p>
<p>16. Click on &#8220;New&#8221;</p>
<p>17. Enter the name of MBean descriptor file (see step 7.)</p>
<p>for example:<br />
myTest.xml</p>
<p>18. Enter the type name of your MBean. IMPORTANT: must be the same name as it was on steps 4 and 7.</p>
<p>19. Click Apply.</p>
<p>20. Go to Servers &#8211; Application Servers &#8211; yourserver &#8211; Server Infrastructure &#8211; Administration &#8211; Custom Services</p>
<p>21. Click New</p>
<p>22. Place check on &#8220;Enable service at server startup&#8221;.</p>
<p>23. Enter full class name (with package) of your MBean class (the one we created on step 1) into &#8220;Classname&#8221; field.</p>
<p>24. Enter something memorable in &#8220;Display Name&#8221;</p>
<p>25. Enter fill path and file name of the jar file (step 8) into &#8220;Classpath&#8221;.</p>
<p>26. If your service requires configuration file (step 2) enter full path to it into &#8221; External Configuration URL&#8221;</p>
<p>27. Click on Apply.</p>
<p>28. Click on Save (on top)</p>
<p>29. Click Save.</p>
<p>30. Restart the server.</p>
<p>Here are the commands, used to verify MBean from admin console:</p>
<p>To run console:<br />
wsadmin.bat -conntype SOAP -port 8881</p>
<p>To make sure that MBean started:<br />
$AdminControl queryNames *:*,type=&gt;</p>
<p>Store MBean in Tcl variable:<br />
set mybean [$AdminControl queryNames *:*,type=MBeanName]</p>
<p>See MBean description:<br />
$Help all $mybean</p>
<p>See MBean attributes and values:<br />
$AdminControl getAttributes $mybean</p>
<p>Set specific attribute:<br />
$AdminControl setAttribute $mybean UserName mike</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yellowbluebus.com/blog/2006/01/20/creating-websphere-6-application-mbeans/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
