<?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>Len &#187; tinker</title>
	<atom:link href="http://www.len.ro/tag/tinker/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.len.ro</link>
	<description>Len&#039;s personal site: work, cooking, cycling, experiences</description>
	<lastBuildDate>Mon, 26 Jul 2010 20:24:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Status RSS plugin for pidgin</title>
		<link>http://www.len.ro/2010/07/status-rss-plugin-for-pidgin/</link>
		<comments>http://www.len.ro/2010/07/status-rss-plugin-for-pidgin/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 12:46:05 +0000</pubDate>
		<dc:creator>len</dc:creator>
				<category><![CDATA[work]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[tinker]]></category>

		<guid isPermaLink="false">http://www.len.ro/?p=5131</guid>
		<description><![CDATA[As a pidgin user I am used at not expecting many fancy things but one of the features I&#8217;ve wished for some time is a plugin which updates the status automatically to the last entry in a RSS feed. As an example I&#8217;d like to update the status to the last post on my blog. [...]

<h3>Related posts:</h3><ol><li><a href='http://www.len.ro/2010/05/ubuntu-lucid-lynx/' rel='bookmark' title='Permanent Link: Ubuntu Lucid Lynx'>Ubuntu Lucid Lynx</a> <small>There was not much I expected from the new ubuntu...</small></li>
<li><a href='http://www.len.ro/2009/10/ubuntu-9-10-karmic-koala/' rel='bookmark' title='Permanent Link: Ubuntu 9.10 Karmic Koala'>Ubuntu 9.10 Karmic Koala</a> <small>This ubuntu installation was the bit of fun expected after...</small></li>
<li><a href='http://www.len.ro/2009/09/quick-ttf-fonts-and-cisco-vpn/' rel='bookmark' title='Permanent Link: Quick: ttf fonts and cisco vpn'>Quick: ttf fonts and cisco vpn</a> <small>2 short tricks on ubuntu linux (9.04 Jaunty): Install a...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>As a pidgin user I am used at not expecting many fancy things but one of the features I&#8217;ve wished for some time is a plugin which updates the status automatically to the last entry in a RSS feed. As an example I&#8217;d like to update the status to the last post on my blog. So, even if I don&#8217;t like perl too much here is a simple plugin which does just that. It&#8217;s inspirationaly called: Status RSS :)</p>
<h2><span id="more-5131"></span>What does it do?</h2>
<p>The plugin checks from time to time, (at startup or when the action is selected from the menu) the specified RSS feed, parses it and fetches the last entry. It then updates the current status with a message in the form: <em>entry.title entry.link</em> (yahoo format).</p>
<h2>How to install it?</h2>
<ul>
<li>First you need the <a href="http://search.cpan.org/~simonw/XML-Feed-0.43/lib/XML/Feed.pm">XML::Feed package</a> for Perl from CPAN. In ubuntu you can install the package: <em>libxml-feed-perl</em>.</li>
<li>Make sure you have Perl support in pidgin. Check Help-&gt;About for perl:enabled.</li>
<li>Download <a title="Status RSS pidgin plugin" href="http://www.len.ro/hidden/statusrss.zip">the archive</a>. Copy the statusrss.pl to .purple/plugins. Create the plugins folder if it&#8217;s not there already.</li>
<li>Restart pidgin then enable the plugin in Tools-&gt;Plugins menu.</li>
</ul>
<h2>How to use it?</h2>
<ul>
<li>After enabling the plugin configure it by setting the RSS feed url and the refresh timeout. 0 means no refresh.</li>
<li>For manual refresh go to Tools-&gt;Status RSS-&gt;Update Status</li>
</ul>
<h2>Tested with</h2>
<p>Pidgin 2.6 &#8211; 2.7.1 on Ubuntu Lucid Lynx</p>
<h2>License</h2>
<p>This plugin is released under the GNU General Public License (http://www.gnu.org/licenses/gpl.html)</p>


<h3>Related posts:</h3><ol><li><a href='http://www.len.ro/2010/05/ubuntu-lucid-lynx/' rel='bookmark' title='Permanent Link: Ubuntu Lucid Lynx'>Ubuntu Lucid Lynx</a> <small>There was not much I expected from the new ubuntu...</small></li>
<li><a href='http://www.len.ro/2009/10/ubuntu-9-10-karmic-koala/' rel='bookmark' title='Permanent Link: Ubuntu 9.10 Karmic Koala'>Ubuntu 9.10 Karmic Koala</a> <small>This ubuntu installation was the bit of fun expected after...</small></li>
<li><a href='http://www.len.ro/2009/09/quick-ttf-fonts-and-cisco-vpn/' rel='bookmark' title='Permanent Link: Quick: ttf fonts and cisco vpn'>Quick: ttf fonts and cisco vpn</a> <small>2 short tricks on ubuntu linux (9.04 Jaunty): Install a...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.len.ro/2010/07/status-rss-plugin-for-pidgin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delete self-pings</title>
		<link>http://www.len.ro/2010/07/delete-self-pings/</link>
		<comments>http://www.len.ro/2010/07/delete-self-pings/#comments</comments>
		<pubDate>Sun, 11 Jul 2010 12:12:34 +0000</pubDate>
		<dc:creator>len</dc:creator>
				<category><![CDATA[work]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[tinker]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.len.ro/?p=5096</guid>
		<description><![CDATA[It seems that self-pings are bad for Google page ranking. Well, I have never spended too much time thinking about SEO but I find them a bit clutering and thus I&#8217;ve decided to remove them. There are some plugins which block new self-pings but none which deletes the existing ones. So here is a mysql [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>It seems that self-pings are bad for Google page ranking. Well, I have never spended too much time thinking about SEO but I find them a bit clutering and thus I&#8217;ve decided to remove them. There are some plugins which block new self-pings but none which deletes the existing ones. So here is a mysql command which does just that:</p>
<p>Warning: don&#8217;t execute sql commands on your db if you don&#8217;t know anything about what sql is, it might ruin your base.</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> count<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">FROM</span> <span style="color: #66cc66;">&#123;</span>prefix<span style="color: #66cc66;">&#125;</span>_comments <span style="color: #993333; font-weight: bold;">WHERE</span> comment_type <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'pingback'</span> <span style="color: #993333; font-weight: bold;">AND</span>
    locate<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">SELECT</span> option_value <span style="color: #993333; font-weight: bold;">FROM</span> ﻿<span style="color: #66cc66;">&#123;</span>prefix<span style="color: #66cc66;">&#125;</span>_options <span style="color: #993333; font-weight: bold;">WHERE</span> option_name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'siteurl'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span> comment_author_url<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span>;
<span style="color: #993333; font-weight: bold;">DELETE</span> <span style="color: #993333; font-weight: bold;">FROM</span> <span style="color: #66cc66;">&#123;</span>prefix<span style="color: #66cc66;">&#125;</span>_comments <span style="color: #993333; font-weight: bold;">WHERE</span> comment_type <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'pingback'</span> <span style="color: #993333; font-weight: bold;">AND</span>
    locate<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">SELECT</span> option_value <span style="color: #993333; font-weight: bold;">FROM</span> <span style="color: #66cc66;">&#123;</span>prefix<span style="color: #66cc66;">&#125;</span>_options <span style="color: #993333; font-weight: bold;">WHERE</span> option_name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'siteurl'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span> comment_author_url<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span>;</pre></div></div>

<p>Replace the {prefix} with your db tables prefix.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.len.ro/2010/07/delete-self-pings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cum sa izolezi casa cu furnici</title>
		<link>http://www.len.ro/2010/07/cum-sa-izolezi-casa-cu-furnici/</link>
		<comments>http://www.len.ro/2010/07/cum-sa-izolezi-casa-cu-furnici/#comments</comments>
		<pubDate>Sat, 10 Jul 2010 17:28:39 +0000</pubDate>
		<dc:creator>len</dc:creator>
				<category><![CDATA[impressions]]></category>
		<category><![CDATA[misc]]></category>
		<category><![CDATA[tinker]]></category>

		<guid isPermaLink="false">http://www.len.ro/?p=5104</guid>
		<description><![CDATA[Pentru a raspunde noilor tendinte de tip: casa verde si casa ecologica va propunem spre evaluare o metoda inovativa pentru a realiza o izolare de inalta calitate a locuintei dumneavoastra. Testele efectuate au aratat rezultate de 99.99% in majoritatea cazurilor. O cerinta importanta o consta amplasamentul locuintei intr-o zona frecventata de furnici. Din fericire furnicile [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Pentru a raspunde noilor tendinte de tip: casa verde si casa ecologica va propunem spre evaluare o metoda inovativa pentru a realiza o izolare de inalta calitate a locuintei dumneavoastra. Testele efectuate au aratat rezultate de 99.99% in majoritatea cazurilor. O cerinta importanta o consta amplasamentul locuintei intr-o zona frecventata de furnici. Din fericire furnicile se gasesc in majoritatea habitatelor si formeaza intre 15-25% din masa animala terestra (vezi <a href="http://en.wikipedia.org/wiki/Ant">sursa</a>).</p>
<p>Metoda de izolare consta in a introduce in interiorul locuintei o sursa dulce si apoi a o monitoriza cu atentie pe parcursul a cateva zile. Se va observa mai intai aparitia catorva furnici ce studiaza zona si apoi a unor intregi caravane de furnici. Prin urmarirea cu atentie a acestora se va putea identifica zona unde izolatia locuintei nu este perfecta (rosturi, imbinari tevarie, etc.). Se va proceda apoi la refacerea izolatiei folosind metode traditionale: tencuiala, silicon, etc. Se vor culege furnicile prin metode nedistructive si vor fi mutate in exteriorul locuintei. Se va continua monitorizarea. In scurt timp o noua caravana se va forma respectiv indicand o noua zona de izolatie imperfecta. Se va repeta procedura anterioara de cate ori este nevoie avand in vedere ca metoda reuseste sa detecteze probleme de izolatie cu diamentrul de pana la 1mm. Se va considera locuinta izolata cand in timp de 7 zile nu se va observa un nou flux de furnici.</p>
<p>Aceasta metoda are un cost scazut in raport cu metodele complicate de detectie a problemelor de izolatie si in plus are avantajul ca orice problema va fi imediat detectata prin aparitia unui nou aflux de furnici nefiind nevoie decat de reaplicarea procedurii descrise anterior pentru a reface problema aparuta.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.len.ro/2010/07/cum-sa-izolezi-casa-cu-furnici/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python xml namespace parsing with libxml2</title>
		<link>http://www.len.ro/2010/07/python-xml-namespace-parsing-with-libxml2/</link>
		<comments>http://www.len.ro/2010/07/python-xml-namespace-parsing-with-libxml2/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 08:21:44 +0000</pubDate>
		<dc:creator>len</dc:creator>
				<category><![CDATA[work]]></category>
		<category><![CDATA[GPS]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[tinker]]></category>

		<guid isPermaLink="false">http://www.len.ro/?p=5092</guid>
		<description><![CDATA[The goal of this tinkering was simple: to parse a KML file for further interpretation and use using python and libxml2. First test #!/usr/bin/env python import libxml2, sys doc = libxml2.parseFile(sys.argv[1]) ctxt = doc.xpathNewContext() ctxt.xpathRegisterNs('kml', "http://www.opengis.net/kml/2.2") root = doc.getRootElement() res = ctxt.xpathEval("//kml:Placemark") for e in res: nodes = e.xpathEval('kml:name') if len(nodes) &#62; 0: if nodes[0].content.strip().startswith('cp'): [...]

<h3>Related posts:</h3><ol><li><a href='http://www.len.ro/2009/09/python-uno-openoffice-automatization/' rel='bookmark' title='Permanent Link: Python uno openoffice automatization'>Python uno openoffice automatization</a> <small>This is a very short example I managed to do...</small></li>
<li><a href='http://www.len.ro/2010/01/linux-encrypted-filesystem/' rel='bookmark' title='Permanent Link: Linux encrypted file(system)'>Linux encrypted file(system)</a> <small>Searching for a way to encrypt your files or filesystem...</small></li>
<li><a href='http://www.len.ro/2009/08/integrating-lightbox-into-tapestry-5/' rel='bookmark' title='Permanent Link: Integrating Lightbox into Tapestry 5'>Integrating Lightbox into Tapestry 5</a> <small>This show a basic way of using Lightbox 2.03 (wiki)...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>The goal of this tinkering was simple: to parse a KML file for further interpretation and use using python and libxml2.<span id="more-5092"></span></p>
<h2>First test</h2>
<pre>#!/usr/bin/env python
import libxml2, sys

doc = libxml2.parseFile(sys.argv[1])
ctxt = doc.xpathNewContext()
ctxt.xpathRegisterNs('kml', "http://www.opengis.net/kml/2.2")
root = doc.getRootElement()
res = ctxt.xpathEval("//kml:Placemark")
for e in res:
 nodes = e.xpathEval('kml:name')
 if len(nodes) &gt; 0:
 if nodes[0].content.strip().startswith('cp'):
 coord = e.xpathEval('kml:Point/kml:coordinates')
 if len(coord) &gt; 0:
 print coord[0].content.split(',')

doc.freeDoc()
ctxt.xpathFreeContext()</pre>
<p>This sounded ok according to the scarce doc but resulted in the following error:</p>
<pre>Undefined namespace prefix
xmlXPathEval: evaluation failed
Traceback (most recent call last):
 File "./test1.py", line 11, in &lt;module&gt;
 nodes = e.xpathEval('kml:name')
 File "/usr/lib/pymodules/python2.6/libxml2.py", line 436, in xpathEval
 res = ctxt.xpathEval(expr)
 File "/usr/lib/pymodules/python2.6/libxml2.py", line 4894, in xpathEval
 if ret is None:raise xpathError('xmlXPathEval() failed')
libxml2.xpathError: xmlXPathEval() failed
</pre>
<h2>Second test</h2>
<p>After some searching on the net I&#8217;ve found that many people reported namespace parsing problems with xpath so removing the default namespace did the trick:</p>
<pre># removes default namespace
def clean_data(file):
 data = open(file, 'r').read();
 data = re.sub('xmlns="[^"]*"\s*', '', data)
 return data

doc = libxml2.parseDoc(clean_data(sys.argv[1]))
</pre>
<h2>Third test</h2>
<p>I could have easily left at that but it&#8217;s a bit ugly, isn&#8217;t it? The solution?</p>
<pre>#!/usr/bin/env python
import libxml2, sys

doc = libxml2.parseFile(sys.argv[1])
ctxt = doc.xpathNewContext()
ctxt.xpathRegisterNs('kml', "http://www.opengis.net/kml/2.2")
root = doc.getRootElement()
res = ctxt.xpathEval("//kml:Placemark")
for e in res:
 ctxt.setContextNode(e)
 nodes = ctxt.xpathEval('kml:name')
 if len(nodes) &gt; 0:
 if nodes[0].content.strip().startswith('cp'):
 coord = ctxt.xpathEval('kml:Point/kml:coordinates')
 if len(coord) &gt; 0:
 print coord[0].content.split(',')

doc.freeDoc()
ctxt.xpathFreeContext()
</pre>
<p>Notice the <em>ctxt.setContextNode(e)</em> and then <em>ctxt.xpathEval(&#8230;)</em> instead of <em>e.xpathEval(&#8230;)</em>. <span style="text-decoration: line-through;">Solved</span>. Actually it seems that not all of the kml files have the same default ns so the ugly method was simpler and better :)</p>


<h3>Related posts:</h3><ol><li><a href='http://www.len.ro/2009/09/python-uno-openoffice-automatization/' rel='bookmark' title='Permanent Link: Python uno openoffice automatization'>Python uno openoffice automatization</a> <small>This is a very short example I managed to do...</small></li>
<li><a href='http://www.len.ro/2010/01/linux-encrypted-filesystem/' rel='bookmark' title='Permanent Link: Linux encrypted file(system)'>Linux encrypted file(system)</a> <small>Searching for a way to encrypt your files or filesystem...</small></li>
<li><a href='http://www.len.ro/2009/08/integrating-lightbox-into-tapestry-5/' rel='bookmark' title='Permanent Link: Integrating Lightbox into Tapestry 5'>Integrating Lightbox into Tapestry 5</a> <small>This show a basic way of using Lightbox 2.03 (wiki)...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.len.ro/2010/07/python-xml-namespace-parsing-with-libxml2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tethered capture with ubuntu and D450</title>
		<link>http://www.len.ro/2010/07/tethered-capture-with-ubuntu-and-d450/</link>
		<comments>http://www.len.ro/2010/07/tethered-capture-with-ubuntu-and-d450/#comments</comments>
		<pubDate>Thu, 08 Jul 2010 17:14:06 +0000</pubDate>
		<dc:creator>len</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[photo]]></category>
		<category><![CDATA[tinker]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.len.ro/?p=5082</guid>
		<description><![CDATA[Shooting a photo and the imediately seeing it on a large monitor is a feature I&#8217;ve always wished. I don&#8217;t say live view on a display but instant copy and display would suffice. And actually, as I found out, it&#8217;s quite easy to achieve on Ubuntu Linux (10.04) with a Canon D450. Required software Make [...]

<h3>Related posts:</h3><ol><li><a href='http://www.len.ro/2009/10/ubuntu-9-10-karmic-koala/' rel='bookmark' title='Permanent Link: Ubuntu 9.10 Karmic Koala'>Ubuntu 9.10 Karmic Koala</a> <small>This ubuntu installation was the bit of fun expected after...</small></li>
<li><a href='http://www.len.ro/2010/05/ubuntu-lucid-lynx/' rel='bookmark' title='Permanent Link: Ubuntu Lucid Lynx'>Ubuntu Lucid Lynx</a> <small>There was not much I expected from the new ubuntu...</small></li>
<li><a href='http://www.len.ro/2009/11/ubuntu-9-10-karmic-koala-netbook/' rel='bookmark' title='Permanent Link: Ubuntu 9.10 Karmic Koala netbook'>Ubuntu 9.10 Karmic Koala netbook</a> <small>I&#8217;ve also migrated my Acer Aspire One to the new...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Shooting a photo and the imediately seeing it on a large monitor is a feature I&#8217;ve always wished. I don&#8217;t say live view on a display but instant copy and display would suffice. And actually, as I found out, it&#8217;s quite easy to achieve on Ubuntu Linux (10.04) with a Canon D450. <span id="more-5082"></span></p>
<h2>Required software</h2>
<p>Make sure gphoto2 and geeqie (former gqview) is installed. An apt will do the trick:</p>
<pre>sudo apt-get install gphoto2 geeqie</pre>
<h2>Scripts</h2>
<p>I&#8217;ve written 2 scripts. The first one does the tethered capture and the second does the display of the image using geeqie</p>
<p><strong>capture.sh</strong>:</p>
<pre>#!/bin/bash
#capture.sh script

#the capture-tethered only works if a capture-image has been issued first
#so capture an image first
gphoto2 --capture-image 

#do the actual capture-tethered
gphoto2 --capture-tethered --hook-script $(dirname $0)/capture1.sh</pre>
<p><strong>capture1.sh</strong>:</p>
<pre>#!/bin/bash
#capture1.sh script

if [ "x$ACTION" = "xdownload" ]; then
 geeqie --remote $ARGUMENT &amp;
fi</pre>
<p>You just need to create these 2 files in a folder of your choice and then make them executable</p>
<pre>chmod u+x capture.sh capture1.sh</pre>
<h2>Usage</h2>
<ol>
<li>Plug the camera in</li>
<li>It will be detected and mounted automatically by ubuntu. Unmount it to allow gphoto2 to lock it.</li>
<li>start the script capture.sh It will save files in the form capture0001.jpg in the working directory each time you shoot a photo then display them in geeqie. Note: the photos will be downloaded and deleted from the camera.</li>
<li>press Ctrl+C to stop the process</li>
</ol>


<h3>Related posts:</h3><ol><li><a href='http://www.len.ro/2009/10/ubuntu-9-10-karmic-koala/' rel='bookmark' title='Permanent Link: Ubuntu 9.10 Karmic Koala'>Ubuntu 9.10 Karmic Koala</a> <small>This ubuntu installation was the bit of fun expected after...</small></li>
<li><a href='http://www.len.ro/2010/05/ubuntu-lucid-lynx/' rel='bookmark' title='Permanent Link: Ubuntu Lucid Lynx'>Ubuntu Lucid Lynx</a> <small>There was not much I expected from the new ubuntu...</small></li>
<li><a href='http://www.len.ro/2009/11/ubuntu-9-10-karmic-koala-netbook/' rel='bookmark' title='Permanent Link: Ubuntu 9.10 Karmic Koala netbook'>Ubuntu 9.10 Karmic Koala netbook</a> <small>I&#8217;ve also migrated my Acer Aspire One to the new...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.len.ro/2010/07/tethered-capture-with-ubuntu-and-d450/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Holux M-241 GPS</title>
		<link>http://www.len.ro/2010/05/holux-m-241-gps/</link>
		<comments>http://www.len.ro/2010/05/holux-m-241-gps/#comments</comments>
		<pubDate>Mon, 31 May 2010 13:11:23 +0000</pubDate>
		<dc:creator>len</dc:creator>
				<category><![CDATA[work]]></category>
		<category><![CDATA[GPS]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tinker]]></category>

		<guid isPermaLink="false">http://www.len.ro/?p=4990</guid>
		<description><![CDATA[Read track via USB gpsbabel -t -w  -i m241 -f /dev/ttyUSB0 -o gpx -F test.gpx Read track via Bluetooth Find mac: hcitool scan Scanning ... 00:1B:C1:05:XX:XX    HOLUX_M-241 Bind to a serial port in /etc/bluetooth/rfcomm.conf rfcomm4 { bind yes; device 00:1B:C1:05:XX:XX; channel 1; comment "Serial Port"; } Connect the serial port: rfcomm connect 4 read track: [...]

<h3>Related posts:</h3><ol><li><a href='http://www.len.ro/2009/09/the-geeks-alphabet/' rel='bookmark' title='Permanent Link: The geek&#8217;s alphabet'>The geek&#8217;s alphabet</a> <small>The geek&#8217;s alphabet: a, b, c ls -a gpsd -b...</small></li>
<li><a href='http://www.len.ro/2009/09/python-uno-openoffice-automatization/' rel='bookmark' title='Permanent Link: Python uno openoffice automatization'>Python uno openoffice automatization</a> <small>This is a very short example I managed to do...</small></li>
<li><a href='http://www.len.ro/2010/07/python-xml-namespace-parsing-with-libxml2/' rel='bookmark' title='Permanent Link: Python xml namespace parsing with libxml2'>Python xml namespace parsing with libxml2</a> <small>The goal of this tinkering was simple: to parse a...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<h2>Read track via USB</h2>
<pre>gpsbabel -t -w  -i m241 -f /dev/ttyUSB0 -o gpx -F test.gpx
</pre>
<p><span id="more-4990"></span></p>
<h2>Read track via Bluetooth</h2>
<p>Find mac:</p>
<pre>hcitool scan
Scanning ...
 00:1B:C1:05:XX:XX    HOLUX_M-241
</pre>
<p>Bind to a serial port in /etc/bluetooth/rfcomm.conf</p>
<pre>rfcomm4 {
 bind yes;
 device 00:1B:C1:05:XX:XX;
 channel 1;
 comment "Serial Port";
}</pre>
<p>Connect the serial port:</p>
<pre>rfcomm connect 4
</pre>
<p>read track:</p>
<pre>gpsbabel -t -w  -i m241 -f /dev/rfcomm4 -o gpx -F test.gpx</pre>


<h3>Related posts:</h3><ol><li><a href='http://www.len.ro/2009/09/the-geeks-alphabet/' rel='bookmark' title='Permanent Link: The geek&#8217;s alphabet'>The geek&#8217;s alphabet</a> <small>The geek&#8217;s alphabet: a, b, c ls -a gpsd -b...</small></li>
<li><a href='http://www.len.ro/2009/09/python-uno-openoffice-automatization/' rel='bookmark' title='Permanent Link: Python uno openoffice automatization'>Python uno openoffice automatization</a> <small>This is a very short example I managed to do...</small></li>
<li><a href='http://www.len.ro/2010/07/python-xml-namespace-parsing-with-libxml2/' rel='bookmark' title='Permanent Link: Python xml namespace parsing with libxml2'>Python xml namespace parsing with libxml2</a> <small>The goal of this tinkering was simple: to parse a...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.len.ro/2010/05/holux-m-241-gps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu Lucid Lynx</title>
		<link>http://www.len.ro/2010/05/ubuntu-lucid-lynx/</link>
		<comments>http://www.len.ro/2010/05/ubuntu-lucid-lynx/#comments</comments>
		<pubDate>Sat, 08 May 2010 06:23:26 +0000</pubDate>
		<dc:creator>len</dc:creator>
				<category><![CDATA[work]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tinker]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.len.ro/?p=4924</guid>
		<description><![CDATA[There was not much I expected from the new ubuntu Lucid Lynx as I was happy enough with the existing version already. But I a good tradition and because I woke up at 8:30 this Saturday I decided to go ahead and install it on my Dell D820. The install The install went smoothly, everything [...]

<h3>Related posts:</h3><ol><li><a href='http://www.len.ro/2009/10/ubuntu-9-10-karmic-koala/' rel='bookmark' title='Permanent Link: Ubuntu 9.10 Karmic Koala'>Ubuntu 9.10 Karmic Koala</a> <small>This ubuntu installation was the bit of fun expected after...</small></li>
<li><a href='http://www.len.ro/2009/11/changing-dates-in-thunderbird/' rel='bookmark' title='Permanent Link: Changing dates format in Thunderbird'>Changing dates format in Thunderbird</a> <small>Since my migration to thunderbird I did not had many...</small></li>
<li><a href='http://www.len.ro/2009/10/evolution-to-thunderbird-migration/' rel='bookmark' title='Permanent Link: Evolution to Thunderbird migration'>Evolution to Thunderbird migration</a> <small>I have been using Evolution since more than 7 years...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>There was not much I expected from the new ubuntu Lucid Lynx as I was happy enough with the existing version already. But I a good tradition and because I woke up at 8:30 this Saturday I decided to go ahead and install it on my Dell D820.</p>
<h3>The install</h3>
<p>The install went smoothly, everything was detected, installed the upgrades, the nvidia drivers and some day to day packages: mozilla-thunderbird, pidgin, emacs.</p>
<p><span id="more-4924"></span></p>
<h3>Post install, migrate data</h3>
<p>As usual the first step was to set a root password:</p>
<pre>sudo passwd</pre>
<p>Then I started to migrate data:</p>
<pre>#tomboy notes
cp -r old/len/.config/tomboy/* ~/.config/tomboy
cp -r old/len/.local/share/tomboy/* ~/.local/share/tomboy
(see: http://live.gnome.org/Tomboy/Directories)
#gaim/pidgin
cp -r old/len/.purple ~/
#mozilla
cp -r old/len/.mozilla ~/
#mozilla-thunderbird
cp -r old/len/.mozilla-thunderbird ~/
#ssh keys
cp -r old/len/.ssh ~/
#skype
cp -r old/len/.Skype ~/
#hamster (time-tracker applet)
cp -r old/len/.gnome2/hamster-applet/ .gnome2</pre>
<p>I also restored my .bash_profiles files for each account and added a <em>HISTSIZE=10000</em> line in <em>/etc/profile</em> to insure enough history buffer for  terminal commands. <em>Update:</em> in lucid you have to change the /etc/skel/.bashrc and the .bashrc of each user so the modification in /etc/profile was not taken into account.</p>
<h3>Media, other packages</h3>
<p>After adding the canonical &amp; medibuntu package sources I started installing some needed software:</p>
<ul>
<li>historical reasons: emacs, gqview</li>
<li>gps packages (since I am preparing for <a href="http://www.len.ro/2008/03/trasee/">bicycle trip</a> tomorrow):  qlandkarte, gpsbabel</li>
<li>work needed: skype (no longer in repositories, downloaded from skype.com), acroread (even if evince is much faster for what I need), openvpn, sun-java6-jdk, jhead, exiftags, cvs, tightvncserver, x11vnc, xtightvncviewer</li>
<li>networking: traceroute meld lsof iptraf nload openvpn ssh wireshark</li>
<li>graphics: gimp (not installed by default in Lucid)</li>
<li>removed evolution and empathy</li>
</ul>
<p>I&#8217;ve tested skype, sound play and recording worked fine.</p>
<h3>Firefox plugins</h3>
<p>Since I do some flex development lately I need some degree of control  for my flash plugin so instead of installing the flashplugin-nonfree  package I made the installation by hand:</p>
<pre>cd /usr/lib/firefox-3.0.3/plugins
ln -s /work/Adobe_Flex_Builder_Linux/Player/linux/install_flash_player_9_linux/libflashplayer.so
ln -s /opt/jdk1.5.0_11/jre/plugin/i386/ns7/libjavaplugin_oji.so</pre>
<h3>Some conclusion</h3>
<p>As far as the installation is concerned everything went very fast and  I had a working system in under 2h (including writting this article :) The only thing I did not liked was that the indicator applet <a href="https://bugs.launchpad.net/indicator-applet/+bug/410254">does not work vertically</a>. As a long time windowmaker user I prefer a vertical, right side panel with icons but the indicator applet does not know how to handle this. Lost some time with this and did not arrived to the desired result. All in all, not much to say, a new ubuntu version. The only improvement I noticed was a much faster boot. Let&#8217;s see in a week time.</p>


<h3>Related posts:</h3><ol><li><a href='http://www.len.ro/2009/10/ubuntu-9-10-karmic-koala/' rel='bookmark' title='Permanent Link: Ubuntu 9.10 Karmic Koala'>Ubuntu 9.10 Karmic Koala</a> <small>This ubuntu installation was the bit of fun expected after...</small></li>
<li><a href='http://www.len.ro/2009/11/changing-dates-in-thunderbird/' rel='bookmark' title='Permanent Link: Changing dates format in Thunderbird'>Changing dates format in Thunderbird</a> <small>Since my migration to thunderbird I did not had many...</small></li>
<li><a href='http://www.len.ro/2009/10/evolution-to-thunderbird-migration/' rel='bookmark' title='Permanent Link: Evolution to Thunderbird migration'>Evolution to Thunderbird migration</a> <small>I have been using Evolution since more than 7 years...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.len.ro/2010/05/ubuntu-lucid-lynx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>asdoc pain</title>
		<link>http://www.len.ro/2010/05/asdoc-pain/</link>
		<comments>http://www.len.ro/2010/05/asdoc-pain/#comments</comments>
		<pubDate>Wed, 05 May 2010 16:59:47 +0000</pubDate>
		<dc:creator>len</dc:creator>
				<category><![CDATA[work]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[tinker]]></category>

		<guid isPermaLink="false">http://www.len.ro/?p=4916</guid>
		<description><![CDATA[Running asdoc should have been a breeze. Just create an ant task which calls the asdoc executable with the given parameters and voila! Well, it was not. &#60;target name="compile"&#62; &#60;exec executable="${asdoc}" failonerror="true"&#62; &#60;arg line="-doc-sources ${src.dir}"/&#62; &#60;arg line="-window-title "My Application""/&#62; &#60;arg line="-output ${asdoc.output}"/&#62; &#60;/exec&#62; &#60;/target&#62; The task started by spilling 100 errors similar to: [exec] ...budgetImport.as(9): [...]

<h3>Related posts:</h3><ol><li><a href='http://www.len.ro/2009/09/flex-applications-size-optimization/' rel='bookmark' title='Permanent Link: Flex applications size optimization'>Flex applications size optimization</a> <small>After quite some time of development we realised that our...</small></li>
<li><a href='http://www.len.ro/2009/08/radio-button-renderer-in-a-datagrid/' rel='bookmark' title='Permanent Link: Radio button renderer in a datagrid'>Radio button renderer in a datagrid</a> <small>Using a radio button as a data grid cell renderer...</small></li>
<li><a href='http://www.len.ro/2010/02/jboss-migration-4-2-2-ga-to-5-1-0-ga/' rel='bookmark' title='Permanent Link: JBoss migration 4.2.2-GA to 5.1.0-GA'>JBoss migration 4.2.2-GA to 5.1.0-GA</a> <small>In my stupidity innocence I just hoped that deploying the...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Running asdoc should have been a breeze. Just create an ant task which calls the asdoc executable with the given parameters and voila! Well, it was not.</p>
<pre>&lt;target name="compile"&gt;
&lt;exec executable="${asdoc}" failonerror="true"&gt;
&lt;arg line="-doc-sources ${src.dir}"/&gt;
&lt;arg line="-window-title "My Application""/&gt;
&lt;arg line="-output ${asdoc.output}"/&gt;
&lt;/exec&gt;
&lt;/target&gt;
<span id="more-4916"></span></pre>
<p>The task started by spilling 100 errors similar to:</p>
<pre>[exec] ...budgetImport.as(9): col: 1 Error: The public attribute can only be used inside a package.
 [exec]
 [exec] public var importing:Boolean = false;
 [exec] ^
 [exec]
 [exec] ...budgetImport.as(12): col: 1 Error: The public attribute can only be used inside a package.
 [exec]
 [exec] public var dp:Object = new Object();
 [exec] ^
 [exec]
 [exec] ...budgetImport.as(14): col: 10 Error: The public attribute can only be used inside a package.
 [exec] ^
 [exec]
 [exec] Encountered too many errors!
</pre>
<p>This should not have happened since the compilation worked fine on these classes. After some digging I decided to limit the problem to basics and tried on a few classes from the command line. It was the same problem. Some more parameters tests later I dropped the -doc-sources in favor of -doc-classes. Thus the errors disappeared. This parameter however required all classes to be passed as parameter but <a href="http://www.len.ro/2009/09/flex-applications-size-optimization/">the solution used previously to generate SWC&#8217;s helped</a>.</p>
<p>I then started to add more classes, mxml files. Bumped again into this:</p>
<pre>[exec] Error: ../myAdmin.as and ../myAdmin.mxml can't co-exist in the same directory.</pre>
<p>Hmm, I can understand that he does not know which file to associate with the class name so I got back to the -doc-sources parameter to specify each mxml by hand. The resulting task was:</p>
<pre>&lt;target name="asdoc"&gt;
 &lt;delete dir="${asdoc.output}" /&gt;
 &lt;mkdir dir="${asdoc.output}" /&gt;
 &lt;fileset id="sources" dir="${src.dir}"&gt;
 &lt;include name="all the classes, libraries, etc" /&gt;
 &lt;/fileset&gt;
 &lt;pathconvert property="classes" pathsep=" " refid="sources"&gt;
 &lt;chainedmapper&gt;
 &lt;globmapper from="${basedir}/${src.dir}/*" to="*" handledirsep="true" /&gt;
 &lt;mapper type="package" from="*.as" to="*" /&gt;
 &lt;/chainedmapper&gt;
 &lt;/pathconvert&gt;
 &lt;echo message="classes is set to = ${classes}" /&gt;
 &lt;fileset id="sources-mxml" dir="${src.dir}"&gt;
 &lt;include name="all the .mxml's which have a corresponding .as" /&gt;
 &lt;exclude name="everything with problems" /&gt;
 &lt;/fileset&gt;
 &lt;pathconvert property="doc-mxml-sources" pathsep=" " refid="sources-mxml"&gt;
 &lt;chainedmapper&gt;
 &lt;globmapper from="${basedir}/*" to="*" handledirsep="true" /&gt;
 &lt;/chainedmapper&gt;
 &lt;/pathconvert&gt;
 &lt;echo message="mxml-sources is set to = ${doc-mxml-sources}" /&gt;
 &lt;exec executable="${FLEX_HOME}/bin/${asdoc}" failonerror="true"&gt;
 &lt;!--&lt;arg line="-exclude-dependencies=true"/&gt;
 &lt;arg line="-keep-xml -warnings"/&gt;--&gt;
 &lt;arg line="-doc-classes ${classes}" /&gt;
 &lt;arg line="-doc-sources ${doc-mxml-sources}" /&gt;
 &lt;arg line="-source-path ${src.dir}" /&gt;
 &lt;arg line='-window-title "My app"' /&gt;
 &lt;arg line="-output ${asdoc.output}" /&gt;
 &lt;arg line="-library-path ${FLEX_HOME}/frameworks/libs -library-path libs" /&gt;
 &lt;/exec&gt;
 &lt;/target&gt;
</pre>
<p>This worked on most files but sometimes it gave a:</p>
<pre>[exec] An unexpected error occurred.
 [exec] Error #1083
 [exec]
 [exec] (Location of error unknown)XSLT Error (javax.xml.transform.TransformerException):
java.io.FileNotFoundException: .../flex/doc/asdoc/toplevel_classes.xml (No such file or directory)
</pre>
<p>This error came with no extra information on which file caused problems and actually means there is a asdoc tag which the asdoc does not like. There is no other way then to proceed by elimination until you find the cause (thus the reason for the exclude param). Talk about lost hours &#8230; (apparently there is a -lenient option in asdoc 4 just for this but I am still on 3)</p>
<p>Finally when everything works you will get the wonderful message:</p>
<pre>[exec] Documentation was created in ../flex/doc/asdoc/</pre>


<h3>Related posts:</h3><ol><li><a href='http://www.len.ro/2009/09/flex-applications-size-optimization/' rel='bookmark' title='Permanent Link: Flex applications size optimization'>Flex applications size optimization</a> <small>After quite some time of development we realised that our...</small></li>
<li><a href='http://www.len.ro/2009/08/radio-button-renderer-in-a-datagrid/' rel='bookmark' title='Permanent Link: Radio button renderer in a datagrid'>Radio button renderer in a datagrid</a> <small>Using a radio button as a data grid cell renderer...</small></li>
<li><a href='http://www.len.ro/2010/02/jboss-migration-4-2-2-ga-to-5-1-0-ga/' rel='bookmark' title='Permanent Link: JBoss migration 4.2.2-GA to 5.1.0-GA'>JBoss migration 4.2.2-GA to 5.1.0-GA</a> <small>In my stupidity innocence I just hoped that deploying the...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.len.ro/2010/05/asdoc-pain/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Habits</title>
		<link>http://www.len.ro/2010/02/habits/</link>
		<comments>http://www.len.ro/2010/02/habits/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 20:25:01 +0000</pubDate>
		<dc:creator>len</dc:creator>
				<category><![CDATA[mind]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[tinker]]></category>

		<guid isPermaLink="false">http://www.len.ro/?p=4715</guid>
		<description><![CDATA[Today I&#8217;ve decided to install an updated version of a complicated perl webapp (won&#8217;t name it). After compiling libraries, installing packages, installing cpan packages, recompiling, matching version, checking for compilation errors I realized almost 4h had passed and I was still at the dependencies. 1h later the application was installed but still a bug had [...]

<h3>Related posts:</h3><ol><li><a href='http://www.len.ro/2010/05/ubuntu-lucid-lynx/' rel='bookmark' title='Permanent Link: Ubuntu Lucid Lynx'>Ubuntu Lucid Lynx</a> <small>There was not much I expected from the new ubuntu...</small></li>
<li><a href='http://www.len.ro/2009/10/ubuntu-9-10-karmic-koala/' rel='bookmark' title='Permanent Link: Ubuntu 9.10 Karmic Koala'>Ubuntu 9.10 Karmic Koala</a> <small>This ubuntu installation was the bit of fun expected after...</small></li>
<li><a href='http://www.len.ro/2010/01/learning-curve/' rel='bookmark' title='Permanent Link: Learning curve'>Learning curve</a> <small>I was asking myself today about jobs and young people...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Today I&#8217;ve decided to install an updated version of a complicated perl webapp (won&#8217;t name it). After compiling libraries, installing packages, installing cpan packages, recompiling, matching version, checking for compilation errors I realized almost 4h had passed and I was still at the dependencies. 1h later the application was installed but still a bug had to be found. So I began searching on the web again. Then it struck me. How much time did I loose in my life compiling, installing, searching for bugs and incompatibles versions? I think it was too much. So I decided to enjoy my weekend and closed the computer. 30 mins later I was opening it again &#8230;</p>


<h3>Related posts:</h3><ol><li><a href='http://www.len.ro/2010/05/ubuntu-lucid-lynx/' rel='bookmark' title='Permanent Link: Ubuntu Lucid Lynx'>Ubuntu Lucid Lynx</a> <small>There was not much I expected from the new ubuntu...</small></li>
<li><a href='http://www.len.ro/2009/10/ubuntu-9-10-karmic-koala/' rel='bookmark' title='Permanent Link: Ubuntu 9.10 Karmic Koala'>Ubuntu 9.10 Karmic Koala</a> <small>This ubuntu installation was the bit of fun expected after...</small></li>
<li><a href='http://www.len.ro/2010/01/learning-curve/' rel='bookmark' title='Permanent Link: Learning curve'>Learning curve</a> <small>I was asking myself today about jobs and young people...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.len.ro/2010/02/habits/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JBoss migration 4.2.2-GA to 5.1.0-GA</title>
		<link>http://www.len.ro/2010/02/jboss-migration-4-2-2-ga-to-5-1-0-ga/</link>
		<comments>http://www.len.ro/2010/02/jboss-migration-4-2-2-ga-to-5-1-0-ga/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 10:19:15 +0000</pubDate>
		<dc:creator>len</dc:creator>
				<category><![CDATA[work]]></category>
		<category><![CDATA[J2EE]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jboss]]></category>
		<category><![CDATA[tinker]]></category>

		<guid isPermaLink="false">http://www.len.ro/?p=4695</guid>
		<description><![CDATA[In my stupidity innocence I just hoped that deploying the application on the new JBoss (from 4.2.2-GA to 5.1.0-GA) should be just a simple matter of changing paths in ant. Here are some problems I encountered and was able to fix. application.xml The format of this file has changed from: &#60;?xml version="1.0" encoding="UTF-8"?&#62; &#60;application xmlns="http://java.sun.com/xml/ns/j2ee" [...]

<h3>Related posts:</h3><ol><li><a href='http://www.len.ro/2009/12/jboss-and-ldap/' rel='bookmark' title='Permanent Link: JBoss and LDAP'>JBoss and LDAP</a> <small>Target: create a test environment for JBoss JAAS authentication using...</small></li>
<li><a href='http://www.len.ro/2010/04/tomcat-query-parameters-and-encodings/' rel='bookmark' title='Permanent Link: Tomcat query parameters and encodings'>Tomcat query parameters and encodings</a> <small>Did you ever wondered which from which encoding the query...</small></li>
<li><a href='http://www.len.ro/2009/10/evolution-to-thunderbird-migration/' rel='bookmark' title='Permanent Link: Evolution to Thunderbird migration'>Evolution to Thunderbird migration</a> <small>I have been using Evolution since more than 7 years...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>In my <span style="text-decoration: line-through;">stupidity</span> innocence I just hoped that deploying the application on the new JBoss (from 4.2.2-GA to 5.1.0-GA) should be just a simple matter of changing paths in ant. Here are some problems I encountered and was able to fix.<span id="more-4695"></span></p>
<h2>application.xml</h2>
<p>The format of this file has changed from:</p>
<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;application xmlns="http://java.sun.com/xml/ns/j2ee" version="1.4"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://java.sun.com /xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd"&gt;
 &lt;display-name&gt;My application&lt;/display-name&gt;
 &lt;description&gt;My server interface&lt;/description&gt;
...
</pre>
<p>to</p>
<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;application xmlns="http://java.sun.com/xml/ns/javaee"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"
 version="5"&gt;
 &lt;display-name&gt;My application&lt;/display-name&gt;
</pre>
<p>The description field is now no longer required and schema has changed. A minor change in itself but as you will see further there are a lot of minor changes of this type.</p>
<h2>Unified classloader</h2>
<p>In JBoss 4 in order to unify tomcat and jboss classloaders one had to change</p>
<pre>&lt;attribute name="UseJBossWebLoader"&gt;true&lt;/attribute&gt;</pre>
<p>in <strong>jboss/server/default/deploy/jboss-web.deployer/META-INF/jboss-service.xml</strong> . It is no longer the case in JBoss 5, instead the following has to be commented:</p>
<pre>&lt;!-- Allow for war local class loaders: in testing --&gt;
 &lt;!--
 &lt;bean name="WarClassLoaderDeployer"&gt;
 &lt;property name="relativeOrder"&gt;-1&lt;/property&gt;
 &lt;property name="filteredPackages"&gt;javax.servlet,org.apache.commons.logging&lt;/property&gt;      
 &lt;/bean&gt;
 --&gt;
</pre>
<p>in <strong>jboss-5.1.0.GA/server/default/deployers/jbossweb.deployer/META-INF/war-deployers-jboss-beans.xml</strong>.</p>
<h2>Hibernate har&#8217;s</h2>
<p>This is by far one of the change I found stupid. The hibernate-service.xml is now named service-hibernate.xml and it&#8217;s content has changed using the following rules:</p>
<ul>
<li>attribute elements are now called property</li>
<li>the name attribute was starting with an uppercase and now it&#8217;s lowercase</li>
</ul>
<p>Example before:</p>
<pre>&lt;server&gt;
 &lt;mbean code="org.jboss.hibernate.jmx.Hibernate" name="com.mccsoft:name=MyOracleSessionFactory"&gt;
 &lt;attribute name="DatasourceName"&gt;java:/DiapasonOracleDS&lt;/attribute&gt;
 &lt;attribute name="Dialect"&gt;org.hibernate.dialect.Oracle10gDialect&lt;/attribute&gt;
</pre>
<p>and after:</p>
<pre>&lt;hibernate-configuration xmlns="urn:jboss:hibernate-deployer:1.0"&gt;
 &lt;session-factory name="java:/hibernate/MyOracleSessionFactory"
 bean="jboss.test.har:service=Hibernate,testcase=TimersUnitTestCase"&gt;
 &lt;property name="datasourceName"&gt;java:/DiapasonOracleDS&lt;/property&gt;
 &lt;property name="dialect"&gt;org.hibernate.dialect.Oracle10gDialect&lt;/property&gt;
</pre>
<h2>TreeCache</h2>
<p>Also jbossCache configuration has changed from:</p>
<pre>&lt;attribute name="CacheProviderClass"&gt;org.hibernate.cache.TreeCacheProvider&lt;/attribute&gt;</pre>
<p>to:</p>
<pre>&lt;property name="cacheRegionFactoryClass"&gt;org.hibernate.cache.jbc2.MultiplexedJBossCacheRegionFactory&lt;/property&gt;
</pre>
<p>I am not quite sure yet how the cache parameters have changed, still searching for more documentation.</p>
<h2>ActiveMQ</h2>
<p>Since the application was using activemq a strange error occured when deploying:</p>
<pre>Specification violation [EJB3 JPA 6.2.1.2] activemq</pre>
<p>Actually it seems this is related to the format of the persistence.xml file which is unfortunately bundled in the activemq jar. I was simple however to upgrade from 5.2.0 to 5.3.0 which solved the problem.</p>
<h2>Ear service dependency</h2>
<p>One of the problems which causes the most head bumping was related to the ear service dependency. In short a service was depending on the deployment of an ear using the following syntax:</p>
<p>&lt;depends&gt;jboss.j2ee:service=EARDeployment,url=&#8217;my.ear&#8217;&lt;/depends&gt;</p>
<p>The EARDeployment does not exist in JBoss 5 and I could not find it&#8217;s proper replacement. After some trial and error I switched the dependency on a war inside the ear using the following syntax:</p>
<pre>&lt;depends&gt;jboss.web.deployment:war=/my&lt;/depends&gt;</pre>
<p>as an alternative a service provided by the ear could be used:</p>
<pre>&lt;depends&gt;com.len.queue:service=Listener&lt;/depends&gt;</pre>
<p>In all I lost a bunch of time which could have been better spend otherwise. Here are some links which helped:</p>
<ul>
<li><a href="http://community.jboss.org/wiki/useJBossWebClassLoaderinJBoss5">http://community.jboss.org/wiki/useJBossWebClassLoaderinJBoss5</a></li>
<li><a href="http://community.jboss.org/wiki/JBossHibernate3">http://community.jboss.org/wiki/JBossHibernate3</a></li>
</ul>
<p>One of the more sad results is that starting time jumped from &lt; 1m to &gt; 2m in the base config so there is surely still a lot of config to change.</p>


<h3>Related posts:</h3><ol><li><a href='http://www.len.ro/2009/12/jboss-and-ldap/' rel='bookmark' title='Permanent Link: JBoss and LDAP'>JBoss and LDAP</a> <small>Target: create a test environment for JBoss JAAS authentication using...</small></li>
<li><a href='http://www.len.ro/2010/04/tomcat-query-parameters-and-encodings/' rel='bookmark' title='Permanent Link: Tomcat query parameters and encodings'>Tomcat query parameters and encodings</a> <small>Did you ever wondered which from which encoding the query...</small></li>
<li><a href='http://www.len.ro/2009/10/evolution-to-thunderbird-migration/' rel='bookmark' title='Permanent Link: Evolution to Thunderbird migration'>Evolution to Thunderbird migration</a> <small>I have been using Evolution since more than 7 years...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.len.ro/2010/02/jboss-migration-4-2-2-ga-to-5-1-0-ga/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
