<?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>h3x.no</title>
	<atom:link href="http://h3x.no/feed" rel="self" type="application/rss+xml" />
	<link>http://h3x.no</link>
	<description>Tor Henning Ueland`s thoughts about technology and other stuff</description>
	<lastBuildDate>Sat, 28 Jan 2012 14:02:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Wrong charset for cron</title>
		<link>http://h3x.no/2012/01/28/wrong-charset-for-cron</link>
		<comments>http://h3x.no/2012/01/28/wrong-charset-for-cron#comments</comments>
		<pubDate>Sat, 28 Jan 2012 14:02:41 +0000</pubDate>
		<dc:creator>Tor Henning Ueland</dc:creator>
				<category><![CDATA[Everything else]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[charset]]></category>
		<category><![CDATA[cron]]></category>

		<guid isPermaLink="false">http://h3x.no/?p=1088</guid>
		<description><![CDATA[I got a issue on a export job i had that was running daily on which the charset of the data exported wer wrong, and this did not happen when i ran the job manually. I noticed that Cron used &#8230; <a href="http://h3x.no/2012/01/28/wrong-charset-for-cron">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I got a issue on a export job i had that was running daily on which the charset of the data exported wer wrong, and this did not happen when i ran the job manually. I noticed that Cron used the charset &#8220;POSIX&#8221; instead of en_US.UTF-8 which i used. I fixed this by adding &#8220;<strong>LANG=en_US.UTF-8</strong>&#8221; to the file <strong>/etc/default/locale</strong>.</p>
<p>It appears that when the LANG variable is not set in that file, Cron will fall back to using the POSIX charset.</p>
]]></content:encoded>
			<wfw:commentRss>http://h3x.no/2012/01/28/wrong-charset-for-cron/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting Windows 2008 server uptime via the command line</title>
		<link>http://h3x.no/2011/09/12/getting-windows-2008-server-uptime-via-the-command-line</link>
		<comments>http://h3x.no/2011/09/12/getting-windows-2008-server-uptime-via-the-command-line#comments</comments>
		<pubDate>Mon, 12 Sep 2011 14:10:49 +0000</pubDate>
		<dc:creator>Tor Henning Ueland</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[uptime]]></category>

		<guid isPermaLink="false">http://h3x.no/?p=1084</guid>
		<description><![CDATA[A simple one liner to get hold of Windows 2008 server uptime: systeminfo &#124; find &#34;System Boot Time&#34;]]></description>
			<content:encoded><![CDATA[<p>A simple one liner to get hold of Windows 2008 server uptime:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">systeminfo <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #ff0000;">&quot;System Boot Time&quot;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://h3x.no/2011/09/12/getting-windows-2008-server-uptime-via-the-command-line/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The effects of old NIC drivers on Data Protector</title>
		<link>http://h3x.no/2011/09/06/the-effects-of-old-nic-drivers-on-data-protector</link>
		<comments>http://h3x.no/2011/09/06/the-effects-of-old-nic-drivers-on-data-protector#comments</comments>
		<pubDate>Tue, 06 Sep 2011 19:09:19 +0000</pubDate>
		<dc:creator>Tor Henning Ueland</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[data protector]]></category>
		<category><![CDATA[drivers]]></category>
		<category><![CDATA[NIC]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://h3x.no/?p=1074</guid>
		<description><![CDATA[During the Data Protector migration we noticed that the performance on the new Data Protector Cell Manager was a lot lower than the performance on the old solution. Speeds of around 100Mbit was the best we ever could get from &#8230; <a href="http://h3x.no/2011/09/06/the-effects-of-old-nic-drivers-on-data-protector">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>During the Data Protector migration we noticed that the performance on the new Data Protector Cell Manager was a lot lower than the performance on the old solution. Speeds of around 100Mbit was the best we ever could get from it, although the machine is running on a gigabit network.</p>
<p>To make the case even more strange, performance on other network tasks was quite normal where the gigabit  connection was maxed ASAP.</p>
<p>After some digging, the problem turned out to be that the server was running the old default drivers for the NIC (Broadcom BCM5708S netXtreme II GigE). Windows update has in the latest Windows versions become better on delivering driver updates but that was not the case this time.</p>
<p>After installing the newest drivers from Broadcom`s website the performance jumped straight to gigabit even on Data Protector.</p>
]]></content:encoded>
			<wfw:commentRss>http://h3x.no/2011/09/06/the-effects-of-old-nic-drivers-on-data-protector/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dataprotector: System error: HOST_NOT_FOUND</title>
		<link>http://h3x.no/2011/09/05/dataprotector-system-error-host_not_found</link>
		<comments>http://h3x.no/2011/09/05/dataprotector-system-error-host_not_found#comments</comments>
		<pubDate>Mon, 05 Sep 2011 18:55:16 +0000</pubDate>
		<dc:creator>Tor Henning Ueland</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[data protector]]></category>

		<guid isPermaLink="false">http://h3x.no/?p=1076</guid>
		<description><![CDATA[I have been working a bit with migrating a Data Protector cell manager, when moving a client i recieved the following error: &#91;Critical&#93; From: BDA-NET@ &#34; &#91;/boot&#93;&#34; Time: 02.09.2011 09:08:03 Cannot connect to Media Agent on system , port 49708 &#8230; <a href="http://h3x.no/2011/09/05/dataprotector-system-error-host_not_found">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have been working a bit with migrating a Data Protector cell manager, when moving a client i recieved the following error:</p>

<div class="wp_syntax"><div class="code"><pre class="" style="font-family:monospace;"><span class="br0">&#91;</span>Critical<span class="br0">&#93;</span> From: BDA-NET@ &quot; <span class="br0">&#91;</span>/boot<span class="br0">&#93;</span>&quot;  Time: 02.09.2011 09:08:03
Cannot connect to Media Agent on system , port <span style="">49708</span> <span class="br0">&#40;</span>IPC Invalid Hostname or IP Address
System error: HOST_NOT_FOUND<span class="br0">&#41;</span> =&gt;
aborting.</pre></div></div>

<p>The cause for this was that the client could not look up the cell manager. I solved this by simply adding the cell manager in the hosts file of the client. You can verify this problem by simply doing a ping or nslookup against the cell manager, from the client itself.</p>
]]></content:encoded>
			<wfw:commentRss>http://h3x.no/2011/09/05/dataprotector-system-error-host_not_found/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GWT: &#8220;For security purposes, this type will not be serialized.&#8221;</title>
		<link>http://h3x.no/2011/09/01/gwt-for-security-purposes-this-type-will-not-be-serialized</link>
		<comments>http://h3x.no/2011/09/01/gwt-for-security-purposes-this-type-will-not-be-serialized#comments</comments>
		<pubDate>Thu, 01 Sep 2011 17:50:07 +0000</pubDate>
		<dc:creator>Tor Henning Ueland</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[constructor]]></category>
		<category><![CDATA[GWT]]></category>
		<category><![CDATA[serializable]]></category>

		<guid isPermaLink="false">http://h3x.no/?p=1069</guid>
		<description><![CDATA[The full error message you can get is: &#8220;Foo was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded. For security purposes, this type will not be &#8230; <a href="http://h3x.no/2011/09/01/gwt-for-security-purposes-this-type-will-not-be-serialized">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The full error message you can get is: &#8220;Foo was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded. For security purposes, this type will not be serialized.&#8221;</p>
<p>This is normally caused by using a non-serializable class, which can happen if your class does not implement serializable or if you have forgotten to add a <strong>empty</strong> constructor.</p>
]]></content:encoded>
			<wfw:commentRss>http://h3x.no/2011/09/01/gwt-for-security-purposes-this-type-will-not-be-serialized/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Cant download large apps from Android Market</title>
		<link>http://h3x.no/2011/08/31/cant-download-large-apps-from-android-market</link>
		<comments>http://h3x.no/2011/08/31/cant-download-large-apps-from-android-market#comments</comments>
		<pubDate>Wed, 31 Aug 2011 16:18:05 +0000</pubDate>
		<dc:creator>Tor Henning Ueland</dc:creator>
				<category><![CDATA[Mobile & Gadgets]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[market]]></category>

		<guid isPermaLink="false">http://h3x.no/?p=1046</guid>
		<description><![CDATA[If you are running a rooted Android phone and have problems with downloading large apps from the Android market, one fix can be to move the market download folder over to the SD-card, install a terminal emulator and perform the &#8230; <a href="http://h3x.no/2011/08/31/cant-download-large-apps-from-android-market">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you are running a rooted Android phone and have problems with downloading large apps from the Android market, one fix can be to move the market download folder over to the SD-card, install a terminal emulator and perform the following (on your own risk of course):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>sdcard<span style="color: #000000; font-weight: bold;">/</span>market-download-cache
<span style="color: #c20cb9; font-weight: bold;">su</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>cache
<span style="color: #c20cb9; font-weight: bold;">mv</span> download download.bak
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>sdcard<span style="color: #000000; font-weight: bold;">/</span>market-download-cache download
<span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-ahl</span></pre></div></div>

<p>Then try again and see if it wont work better to download large apps, like Google Maps <img src='http://h3x.no/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://h3x.no/2011/08/31/cant-download-large-apps-from-android-market/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Java: Converting long to double</title>
		<link>http://h3x.no/2011/08/30/java-converting-long-to-double</link>
		<comments>http://h3x.no/2011/08/30/java-converting-long-to-double#comments</comments>
		<pubDate>Tue, 30 Aug 2011 16:15:17 +0000</pubDate>
		<dc:creator>Tor Henning Ueland</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[cast]]></category>
		<category><![CDATA[double]]></category>

		<guid isPermaLink="false">http://h3x.no/?p=1048</guid>
		<description><![CDATA[While Integers has to be parsed from a String, doubles can simply be casted: String bar = &#34;9.99&#34;; Double foo = &#40;double&#41;bar;]]></description>
			<content:encoded><![CDATA[<p>While Integers has to be parsed from a String, doubles can simply be casted:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #003399;">String</span> bar <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;9.99&quot;</span><span style="color: #339933;">;</span>
<span style="color: #003399;">Double</span> foo <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">double</span><span style="color: #009900;">&#41;</span>bar<span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://h3x.no/2011/08/30/java-converting-long-to-double/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EXT GWT: Adding onClick to Labels</title>
		<link>http://h3x.no/2011/08/29/ext-gwt-adding-onclick-to-labels</link>
		<comments>http://h3x.no/2011/08/29/ext-gwt-adding-onclick-to-labels#comments</comments>
		<pubDate>Mon, 29 Aug 2011 17:25:51 +0000</pubDate>
		<dc:creator>Tor Henning Ueland</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[clickhandler]]></category>
		<category><![CDATA[ext]]></category>
		<category><![CDATA[GWT]]></category>
		<category><![CDATA[onclick]]></category>

		<guid isPermaLink="false">http://h3x.no/?p=1036</guid>
		<description><![CDATA[I had a issue where i needed to add a click handler for labels in EXT GWT, the solution i came up with was as follows theLabel.addListener&#40;Events.OnClick, new Listener&#40;&#41; &#123; @Override public void handleEvent&#40;BaseEvent be&#41; &#123; // TODO Auto-generated method &#8230; <a href="http://h3x.no/2011/08/29/ext-gwt-adding-onclick-to-labels">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I had a issue where i needed to add a click handler for labels in EXT GWT, the solution i came up with was as follows</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">theLabel.<span style="color: #006633;">addListener</span><span style="color: #009900;">&#40;</span>Events.<span style="color: #006633;">OnClick</span>, <span style="color: #000000; font-weight: bold;">new</span> Listener<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
@Override
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> handleEvent<span style="color: #009900;">&#40;</span>BaseEvent be<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// TODO Auto-generated method stub</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://h3x.no/2011/08/29/ext-gwt-adding-onclick-to-labels/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Guice: java.lang.IllegalStateException: No SessionHandler or SessionManager</title>
		<link>http://h3x.no/2011/08/28/guice-java-lang-illegalstateexception-no-sessionhandler-or-sessionmanager</link>
		<comments>http://h3x.no/2011/08/28/guice-java-lang-illegalstateexception-no-sessionhandler-or-sessionmanager#comments</comments>
		<pubDate>Sun, 28 Aug 2011 17:21:56 +0000</pubDate>
		<dc:creator>Tor Henning Ueland</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[guice]]></category>
		<category><![CDATA[singleton]]></category>

		<guid isPermaLink="false">http://h3x.no/?p=1034</guid>
		<description><![CDATA[One reason for this error would be that you should inject the session object directly, not via constructor: So instead of: @Singleton public class Foo &#123; &#160; @Inject public Foo&#40;HttpServletSession s&#41; &#123; this.session = s  &#125; &#125; do this: @Singleton &#8230; <a href="http://h3x.no/2011/08/28/guice-java-lang-illegalstateexception-no-sessionhandler-or-sessionmanager">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One reason for this error would be that you should inject the session object directly, not via constructor:</p>
<p>So instead of:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">@Singleton
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Foo <span style="color: #009900;">&#123;</span>
&nbsp;
@Inject <span style="color: #000000; font-weight: bold;">public</span> Foo<span style="color: #009900;">&#40;</span>HttpServletSession s<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">session</span> <span style="color: #339933;">=</span> s  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>do this:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">@Singleton
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Foo<span style="color: #009900;">&#123;</span>
&nbsp;
@Inject Provider<span style="color: #339933;">&lt;</span>HttpServletSession<span style="color: #339933;">&gt;</span> session<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>And it should work much better <img src='http://h3x.no/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://h3x.no/2011/08/28/guice-java-lang-illegalstateexception-no-sessionhandler-or-sessionmanager/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Expanding a kVM disk image</title>
		<link>http://h3x.no/2011/08/14/expanding-a-kvm-disk-image</link>
		<comments>http://h3x.no/2011/08/14/expanding-a-kvm-disk-image#comments</comments>
		<pubDate>Sun, 14 Aug 2011 19:24:31 +0000</pubDate>
		<dc:creator>Tor Henning Ueland</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[disk]]></category>
		<category><![CDATA[kvm]]></category>
		<category><![CDATA[qemu]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://h3x.no/?p=1055</guid>
		<description><![CDATA[Had to expand a KVM virtual machine today. Luckily, that`s pretty straight forward. You simply create a new disk image with the extra size needed, merge it into the original disk and voila. Then you just need to partition in &#8230; <a href="http://h3x.no/2011/08/14/expanding-a-kvm-disk-image">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Had to expand a KVM virtual machine today. Luckily, that`s pretty straight forward. You simply create a new disk image with the extra size needed, merge it into the original disk and voila. Then you just need to partition in the extra space and you are good to go.</p>
<p><strong>How-to:</strong></p>
<p><strong>1: Halt your virtual machine.</strong></p>
<p>You need to stop your virtual machine before going wild with the drive. Virsh stop &lt;vm name&gt;, or virsh destroy &lt;vm name&gt; if it somehow wont stop.</p>
<p><strong>2: Create a disk with the extra space needed:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">qemu-img create <span style="color: #660033;">-f</span> raw 5gig.img 5G</pre></div></div>

<p><strong>3: Merge it into the disk you are working with</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cat</span> 5gig.img <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> yourdisk.img</pre></div></div>

<p><strong>4: Boot up and and partition your drive.</strong></p>
<p>Then start up your virtual machine again with virsh start &lt;vm name&gt;. If you use Windows server, all you need to do is to visit disk managent, right click your drive with little free space and choose &#8220;extend partition&#8221;. The job takes seconds and does not require any reboot.</p>
]]></content:encoded>
			<wfw:commentRss>http://h3x.no/2011/08/14/expanding-a-kvm-disk-image/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

