dracoblue.net

unknown filesystem type 'mdraid'

Today I tried to mount a raid volume by using the following command:

# mount /dev/sda1 /mnt/disk
mount: unknown filesystem type 'mdraid'

I tried to figure out how to mount this then, but was not successful by searching for a filesystem type called mdraid to install. The reason is, that the software raid system (if detected) is an extra device (next to the physical harddisks) so using the following command:

#cat /proc/mdstat
Personalities : [raid1] 
md2 : active raid1 sda3[0] sdb3[1]
      726266432 blocks [2/2] [UU]

gave me the information I needed to know.

Mounting was now very easy:

mount /dev/md2 /mnt/disk

In by DracoBlue @ 2009-09-08 | 101 Words

HttpBindingInfoFactoryBean for CXF Apache

Today I was checking the

JSON-Support page for the Webservice Framework CXF.

While the webservice engine works great, I was not able to enable json-support, because the class HttpBindingInfoFactoryBean gave me a NoDefFoundError.

sf.setBindingFactory(new HttpBindingInfoFactoryBean());

It seems like the

documentation is just out of date.

The proper code (like taken from the mailinglist mail)

sf.setBindingId(HttpBindingFactory.HTTP_BINDING_ID);

No everything works fine. Also the ?wsdl is still available, useful for fetching information about all available functions/methods.

In Java, cxf by DracoBlue @ 2009-08-15 | 74 Words

Referer with document.location is broken in Internet Explorer

When you have (this should be discussed anyways) code in your javascript application changing to a different website, you'll see something similar to that:

location.href = 'test.php';

If you want to retrieve the referer on the next page, this will not work anymore. This is a

known IE Bug and not fixed in IE 8.

For instance this in javascript:

location.href = 'test.php';

And this as test.php

echo $_SERVER['REFERER']; 

In this case, the output in IE will always be empty. In the other big browsers, it works like a charm.

But there is always, also this time, a workaround. Found at

web bugtrack.

If you use for all browsers such wrapper function:

function goto(url){
  location.href = url;
}

You just have to make it like that for the one browser:

function goto(url){
	var referLink = document.createElement('a');
	referLink.href = url;
	document.body.appendChild(referLink);
	referLink.click();
}

As you can see, it will create a link with exactly the refer link. And will properly work then.

In Internet Explorer, JavaScript by DracoBlue @ 2009-07-08 | 162 Words

Generate diff svn update (some kind of dry run)

If you just want to figure out, what files

will be updated and exactly what will be changed you might use this command.

svn diff -r BASE:HEAD .

This will display the differences between current files in the directory (BASE) and the latest revision at the repository (indicated by HEAD).

Just for the record, here are some other useful hints.

If you just want to have all updated files:

svn st -u

This however does not display all conflicted files, so you might use

this workaround:

svn merge --dry-run -r BASE:HEAD .

In Subversion by DracoBlue @ 2009-07-06 | 93 Words

SVN Unterschiede ohne echtes Update

Manchmal möchte man einfach wissen, wo genau was bei einem svn update

geändert werden wird und wie die Dateien danach aussehen werden. Dafür kann man diesen Befehl benutzen.

svn diff -r BASE:HEAD .

Das zeigt den Unterscheid zwischen den Dateien im Verzeichnis (BASE) und der allerletzten Revision im SVN Repository (das bedeutet das HEAD).

Zu dem Trick, habe ich noch zwei weitere.

Wenn man rausfinden mag, welche Dateien geupdated werden hilft dieser Befehl:

svn st -u

Das zeigt leider nicht die Dateien an, die conflicted werden, daher gibt es

diesen workaround:

svn merge --dry-run -r BASE:HEAD .

In Subversion by DracoBlue @ 2009-07-06 | 99 Words

Page 24 - Page 25 - Page 26