<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Open Your Code</title>
	<atom:link href="http://murygin.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://murygin.wordpress.com</link>
	<description>Blog of Daniel Murygin</description>
	<lastBuildDate>Mon, 02 Jan 2012 10:06:56 +0000</lastBuildDate>
	<language>de</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='murygin.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Open Your Code</title>
		<link>http://murygin.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://murygin.wordpress.com/osd.xml" title="Open Your Code" />
	<atom:link rel='hub' href='http://murygin.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Build and Run JEE Applications in the Cloud</title>
		<link>http://murygin.wordpress.com/2011/10/26/build-and-run-jee-applications-in-the-cloud/</link>
		<comments>http://murygin.wordpress.com/2011/10/26/build-and-run-jee-applications-in-the-cloud/#comments</comments>
		<pubDate>Wed, 26 Oct 2011 20:20:15 +0000</pubDate>
		<dc:creator>murygin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[cloudbees]]></category>
		<category><![CDATA[jee]]></category>

		<guid isPermaLink="false">http://murygin.wordpress.com/?p=372</guid>
		<description><![CDATA[CloudBees offers a service to build and run JEE applications. After registering you get an ready to use Jenkins build system and an application server instance to run your application. Both is free with some limitations. The best thing is: You can combine both services. After building your application Jenkins is deploying it automatically to <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=murygin.wordpress.com&amp;blog=1115167&amp;post=372&amp;subd=murygin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone" src="http://upload.wikimedia.org/wikipedia/commons/thumb/9/98/Anvil_shaped_cumulus_panorama_edit_crop.jpg/320px-Anvil_shaped_cumulus_panorama_edit_crop.jpg" alt="" width="320" height="132" /></p>
<p><a title="CloudBees" href="http://www.cloudbees.com/" target="_blank">CloudBees</a> offers a service to build and run JEE applications. After registering you get an ready to use <a title="Jenkins CI" href="http://jenkins-ci.org/" target="_blank">Jenkins</a> build system and an application server instance to run your application. Both is free with some limitations. The best thing is: You can combine both services. After building your application Jenkins is deploying it automatically to it&#8217;s CloudBees fellow and the build result is online and ready for use immediately afterwards.</p>
<p><span id="more-372"></span> I choosed an easy to install web application to test the service: <a title="Pebble blogging system" href="http://pebble.sourceforge.net/" target="_blank">Pebble</a>, a lightweight, open source, Java EE blogging tool, build my maven. The goal was to build and run Pebble by CloudBees.</p>
<p>Since I had to change to maven configuration of the Pebble project a little I imported the SVN repository to <a title="Pebble github repo" href="https://github.com/murygin/pebble" target="_blank">my own</a> at github. After that I could change and commit the <em>pom.xml</em> to run Maven goals of CloudBees. In the <em>pluginRepositories</em> of the <em>pom.xml</em> section I added:</p>
<p><pre class="brush: xml; gutter: false; wrap-lines: false;">
 &lt;pluginRepositories&gt;
   &lt;pluginRepository&gt;
     &lt;id&gt;bees-plugins-snapshots&lt;/id&gt;
     &lt;url&gt;http://repository-cloudbees.forge.cloudbees.com/public-snapshot/  &lt;/url&gt;
     &lt;releases&gt;
       &lt;enabled&gt;true&lt;/enabled&gt;
     &lt;/releases&gt;
     &lt;snapshots&gt;
       &lt;enabled&gt;true&lt;/enabled&gt;
     &lt;/snapshots&gt;
    &lt;/pluginRepository&gt;
 &lt;/pluginRepositories&gt;
</pre></p>
<p>and the following to section <em>build</em>:</p>
<p><pre class="brush: xml; gutter: false; wrap-lines: false;">
&lt;build&gt;
   &lt;plugins&gt;
     &lt;plugin&gt;
       &lt;groupId&gt;com.cloudbees&lt;/groupId&gt;
       &lt;artifactId&gt;bees-maven-plugin&lt;/artifactId&gt;
     &lt;/plugin&gt;
   &lt;/plugins&gt;
 &lt;/build&gt;
</pre></p>
<p>After that I switched over to CloudBess and added the <em>Applications</em> service to my account which is also called <em>RUN@cloud</em>. In the service configuration I added a new application called <em>pebble</em>. No more configuration is needed here since Pebble needs no external database to run.</p>
<p><a href="http://murygin.files.wordpress.com/2011/10/applications.png"><img class="size-medium wp-image-379 alignnone" title="RUN@cloud" src="http://murygin.files.wordpress.com/2011/10/applications.png?w=701&#038;h=401" alt="" width="701" height="401" /></a></p>
<p>Next think was to add the Jenkins service to my account, called <em>DEV@cloud</em>. Jenkins is configured by the standard web interface:</p>
<p><a href="http://murygin.files.wordpress.com/2011/10/jenkins-1.png"><img class="alignnone size-full wp-image-387" title="CloudBees Jenkins" src="http://murygin.files.wordpress.com/2011/10/jenkins-1.png?w=510&#038;h=339" alt="" width="510" height="339" /></a></p>
<p>I created a new job and choosed <em>Build a maven2/3 project</em>. In section <em>Source Code Management</em> of the job I selected Git an entered the Url of the repo: <em>git://github.com/murygin/pebble.git</em>.</p>
<p><a href="http://murygin.files.wordpress.com/2011/10/source-code-management.png"><img class="alignnone size-medium wp-image-381" title="Jencins source-code-management" src="http://murygin.files.wordpress.com/2011/10/source-code-management.png?w=503&#038;h=339" alt="" width="503" height="339" /></a></p>
<p>More complicated is section <em>Build</em>. Here you have add the maven goal of CloudBees to deploy the application the application server:<br />
<code>bees:deploy -Dbees.appid=[ACCOUNT]/[APPLICATION± -Dbees.apikey=[API-KEY] -Dbees.secret=</code>[SECRET-KEY]</p>
<p><a href="http://murygin.files.wordpress.com/2011/10/maven-build1.png"><img class="alignnone size-full wp-image-385" title="Jenkins maven build configuration" src="http://murygin.files.wordpress.com/2011/10/maven-build1.png?w=510" alt=""   /></a></p>
<p>API key and secret key you find in your CloudBees account settings.<br />
Remember: This maven goal only works if you added the CloudBees plugin to your <em>pom.xml</em> as described above.</p>
<p>After running the job the project was build and deployed to the CloudBees application server. See my running example at: <a title="Pebble build by CloudBees" href="http://pebble.murygin.cloudbees.net/" target="_blank">http://pebble.murygin.cloudbees.net/</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/murygin.wordpress.com/372/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/murygin.wordpress.com/372/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/murygin.wordpress.com/372/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/murygin.wordpress.com/372/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/murygin.wordpress.com/372/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/murygin.wordpress.com/372/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/murygin.wordpress.com/372/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/murygin.wordpress.com/372/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/murygin.wordpress.com/372/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/murygin.wordpress.com/372/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/murygin.wordpress.com/372/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/murygin.wordpress.com/372/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/murygin.wordpress.com/372/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/murygin.wordpress.com/372/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=murygin.wordpress.com&amp;blog=1115167&amp;post=372&amp;subd=murygin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://murygin.wordpress.com/2011/10/26/build-and-run-jee-applications-in-the-cloud/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/90da726fd5df2c5c18305275da4fddb1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">murygin</media:title>
		</media:content>

		<media:content url="http://upload.wikimedia.org/wikipedia/commons/thumb/9/98/Anvil_shaped_cumulus_panorama_edit_crop.jpg/320px-Anvil_shaped_cumulus_panorama_edit_crop.jpg" medium="image" />

		<media:content url="http://murygin.files.wordpress.com/2011/10/applications.png?w=300" medium="image">
			<media:title type="html">RUN@cloud</media:title>
		</media:content>

		<media:content url="http://murygin.files.wordpress.com/2011/10/jenkins-1.png" medium="image">
			<media:title type="html">CloudBees Jenkins</media:title>
		</media:content>

		<media:content url="http://murygin.files.wordpress.com/2011/10/source-code-management.png?w=300" medium="image">
			<media:title type="html">Jencins source-code-management</media:title>
		</media:content>

		<media:content url="http://murygin.files.wordpress.com/2011/10/maven-build1.png" medium="image">
			<media:title type="html">Jenkins maven build configuration</media:title>
		</media:content>
	</item>
		<item>
		<title>PostgreSQL &#8211; List indices</title>
		<link>http://murygin.wordpress.com/2011/10/17/postgresql-list-indices/</link>
		<comments>http://murygin.wordpress.com/2011/10/17/postgresql-list-indices/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 14:23:58 +0000</pubDate>
		<dc:creator>murygin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://murygin.wordpress.com/?p=365</guid>
		<description><![CDATA[Just a short note about listing indices of PostgreSQL databases. To get a list of all indices execute the following: You can exclude indices of system tables by adding where clauses<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=murygin.wordpress.com&amp;blog=1115167&amp;post=365&amp;subd=murygin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://murygin.wordpress.com/2011/10/17/postgresql-list-indices/"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/7/7e/Schlagwortkatalog.jpg/250px-Schlagwortkatalog.jpg" alt="Indices" width="250" height="211" /></a><br />
Just a short note about listing indices of <a title="PostgreSQL" href="http://www.postgresql.org/">PostgreSQL</a> databases.</p>
<p><span id="more-365"></span></p>
<p>To get a list of all indices execute the following:</p>
<p><pre class="brush: sql; gutter: false; wrap-lines: false;">
SELECT
    t.relname AS table_name,
    i.relname AS index_name,
    a.attname AS column_name
FROM
    pg_class t,
    pg_class i,
    pg_index ix,
    pg_attribute a
WHERE
    t.oid = ix.indrelid
    AND i.oid = ix.indexrelid
    AND a.attrelid = t.oid
    AND a.attnum = ANY(ix.indkey)
    AND t.relkind = 'r'
ORDER BY
    t.relname,
    i.relname;
</pre></p>
<p>You can exclude indices of system tables by adding where clauses:</p>
<p><pre class="brush: sql; gutter: false; wrap-lines: false;">
SELECT
    t.relname AS table_name,
    i.relname AS index_name,
    a.attname AS column_name
FROM
    pg_class t,
    pg_class i,
    pg_index ix,
    pg_attribute a
WHERE
    t.oid = ix.indrelid
    AND i.oid = ix.indexrelid
    AND a.attrelid = t.oid
    AND a.attnum = ANY(ix.indkey)
    AND t.relkind = 'r'
    AND t.relname NOT LIKE 'pg_%'
ORDER BY
    t.relname,
    i.relname;
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/murygin.wordpress.com/365/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/murygin.wordpress.com/365/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/murygin.wordpress.com/365/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/murygin.wordpress.com/365/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/murygin.wordpress.com/365/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/murygin.wordpress.com/365/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/murygin.wordpress.com/365/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/murygin.wordpress.com/365/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/murygin.wordpress.com/365/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/murygin.wordpress.com/365/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/murygin.wordpress.com/365/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/murygin.wordpress.com/365/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/murygin.wordpress.com/365/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/murygin.wordpress.com/365/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=murygin.wordpress.com&amp;blog=1115167&amp;post=365&amp;subd=murygin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://murygin.wordpress.com/2011/10/17/postgresql-list-indices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/90da726fd5df2c5c18305275da4fddb1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">murygin</media:title>
		</media:content>

		<media:content url="http://upload.wikimedia.org/wikipedia/commons/thumb/7/7e/Schlagwortkatalog.jpg/250px-Schlagwortkatalog.jpg" medium="image">
			<media:title type="html">Indices</media:title>
		</media:content>
	</item>
		<item>
		<title>Dub-Techno Mix (Traditional Style)</title>
		<link>http://murygin.wordpress.com/2011/05/19/traditional-dub-techo-mix/</link>
		<comments>http://murygin.wordpress.com/2011/05/19/traditional-dub-techo-mix/#comments</comments>
		<pubDate>Thu, 19 May 2011 18:55:00 +0000</pubDate>
		<dc:creator>murygin</dc:creator>
				<category><![CDATA[Music]]></category>
		<category><![CDATA[creative-commons]]></category>
		<category><![CDATA[dub-techno]]></category>
		<category><![CDATA[mixxx]]></category>
		<category><![CDATA[netlabel]]></category>

		<guid isPermaLink="false">http://murygin.wordpress.com/?p=339</guid>
		<description><![CDATA[I released my first DJ mix on SoundCloud, a platform to share sound. Since SoundCloud provides widgets for WordPress Blogs like this, you can listen to the mix right here. Just click the Play button before you continue reading: Dub-Techno is a mixture of Dub and Techno. Dub grew out of reggae music, so it&#8217;s <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=murygin.wordpress.com&amp;blog=1115167&amp;post=339&amp;subd=murygin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I released <a href="http://soundcloud.com/n2000/traditional-dub-techo-mix">my first DJ mix</a> on <a href="http://soundcloud.com">SoundCloud</a>, a platform to share sound. Since SoundCloud provides widgets for WordPress Blogs like this, you can listen to the mix right here. Just click the Play button before you continue reading:<br />
<object height="81" width="100%"><param name="wmode" value="transparent"><param name="movie" value="http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fsoundcloud.com%2Fn2000%2Ftraditional-dub-techo-mix&amp;g=1&amp;"></param><embed height="81" src="http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fsoundcloud.com%2Fn2000%2Ftraditional-dub-techo-mix&amp;g=1&amp;" type="application/x-shockwave-flash" width="100%"> </embed> </object><br />
<span id="more-339"></span><br />
Dub-Techno is a mixture of <a href="http://en.wikipedia.org/wiki/Dub_music">Dub</a> and <a href="http://de.wikipedia.org/wiki/Techno">Techno</a>. Dub grew out of reggae music, so it&#8217;s similar to this. If you hate Techno you still might like Dub-Techno because it&#8217;s completely different to pure Techno music. Traditional Style in the title means that this mix is more Dub than Techno.</p>
<p>All tracks in this mix are so-called CC-Music. They are released by different <a href="http://en.wikipedia.org/wiki/Netlabel">netlabels</a> under a <a href="http://en.wikipedia.org/wiki/Creative_Commons_licenses">Creative-Commons (CC) licence</a>. (Simplified) this means that you can copy and share this music legally without getting jailed by the <a href="http://en.wikipedia.org/wiki/Riaa">evil music industry</a>. Following the principals of Creative-Commons my mix is also CC licenced. You can use and change it. Redistribute it or copy it.</p>
<p>The Mix is recorded with <a href="http://www.mixxx.org/">Mixxx</a> on <a href="http://www.ubuntu.com">Ubuntu Linux</a>. Mixxx is a Open Source Digital DJ Software. It&#8217;s the best Open Source Software i discovered lately. Big thanks to the <a href="http://www.mixxx.org/contact.php">developers</a>! </p>
<p>Details about the tracks:</p>
<p><strong>#1 &#8211; Monomodal</strong></p>
<ul>
<li>Artist: <a href="http://www.discogs.com/artist/Segue">Segue</a></li>
<li>Release: <a href="http://www.discogs.com/Segue-Nostalgia/release/1005293">Nostalgia</a></li>
<li>Download: <a href="http://www.silentseason.com/">http://www.silentseason.com/</a></li>
<li>Netlabel: <a href="http://www.silentseason.com/">Silent Season</a> from Canada</li>
</ul>
<p><strong>#2 &#8211; Steppa Stylee 2</strong></p>
<ul>
<li>Artist: <a href="http://www.discogs.com/artist/Hieronymus">Hieronymus</a></li>
<li>Release: <a href="http://www.discogs.com/Hieronymus-Untitled/release/410967">[KY_D06]</a></li>
<li>Download: <a href="http://www.archive.org/details/KY_D06">http://www.archive.org/details/KY_D06</a></li>
<li>Netlabel: <a href="http://www.discogs.com/label/Kyoto_Digital">Kyoto Digital</a> from Denmark</li>
</ul>
<p><strong>#3 &#8211; Gydantis Lietus</strong></p>
<ul>
<li>Artist: <a href="http://www.discogs.com/artist/Giriu+Dvasios">Giriu Dvasios</a></li>
<li>Release: The Sound Of Nature 2</li>
<li>Download: <a href="http://coldtear.com/the-sound-of-nature-2/">http://coldtear.com/the-sound-of-nature-2/</a></li>
<li>Netlabel: <a href="http://coldtear.com/">Cold Tear Records</a> from Lithuania</li>
</ul>
<p><strong>#4 &#8211; Decode</strong></p>
<ul>
<li>Artist: <a href="http://www.discogs.com/artist/Dublicator">Dublicator</a></li>
<li>Release: <a href="http://www.discogs.com/Dublicator-Dublication/release/1335341">Dublication</a></li>
<li>Download: <a href="http://nnnl.hu/nnnl.07/nnnl07.html">http://nnnl.hu/nnnl.07/nnnl07.html</a></li>
<li>Netlabel: <a href="http://nnnl.hu">nonstopnonsense</a> from Hungary</li>
</ul>
<p><strong>#5 &#8211; Floating</strong></p>
<ul>
<li>Artist: <a href="http://www.discogs.com/artist/Dominique+Jacquinet">Dominique Jacquinet</a></li>
<li>Release: <a href="http://www.discogs.com/Dominique-Jacquinet-Floating/release/1295886">Floating</a></li>
<li>Downlaod: <a href="http://www.this-side.net/releases/tup004">http://www.this-side.net/releases/tup004</a></li>
<li>Netlabel: <a href="http://www.this-side.net/">This Side Music</a> from Greece</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/murygin.wordpress.com/339/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/murygin.wordpress.com/339/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/murygin.wordpress.com/339/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/murygin.wordpress.com/339/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/murygin.wordpress.com/339/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/murygin.wordpress.com/339/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/murygin.wordpress.com/339/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/murygin.wordpress.com/339/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/murygin.wordpress.com/339/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/murygin.wordpress.com/339/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/murygin.wordpress.com/339/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/murygin.wordpress.com/339/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/murygin.wordpress.com/339/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/murygin.wordpress.com/339/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=murygin.wordpress.com&amp;blog=1115167&amp;post=339&amp;subd=murygin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://murygin.wordpress.com/2011/05/19/traditional-dub-techo-mix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/90da726fd5df2c5c18305275da4fddb1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">murygin</media:title>
		</media:content>
	</item>
		<item>
		<title>Table-Detail-View with RichFaces Data Table</title>
		<link>http://murygin.wordpress.com/2011/01/20/richfaces-data-table/</link>
		<comments>http://murygin.wordpress.com/2011/01/20/richfaces-data-table/#comments</comments>
		<pubDate>Thu, 20 Jan 2011 14:57:37 +0000</pubDate>
		<dc:creator>murygin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[jsf]]></category>
		<category><![CDATA[richfaces]]></category>

		<guid isPermaLink="false">http://murygin.wordpress.com/?p=307</guid>
		<description><![CDATA[It&#8217;s a common task in almost every application to show a table with a list of items and a detail view with one selected item of the table. RichFaces provides a data table component with a lot of sorting and ordering features called extendedDataTable. I will show how to implement the selection of one item <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=murygin.wordpress.com&amp;blog=1115167&amp;post=307&amp;subd=murygin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone" src="http://www.technologyevangelist.com/images/AJAX.jpg" alt="AJAX !!" width="240" height="180" /></p>
<p>It&#8217;s a common task in almost every application to show a table with a list of items and a detail view with one selected item of the table. <a href="http://www.jboss.org/richfaces/">RichFaces</a> provides a data table component with a lot of sorting and ordering features called <em>extendedDataTable</em>. I will show how to implement the selection of one item of the table and display the item data in separate detail component. All action is done by AJAX requests without a page reload. You need a JSF application and RichFaces components to run this. To get started see the <a href="http://docs.jboss.org/richfaces/latest_3_3_X/en/devguide/html_single/">RichFaces Developer Guide</a>.</p>
<p><span id="more-307"></span></p>
<p>In your JSF backing bean you need two properties holding your data, one for the list of items and one for the selected item. In the code sample they are called <em>taskList</em> and <em>selectedTask</em>. The list values are displayed in the <em>extendedDataTable</em>. If the user clicks one row the selected item is set as <em>selectedTask</em> in the bean. There are two more fields in the bean holding Richfaces data to implement the selection of table items: <em>table</em> and <em>selection</em>. You have to add them to your bean. Disadvantage is that your nice <a href="http://en.wikipedia.org/wiki/Plain_Old_Java_Object">POJO</a> now depends on RichFaces classes. Both are bind to <em>extendedDataTable</em> as you can see in the second code sample.</p>
<p>Loading of list items is done in <em>loadTasks()</em> which is called only once. Selecting of a item is done in method <em>openTask()</em> which is called when user clicks a table row.</p>
<p><pre class="brush: java; gutter: false; wrap-lines: false;">
public class TaskBean {
    
    List&lt;ITask&gt; taskList;
    ITask selectedTask;
    
    private HtmlExtendedDataTable table;
    private Selection selection = new SimpleSelection();
    
    public void openTask() {  
        Iterator&lt;Object&gt; iterator = getSelection().getKeys();
        while (iterator.hasNext()) {
            Object key = iterator.next();
            table.setRowKey(key);
            if (table.isRowAvailable()) {
                setSelectedTask( (ITask) table.getRowData());
            }
        }     
    }

    public List&lt;ITask&gt; loadTasks() {   
        return taskList = getTaskService().getTaskList();
    }

    public List&lt;ITask&gt; getTaskList() {
        if(this.taskList==null) {
            this.taskList = loadTasks();
        }
        return taskList;
    }
    public void setTaskList(List&lt;ITask&gt; taskList) {     
        this.taskList = taskList;
    }

    public ITask getSelectedTask() {
        return selectedTask;
    }
    public void setSelectedTask(ITask selectedTask) {
        this.selectedTask = selectedTask;
    }

    public HtmlExtendedDataTable getTable() {
        return table;
    }
    public void setTable(HtmlExtendedDataTable table) {
        this.table = table;
    }

    public Selection getSelection() {
        return selection;
    }
    public void setSelection(Selection selection) {
        this.selection = selection;
    }
    
    private ITaskService getTaskService() {
        return (ITaskService) VeriniceContext.get(VeriniceContext.TASK_SERVICE);
    }
}
</pre></p>
<p>In your template you have to add a <em>rich:extendedDataTable</em>. Several attributes are bind to the backing bean:</p>
<ul>
<li><em>value=&#8220;#{task.taskList}&#8220;</em>  &#8211; The item list to dispaly in the table</li>
<li><em>var=&#8220;item&#8220;</em> &#8211; Variable name used while iterating the list.</li>
<li><em>binding=&#8220;#{task.table}&#8220;</em> &#8211; Richfaces class to hold table data, instance of <em>org.richfaces.component.html.HtmlExtendedDataTable</em></li>
<li><em>selection=&#8220;#{task.selection}</em>&#8220; &#8211; Richfaces class to hold table selection, instance of <em>org.richfaces.model.selection.Selection</em></li>
</ul>
<p>There is an important nested element inside <em>extendedDataTable</em>: <em>a4j:support</em>, which handles the selection of items. When user clicks on a table row it executes the <em>openTask</em> method in the bean and re-renders the <em>detailPanel</em> afterwards. In this example the detail panel only shows the tile of the selected item. Of course you add more attributes here or to show or edit the item.</p>
<p><pre class="brush: xml; gutter: false; wrap-lines: false;">
&lt;ui:composition xmlns=&quot;http://www.w3.org/1999/xhtml&quot;
      xmlns:ui=&quot;http://java.sun.com/jsf/facelets&quot;
      xmlns:h=&quot;http://java.sun.com/jsf/html&quot;
      xmlns:f=&quot;http://java.sun.com/jsf/core&quot;
      xmlns:a4j=&quot;http://richfaces.org/a4j&quot;
      xmlns:rich=&quot;http://richfaces.org/rich&quot;
      template=&quot;/template.xhtml&quot;&gt;
	&lt;ui:define name=&quot;content&quot;&gt;
		&lt;a4j:outputPanel id=&quot;tablePanel&quot;&gt;	     
			 &lt;rich:extendedDataTable
			 	id=&quot;taskTable&quot;
                value=&quot;#{task.taskList}&quot; 
                var=&quot;item&quot;
                binding=&quot;#{task.table}&quot;
                selectionMode=&quot;single&quot;
                selection=&quot;#{task.selection}&quot;
                width=&quot;344&quot;&gt;						                
                &lt;rich:column id=&quot;colTitle&quot;
					sortable=&quot;true&quot; 
					sortBy=&quot;#{item.name}&quot;
                    label=&quot;#{msgTask['title']}&quot;
                    width=&quot;130&quot;&gt;
                    &lt;f:facet name=&quot;header&quot;&gt;
                        &lt;h:outputText value=&quot;#{msgTask['title']}&quot; /&gt;
                    &lt;/f:facet&gt;
                    &lt;h:outputText value=&quot;#{item.name}&quot;/&gt;
                &lt;/rich:column&gt;			                		                
                &lt;rich:column id=&quot;colDate&quot;
					sortable=&quot;true&quot; 
					sortBy=&quot;#{item.createDate}&quot;
                    label=&quot;bis&quot;
                    width=&quot;84&quot;&gt;
                    &lt;f:facet name=&quot;header&quot;&gt;
                        &lt;h:outputText value=&quot;#{msgTask['createDate']}&quot; /&gt;
                    &lt;/f:facet&gt;
                    &lt;h:outputText value=&quot;#{item.createDate}&quot;&gt;
				    	&lt;f:convertDateTime dateStyle=&quot;short&quot; type=&quot;date&quot; timeZone=&quot;#{task.timeZone}&quot; /&gt;
				    &lt;/h:outputText&gt;
                &lt;/rich:column&gt;
                &lt;a4j:support reRender=&quot;detailPanel&quot;
	                    action=&quot;#{task.openTask}&quot;
	                    event=&quot;onselectionchange&quot; /&gt;					 
            &lt;/rich:extendedDataTable&gt;				
		&lt;/a4j:outputPanel&gt;
		&lt;a4j:outputPanel id=&quot;detailPanel&quot;&gt;
			&lt;h:outputText value=&quot;#{task.selectedTask.name}&quot;/&gt;
		&lt;/a4j:outputPanel&gt;				
	&lt;/ui:define&gt;
&lt;/ui:composition&gt;
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/murygin.wordpress.com/307/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/murygin.wordpress.com/307/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/murygin.wordpress.com/307/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/murygin.wordpress.com/307/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/murygin.wordpress.com/307/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/murygin.wordpress.com/307/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/murygin.wordpress.com/307/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/murygin.wordpress.com/307/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/murygin.wordpress.com/307/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/murygin.wordpress.com/307/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/murygin.wordpress.com/307/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/murygin.wordpress.com/307/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/murygin.wordpress.com/307/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/murygin.wordpress.com/307/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=murygin.wordpress.com&amp;blog=1115167&amp;post=307&amp;subd=murygin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://murygin.wordpress.com/2011/01/20/richfaces-data-table/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/90da726fd5df2c5c18305275da4fddb1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">murygin</media:title>
		</media:content>

		<media:content url="http://www.technologyevangelist.com/images/AJAX.jpg" medium="image">
			<media:title type="html">AJAX !!</media:title>
		</media:content>
	</item>
		<item>
		<title>JSF and Dependency Injection</title>
		<link>http://murygin.wordpress.com/2011/01/17/jsf-and-dependency-injection/</link>
		<comments>http://murygin.wordpress.com/2011/01/17/jsf-and-dependency-injection/#comments</comments>
		<pubDate>Mon, 17 Jan 2011 12:36:19 +0000</pubDate>
		<dc:creator>murygin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[dependency injection]]></category>
		<category><![CDATA[jsf]]></category>

		<guid isPermaLink="false">http://murygin.wordpress.com/?p=297</guid>
		<description><![CDATA[Last week i noticed that you can easily inject one managed bean into another in your JSF configuration file faces-config.xml. Even if this not new to all of you i will write some configuration details. The following code injects an instance of managed bean edit into an instance of bean task. Value #{edit} is referencing <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=murygin.wordpress.com&amp;blog=1115167&amp;post=297&amp;subd=murygin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img src="https://static.rp-online.de/layout/fotos/195x156/30885-stammzellen_ddp.jpg" alt="Inject" /></p>
<p>Last week i noticed that you can easily <a href="http://en.wikipedia.org/wiki/Dependency_injection">inject</a> one managed bean into another in your JSF configuration file <em>faces-config.xml</em>. Even if this not new to all of you i will write some configuration details.</p>
<p><span id="more-297"></span></p>
<p>The following code injects an instance of managed bean <em>edit</em> into an instance of bean <em>task</em>. Value <em>#{edit}</em> is referencing the managed-bean-name <em>edit</em>.</p>
<p><pre class="brush: xml; gutter: false; wrap-lines: false;">
&lt;faces-config&gt;
   ..
    &lt;managed-bean&gt;
        &lt;managed-bean-name&gt;task&lt;/managed-bean-name&gt;
        &lt;managed-bean-class&gt;sernet.verinice.web.TaskBean&lt;/managed-bean-class&gt;
        &lt;managed-bean-scope&gt;session&lt;/managed-bean-scope&gt;
        &lt;managed-property&gt;
            &lt;property-name&gt;editBean&lt;/property-name&gt;
            &lt;property-class&gt;sernet.verinice.web.EditBean&lt;/property-class&gt;
            &lt;value&gt;#{edit}&lt;/value&gt;
        &lt;/managed-property&gt;
    &lt;/managed-bean&gt;
    &lt;managed-bean&gt;
        &lt;managed-bean-name&gt;edit&lt;/managed-bean-name&gt;
        &lt;managed-bean-class&gt;sernet.verinice.web.EditBean&lt;/managed-bean-class&gt;
        &lt;managed-bean-scope&gt;session&lt;/managed-bean-scope&gt;
    &lt;/managed-bean&gt;
   ..
&lt;/faces-config&gt;
</pre></p>
<p>Class TaskBean needs a public getter and setter for EditBean:<br />
<pre class="brush: java; gutter: false; wrap-lines: false;">
public class TaskBean {

    private EditBean editBean;
    
    public EditBean getEditBean() {
        return editBean;
    }

    public void setEditBean(EditBean editBean) {
        this.editBean = editBean;
    }
}
</pre></p>
<p>The web container creates instances of <em>TaskBean</em> and <em>EditBean</em> for every user session. Without any &#8222;clue code&#8220; the <em>EditBean</em> is set to the <em>TaskBean</em> instance by the container .</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/murygin.wordpress.com/297/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/murygin.wordpress.com/297/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/murygin.wordpress.com/297/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/murygin.wordpress.com/297/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/murygin.wordpress.com/297/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/murygin.wordpress.com/297/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/murygin.wordpress.com/297/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/murygin.wordpress.com/297/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/murygin.wordpress.com/297/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/murygin.wordpress.com/297/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/murygin.wordpress.com/297/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/murygin.wordpress.com/297/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/murygin.wordpress.com/297/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/murygin.wordpress.com/297/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=murygin.wordpress.com&amp;blog=1115167&amp;post=297&amp;subd=murygin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://murygin.wordpress.com/2011/01/17/jsf-and-dependency-injection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/90da726fd5df2c5c18305275da4fddb1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">murygin</media:title>
		</media:content>

		<media:content url="https://static.rp-online.de/layout/fotos/195x156/30885-stammzellen_ddp.jpg" medium="image">
			<media:title type="html">Inject</media:title>
		</media:content>
	</item>
		<item>
		<title>Public-key cryptography</title>
		<link>http://murygin.wordpress.com/2010/10/08/public-key-cryptography/</link>
		<comments>http://murygin.wordpress.com/2010/10/08/public-key-cryptography/#comments</comments>
		<pubDate>Fri, 08 Oct 2010 11:56:42 +0000</pubDate>
		<dc:creator>murygin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Bouncy Castle]]></category>
		<category><![CDATA[cryptography]]></category>

		<guid isPermaLink="false">http://murygin.wordpress.com/?p=263</guid>
		<description><![CDATA[Using public-key cryptography anyone can encrypt messages using the public key, but only the holder of the paired private key can decrypt. Security depends on the secrecy of that private key. This article describes the Java implementation of this approach based on the open source cryptography API for Java from Bouncy Castle. Bouncy Castle provides <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=murygin.wordpress.com&amp;blog=1115167&amp;post=263&amp;subd=murygin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Enigma_machine"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/b/bc/Bletchley_Park_Naval_Enigma_IMG_3604.JPG/170px-Bletchley_Park_Naval_Enigma_IMG_3604.JPG" alt="Enigma" /></a></p>
<p>Using <a href="http://en.wikipedia.org/wiki/Public-key_cryptography">public-key cryptography</a> anyone can encrypt messages using the public key, but only the holder of the paired private key can decrypt. Security depends on the secrecy of that private key.</p>
<p>This article describes the Java implementation of this approach based on the open source cryptography API for Java from <a href="http://bouncycastle.org/">Bouncy Castle</a>. </p>
<p><span id="more-263"></span></p>
<p>Bouncy Castle provides a comprehensive but not easy to use API. I will show a utility class providing simple static methods for public-key encryption, which uses Bouncy Castle API internally. We use this class in <a href="http://www.verinice.org/">verinice</a> an open source<a href="http://en.wikipedia.org/wiki/Information_security_management_system"> Information security management system</a>. You can download it from the verinice source code repository: <a href="http://svn.verinice.org/svnroot/TRUNK/sernet.verinice.encryption/src/sernet/verinice/encryption/impl/SMIMEBasedEncryption.java">SMIMEBasedEncryption.java</a>. You also need classes from <a href="http://svn.verinice.org/svnroot/TRUNK/sernet.verinice.encryption/src/sernet/verinice/encryption/impl/util/">this package</a> to compile SMIMEBasedEncryption.</p>
<p>Before using this class you have to enable unlimited strength encryption in the JRE. Go to the bottom of the <a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">JDK download page</a>, download <em>Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 6</em>, and follow the instructioins in the archive.</p>
<h3><strong>Encrypt</strong></h3>
<p><em>SMIMEBasedEncryption</em> has to methods to encrypt and decrypt data.<br />
Static method <em><strong>encrypt</strong></em>:</p>
<ul>
<li>Param <em>byte[] unencryptedByteData</em> &#8211; The data to encrypt. You have to transform your <em>String</em> or <em>File</em> to a byte Array before</li>
<li>Param <em>File x509CertificateFile</em> &#8211; Public key or certificate for encryption. I will describe below how to create this file with <em>openssl</em>.</li>
<li>Returns the encrypted data as byte array.</li>
</ul>
<p>Source:<br />
<pre class="brush: java; gutter: false; wrap-lines: false;">
public static byte[] encrypt(byte[] unencryptedByteData, File x509CertificateFile) 
  throws Exception {

  byte[] encryptedMimeData = new byte[] {};
  X509Certificate x509Certificate = CertificateUtils.loadX509CertificateFromFile(x509CertificateFile);
  try {
      SMIMEEnvelopedGenerator generator = new SMIMEEnvelopedGenerator();
      generator.addKeyTransRecipient(x509Certificate);
		
      // create Base64 encoded mime body
      unencryptedByteData = Base64.encode(unencryptedByteData);
      MimeBodyPart unencryptedContent = SMIMEUtil.toMimeBodyPart(unencryptedByteData);

      // Encrypt the byte data and make a MimeBodyPart from it
      MimeBodyPart encryptedMimeBodyPart = generator.generate(unencryptedContent, SMIMEEnvelopedGenerator.AES256_CBC, BouncyCastleProvider.PROVIDER_NAME);

      // Finally get the encoded bytes from the MimeMessage and return them
      ByteArrayOutputStream byteOutStream = new ByteArrayOutputStream();
      encryptedMimeBodyPart.writeTo(byteOutStream);
      encryptedMimeData = byteOutStream.toByteArray();
  } catch (Exception e) {
        throw new EncryptionException(&amp;quot;There was a problem during the en- or decryption process. See the stacktrace for details.&amp;quot;, e);
  }
  return encryptedMimeData;
}
</pre></p>
<h3><strong>Decrypt</strong></h3>
<p>Static method <em><strong>decrypt</strong></em>:</p>
<ul>
<li>Param <em>byte[] encryptedByteData</em> &#8211; The encrypted data. Reed this from a file or database before.</li>
<li>Param <em>File x509CertificateFile</em> &#8211; Public key or certificate for decryption. I will describe below how to create this file with <em>openssl</em>.</li>
<li>Param <em>File privateKeyPemFile</em> &#8211; Private key for decryption. I will describe below how to create this file with <em>openssl</em>.</li>
<li><em>String privateKeyPassword</em> &#8211; The password for the private key. This param is optional since not every private key is password protected. It might be <em>null</em>.
<li>Returns the decrypted data as byte array.</li>
</ul>
<p>Source:<br />
<pre class="brush: java; gutter: false; wrap-lines: false;">
public static byte[] decrypt(
  byte[] encryptedByteData, 
  File x509CertificateFile, 
  File privateKeyPemFile, 
  final String privateKeyPassword) throws Exception {

  byte[] decryptedByteData = new byte[] {};
  // Get public key certificate
  X509Certificate x509Certificate = CertificateUtils.loadX509CertificateFromFile(x509CertificateFile);

  // The recipient of the S/MIME encrypted message
  RecipientId recipient = new RecipientId();
  recipient.setSerialNumber(x509Certificate.getSerialNumber());
  recipient.setIssuer(x509Certificate.getIssuerX500Principal());

  // The recipient's private key
  FileReader fileReader = new FileReader(privateKeyPemFile);
  PasswordFinder passwordFinder = new PasswordFinder() {
      @Override
      public char[] getPassword() {
          return (privateKeyPassword != null) ? privateKeyPassword.toCharArray() : null;
      }
  };
  PEMReader pemReader = null;
  if (passwordFinder.getPassword() != null &amp;amp;&amp;amp; passwordFinder.getPassword().length &amp;gt; 0) {
      pemReader = new PEMReader(fileReader, passwordFinder);
  } else {
      pemReader = new PEMReader(fileReader);
  }
  KeyPair keyPair = (KeyPair) pemReader.readObject();
  PrivateKey privateKey = keyPair.getPrivate();

  try {
      MimeBodyPart encryptedMimeBodyPart = new MimeBodyPart(new ByteArrayInputStream(encryptedByteData));
      SMIMEEnveloped enveloped = new SMIMEEnveloped(encryptedMimeBodyPart);

      // look for our recipient identifier
      RecipientId recipientId = new RecipientId();

      recipientId.setSerialNumber(x509Certificate.getSerialNumber());
      recipientId.setIssuer(x509Certificate.getIssuerX500Principal());

      RecipientInformationStore recipients = enveloped.getRecipientInfos();
      RecipientInformation recipientInfo = recipients.get(recipientId);

      if (recipientInfo != null) {
          decryptedByteData = recipientInfo.getContent(privateKey, BouncyCastleProvider.PROVIDER_NAME);
      }
  } catch (Exception e) {
      throw new EncryptionException(&amp;quot;There was an IO problem during the en- or decryption process. See the stacktrace for details.&amp;quot;, e);
  } 

  decryptedByteData = Base64.decode(decryptedByteData);
  return decryptedByteData;
}
</pre></p>
<h3><strong>Create public and private key</strong></h3>
<p>You can create the public key (certificate) and private key files used in the methods with <a href="http://www.openssl.org/">OpenSSL</a> which is part of most Linux distributions. Just enter the following on command line:</p>
<p><pre class="brush: bash; gutter: false; wrap-lines: false;">
openssl req \
  -x509 -nodes -days 365 \
  -newkey rsa:1024 -keyout key.pem -out cert.pem
</pre></p>
<p>OpenSSL asks several questions about the certificate and creates two file: </p>
<ul>
<li><em>cert.pem</em> &#8211; public key or certificate</li>
<li><em>key.pem</em> &#8211; private key</li>
</ul>
<p>Use this files as parameters in the <em>encrypt</em> and <em>decrypt</em> methods.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/murygin.wordpress.com/263/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/murygin.wordpress.com/263/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/murygin.wordpress.com/263/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/murygin.wordpress.com/263/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/murygin.wordpress.com/263/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/murygin.wordpress.com/263/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/murygin.wordpress.com/263/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/murygin.wordpress.com/263/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/murygin.wordpress.com/263/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/murygin.wordpress.com/263/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/murygin.wordpress.com/263/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/murygin.wordpress.com/263/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/murygin.wordpress.com/263/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/murygin.wordpress.com/263/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=murygin.wordpress.com&amp;blog=1115167&amp;post=263&amp;subd=murygin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://murygin.wordpress.com/2010/10/08/public-key-cryptography/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/90da726fd5df2c5c18305275da4fddb1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">murygin</media:title>
		</media:content>

		<media:content url="http://upload.wikimedia.org/wikipedia/commons/thumb/b/bc/Bletchley_Park_Naval_Enigma_IMG_3604.JPG/170px-Bletchley_Park_Naval_Enigma_IMG_3604.JPG" medium="image">
			<media:title type="html">Enigma</media:title>
		</media:content>
	</item>
		<item>
		<title>Deutsche Rechtschreibprüfung in Eclipse</title>
		<link>http://murygin.wordpress.com/2010/05/11/deutsche-rechtschreibprufung-in-eclipse/</link>
		<comments>http://murygin.wordpress.com/2010/05/11/deutsche-rechtschreibprufung-in-eclipse/#comments</comments>
		<pubDate>Tue, 11 May 2010 08:33:02 +0000</pubDate>
		<dc:creator>murygin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[aspell]]></category>
		<category><![CDATA[eclipse]]></category>

		<guid isPermaLink="false">http://murygin.wordpress.com/?p=241</guid>
		<description><![CDATA[Eclipse enthält eine Rechtschreibprüfung. Leider kann man die Prüfung nicht einfach auf andere Sprachen umstellen, wie es trotzdem geht beschreibt dieser Artikel auf javathreads.de. Benötigt wird eine einfache Textdatei mit möglichst vielen deutschen Wörter. In jeder Zeile muss genau ein Wort stehen. Ein solche Datei mit über 300.000 Wörtern lässt sich einfach mit aspell erzeugen. <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=murygin.wordpress.com&amp;blog=1115167&amp;post=241&amp;subd=murygin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.martinelli.co.uk/images/babelfish.jpg" alt="Babelfisch" /></p>
<p>Eclipse enthält eine Rechtschreibprüfung. Leider kann man die Prüfung nicht einfach auf andere Sprachen umstellen, wie es trotzdem geht beschreibt <a href="http://javathreads.de/2008/07/deutsche-rechtschreibpruefung-in-eclipse/">dieser Artikel</a> auf <a href="http://javathreads.de">javathreads.de</a>.</p>
<p>Benötigt wird eine einfache Textdatei mit möglichst vielen deutschen Wörter. In jeder Zeile muss genau ein Wort stehen. Ein solche Datei mit über 300.000 Wörtern lässt sich einfach mit <a href="http://de.wikipedia.org/wiki/Aspell">aspell</a> erzeugen.</p>
<p><span id="more-241"></span></p>
<p><code><br />
sudo aptitude install aspell aspell-de<br />
aspell dump master de_DE &gt; eclipse_de_DE.txt<br />
</code></p>
<p>Download der Datei, für alle, denen das zu aufwendig ist <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> : <a href="http://www.verinice.org/svnroot/TRUNK/sernet.gs.ui.rcp.main/etc/eclipse_de_DE.txt">eclipse_de_DE.txt</a></p>
<p>Die Datei eclipse_de_DE.txt muss wie im <a href="http://javathreads.de/2008/07/deutsche-rechtschreibpruefung-in-eclipse/">Artikel</a> auf javathreads.de beschrieben, in Eclipse importieren werden.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/murygin.wordpress.com/241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/murygin.wordpress.com/241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/murygin.wordpress.com/241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/murygin.wordpress.com/241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/murygin.wordpress.com/241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/murygin.wordpress.com/241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/murygin.wordpress.com/241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/murygin.wordpress.com/241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/murygin.wordpress.com/241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/murygin.wordpress.com/241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/murygin.wordpress.com/241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/murygin.wordpress.com/241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/murygin.wordpress.com/241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/murygin.wordpress.com/241/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=murygin.wordpress.com&amp;blog=1115167&amp;post=241&amp;subd=murygin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://murygin.wordpress.com/2010/05/11/deutsche-rechtschreibprufung-in-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/90da726fd5df2c5c18305275da4fddb1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">murygin</media:title>
		</media:content>

		<media:content url="http://www.martinelli.co.uk/images/babelfish.jpg" medium="image">
			<media:title type="html">Babelfisch</media:title>
		</media:content>
	</item>
		<item>
		<title>Parameter Substitution In Resource Bundles</title>
		<link>http://murygin.wordpress.com/2010/04/23/parameter-substitution-in-resource-bundles/</link>
		<comments>http://murygin.wordpress.com/2010/04/23/parameter-substitution-in-resource-bundles/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 08:05:26 +0000</pubDate>
		<dc:creator>murygin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[resource bundle]]></category>

		<guid isPermaLink="false">http://murygin.wordpress.com/?p=230</guid>
		<description><![CDATA[If you use Java resource bundles to add multi language support to your application you sometimes need to add parameter to you properties but resource bundles from the JDK itself does not support parameter substitution. messages.properties: ... itemservice.item.added = User {0} added new item {1} to group {2} ... messages_de.properties (German): ... itemservice.item.added = Das <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=murygin.wordpress.com&amp;blog=1115167&amp;post=230&amp;subd=murygin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/e/e1/Brueghel-tower-of-babel.jpg/350px-Brueghel-tower-of-babel.jpg" alt="Tower Of Babel" /></p>
<p>If you use Java resource bundles to add multi language support to your application you sometimes need to add parameter to you properties but resource bundles from the JDK itself does not support parameter substitution.</p>
<p><span id="more-230"></span></p>
<p>messages.properties:<br />
<code><br />
...<br />
itemservice.item.added = User {0} added new item {1} to group {2}<br />
...<br />
</code></p>
<p>messages_de.properties (German):<br />
<code><br />
...<br />
itemservice.item.added = Das Objekt {1} wurde von Benutzer {0} zur Gruppe {2} hinzugef\u00FCgt.<br />
...<br />
</code></p>
<p>As you can see parameter order differs in German property file. That&#8217;s why its hard to realize this example without parameters. To replace parameters by values, you have to use method <i>java.text.MessageFormat.format(String text, Object &#8230; arguments)</i>. Add a small wrapper class to you project:</p>
<p><code><br />
public&nbsp;class&nbsp;Messages&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;property&nbsp;file&nbsp;is:&nbsp;package/name/messages.properties<br />
&nbsp;&nbsp;&nbsp;&nbsp;private&nbsp;static&nbsp;final&nbsp;String&nbsp;BUNDLE_NAME&nbsp;=&nbsp;"package.name.messages";<br />
&nbsp;&nbsp;&nbsp;&nbsp;private&nbsp;static&nbsp;final&nbsp;ResourceBundle&nbsp;RESOURCE_BUNDLE&nbsp;=&nbsp;ResourceBundle.getBundle(BUNDLE_NAME);<br />
&nbsp;&nbsp;&nbsp;&nbsp;private&nbsp;Messages()&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;static&nbsp;String&nbsp;getString(String&nbsp;key)&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;RESOURCE_BUNDLE.getString(key);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;catch&nbsp;(MissingResourceException&nbsp;e)&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;'!'&nbsp;+&nbsp;key&nbsp;+&nbsp;'!';<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;static&nbsp;String&nbsp;getString(String&nbsp;key,&nbsp;Object...&nbsp;params&nbsp;&nbsp;)&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;MessageFormat.format(RESOURCE_BUNDLE.getString(key),&nbsp;params);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;catch&nbsp;(MissingResourceException&nbsp;e)&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;'!'&nbsp;+&nbsp;key&nbsp;+&nbsp;'!';<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}<br />
</code></p>
<p>You can now use the properties from the example above:<br />
<code><br />
Messages.getString( "itemservice.item.added", user.getName(), item.getTitle(), group.getName());<br />
</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/murygin.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/murygin.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/murygin.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/murygin.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/murygin.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/murygin.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/murygin.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/murygin.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/murygin.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/murygin.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/murygin.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/murygin.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/murygin.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/murygin.wordpress.com/230/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=murygin.wordpress.com&amp;blog=1115167&amp;post=230&amp;subd=murygin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://murygin.wordpress.com/2010/04/23/parameter-substitution-in-resource-bundles/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/90da726fd5df2c5c18305275da4fddb1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">murygin</media:title>
		</media:content>

		<media:content url="http://upload.wikimedia.org/wikipedia/commons/thumb/e/e1/Brueghel-tower-of-babel.jpg/350px-Brueghel-tower-of-babel.jpg" medium="image">
			<media:title type="html">Tower Of Babel</media:title>
		</media:content>
	</item>
		<item>
		<title>Saving Files in Derby with Hibernate</title>
		<link>http://murygin.wordpress.com/2010/02/11/saving-files-in-derby-with-hibernate/</link>
		<comments>http://murygin.wordpress.com/2010/02/11/saving-files-in-derby-with-hibernate/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 20:45:40 +0000</pubDate>
		<dc:creator>murygin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[byte array]]></category>
		<category><![CDATA[derby]]></category>
		<category><![CDATA[hibernate]]></category>
		<category><![CDATA[postgresql]]></category>

		<guid isPermaLink="false">http://murygin.wordpress.com/?p=195</guid>
		<description><![CDATA[I use a byte-array to persist a file in a database with hibernate. After converting file data to a byte-array i map the byte-array to a property of type BINARY: Entity class: Hibernate mapping: I used PostgreSQL first and everything works fine. Hibernate maps binary-types in PostgreSQL to column type BYTEA. After switching to Derby <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=murygin.wordpress.com&amp;blog=1115167&amp;post=195&amp;subd=murygin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Snowflake"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/f/f2/Snowflake_-_Microphotograph_by_artgeek.jpg/220px-Snowflake_-_Microphotograph_by_artgeek.jpg" alt="Snowflake" /></a></p>
<p>I use a byte-array to persist a file in a database with <a href="http://hibernate.org">hibernate</a>. After converting file data to a byte-array i map the byte-array to a property of type <em>BINARY</em>:</p>
<p>Entity class:<br />
<pre class="brush: java; gutter: false; wrap-lines: false;">
public class Attachment implements Serializable {
  private byte[] fileData;
  public byte[] getFileData() {
    return fileData;
  }
  public void setFileData(byte[] fileData) {
    this.fileData = fileData;
  }
}
</pre><br />
<span id="more-195"></span><br />
Hibernate mapping:<br />
<pre class="brush: xml; gutter: false; wrap-lines: false;">
&lt;hibernate-mapping package=&quot;sernet.verinice.hibernate.model&quot;&gt;
&lt;class name=&quot;AttachmentFile&quot; table=&quot;attachment&quot;&gt;
  ..
  &lt;property name=&quot;fileData&quot; type=&quot;binary&quot; &gt;
    &lt;!-- 10 MB = 10485760 B --&gt;
    &lt;column name=&quot;fileData&quot; length=&quot;10485760&quot;/&gt;
  &lt;/property&gt;
  ..
  &lt;/class&gt;
&lt;/hibernate-mapping&gt;
</pre></p>
<p>I used <a href="http://www.postgresql.org/">PostgreSQL</a> first and everything works fine. Hibernate maps binary-types in PostgreSQL to column type <em>BYTEA</em>.</p>
<p>After switching to <a href="http://db.apache.org/derby/">Derby</a> i noticed that hibernate tries to map the byte-array to a <em>VARCHAR(255</em>) which of course is to small for a normal file. You can fix this by extending the build in derby-dialect. In the extended dialect you map the binary type to a <em>BLOB</em>:<br />
<pre class="brush: java; gutter: false; wrap-lines: false;">
public class ByteArrayDerbyDialect extends org.hibernate.dialect.DerbyDialect {
  public ByteArrayDerbyDialect() {
    super();
    // override VARBINARY mapping to varchar($l) from DerbyDialect(DB2Dialect)
    registerColumnType( Types.VARBINARY, &quot;blob($l)&quot; );
  }
}
</pre></p>
<p>To use the new dialect you have to set hibernate property <em>hibernate.dialect</em>:<br />
<code><br />
hibernate.dialect=your.package.ByteArrayDerbyDialect<br />
</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/murygin.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/murygin.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/murygin.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/murygin.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/murygin.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/murygin.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/murygin.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/murygin.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/murygin.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/murygin.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/murygin.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/murygin.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/murygin.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/murygin.wordpress.com/195/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=murygin.wordpress.com&amp;blog=1115167&amp;post=195&amp;subd=murygin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://murygin.wordpress.com/2010/02/11/saving-files-in-derby-with-hibernate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/90da726fd5df2c5c18305275da4fddb1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">murygin</media:title>
		</media:content>

		<media:content url="http://upload.wikimedia.org/wikipedia/commons/thumb/f/f2/Snowflake_-_Microphotograph_by_artgeek.jpg/220px-Snowflake_-_Microphotograph_by_artgeek.jpg" medium="image">
			<media:title type="html">Snowflake</media:title>
		</media:content>
	</item>
		<item>
		<title>Songbird On Ubuntu 9.10 Karmic Koala</title>
		<link>http://murygin.wordpress.com/2010/01/25/songbird-on-ubuntu-9-10-karmic-koala/</link>
		<comments>http://murygin.wordpress.com/2010/01/25/songbird-on-ubuntu-9-10-karmic-koala/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 10:45:51 +0000</pubDate>
		<dc:creator>murygin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[gstreamer]]></category>
		<category><![CDATA[Karmic Koala]]></category>
		<category><![CDATA[songbird]]></category>
		<category><![CDATA[Ubuntu 9.10]]></category>

		<guid isPermaLink="false">http://murygin.wordpress.com/?p=189</guid>
		<description><![CDATA[After upgrading to Ubuntu 9.10 (64-bit) i noticed that Songbird is not running anymore. After starting from command-line there are some error messages related to gstreamer. (songbird-bin:6139): GStreamer-WARNING **: Failed to load plugin '/usr/lib64/gstreamer-0.10/libgstrawparse.so': /usr/lib64/gstreamer-0.10/libgstrawparse.so: undefined symbol: gst_video_format_new_caps_interlaced (songbird-bin:6139): GStreamer-WARNING **: Failed to load plugin '/usr/lib64/gstreamer-0.10/libgstavi.so': /usr/lib64/gstreamer-0.10/libgstavi.so: undefined symbol: _gst_debug_dump_mem (songbird-bin:6139): GStreamer-WARNING **: Failed to <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=murygin.wordpress.com&amp;blog=1115167&amp;post=189&amp;subd=murygin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After upgrading to Ubuntu 9.10 (64-bit) i noticed that <a href="http://www.getsongbird.com/">Songbird</a> is not running anymore. After starting from command-line there are some error messages related to gstreamer.<br />
<span id="more-189"></span><br />
<code><br />
(songbird-bin:6139): GStreamer-WARNING **: Failed to load plugin '/usr/lib64/gstreamer-0.10/libgstrawparse.so': /usr/lib64/gstreamer-0.10/libgstrawparse.so: undefined symbol: gst_video_format_new_caps_interlaced<br />
(songbird-bin:6139): GStreamer-WARNING **: Failed to load plugin '/usr/lib64/gstreamer-0.10/libgstavi.so': /usr/lib64/gstreamer-0.10/libgstavi.so: undefined symbol: _gst_debug_dump_mem<br />
(songbird-bin:6139): GStreamer-WARNING **: Failed to load plugin '/usr/lib64/gstreamer-0.10/libgstschro.so': /usr/lib64/gstreamer-0.10/libgstschro.so: undefined symbol: gst_adapter_masked_scan_uint32<br />
(songbird-bin:6139): GStreamer-WARNING **: Failed to load plugin '/usr/lib64/gstreamer-0.10/libgsthdvparse.so': /usr/lib64/gstreamer-0.10/libgsthdvparse.so: undefined symbol: _gst_debug_dump_me<br />
(songbird-bin:6139): GStreamer-WARNING **: Failed to load plugin '/usr/lib64/gstreamer-0.10/libgstapp.so': /usr/lib/libgstapp-0.10.so.0: undefined symbol: gst_buffer_list_get_type<br />
(songbird-bin:6139): GStreamer-WARNING **: Failed to load plugin '/usr/lib64/gstreamer-0.10/libgstmatroska.so': /usr/lib64/gstreamer-0.10/libgstmatroska.so: undefined symbol: gst_util_array_binary_search<br />
(songbird-bin:6139): GStreamer-WARNING **: Failed to load plugin '/usr/lib64/gstreamer-0.10/libgstdeinterlace.so': /usr/lib64/gstreamer-0.10/libgstdeinterlace.so: undefined symbol: gst_video_format_parse_caps_interlaced<br />
(songbird-bin:6139): GStreamer-WARNING **: Failed to load plugin '/usr/lib64/gstreamer-0.10/libgstlibvisual.so': /usr/lib64/gstreamer-0.10/libgstlibvisual.so: undefined symbol: gst_adapter_prev_timestamp<br />
</code><br />
I found a solution <a href="http://www.jonathanmoeller.com/screed/?p=1228">here</a>.</p>
<p>Songbird ships with it’s own gstreamer codecs which conflict with the ones shipped with Karmic. All you need to do is to remove the gstreamer libs shipped with songbird:<br />
<code><br />
cd /path/to/Songbird/lib/ &amp;&amp; sudo rm -rf libgst*<br />
</code><br />
Enjoy Songbird on Ubuntu 9.10!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/murygin.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/murygin.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/murygin.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/murygin.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/murygin.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/murygin.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/murygin.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/murygin.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/murygin.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/murygin.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/murygin.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/murygin.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/murygin.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/murygin.wordpress.com/189/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=murygin.wordpress.com&amp;blog=1115167&amp;post=189&amp;subd=murygin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://murygin.wordpress.com/2010/01/25/songbird-on-ubuntu-9-10-karmic-koala/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/90da726fd5df2c5c18305275da4fddb1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">murygin</media:title>
		</media:content>
	</item>
	</channel>
</rss>
